This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Change standard op patterns to consider type conversion
ClosedPublic

Authored by antiagainst on Mar 16 2020, 11:53 AM.

Details

Summary

Previously we have a few patterns that were written with DRR. DRR
at the moment does not work nicely with dialect conversion framework.
It generates normal RewritePatterns, while the dialect conversion
framework requires ConversionPatterns to take into consideration
the type conversion. So this commit starts to change existing DRR
patterns for standard ops to OpConversionPattern to incorporate the
SPIR-V type conversion. All patterns are converted except the one
for constant ops, which will happen in a subsequent commit.

Depends On D76244

Diff Detail

Event Timeline

antiagainst created this revision.Mar 16 2020, 11:53 AM
mravishankar accepted this revision.Mar 16 2020, 1:15 PM
mravishankar added inline comments.
mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
41

Thats a shame :(

This revision is now accepted and ready to land.Mar 16 2020, 1:15 PM
antiagainst marked 2 inline comments as done.

Address comments

antiagainst added inline comments.Mar 17 2020, 6:58 AM
mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
41

It will grow the support eventually. :)

This revision was automatically updated to reflect the committed changes.