This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Fix error in `LinalgOp` -> `tensor::CastOp` folding.
ClosedPublic

Authored by mravishankar on Mar 14 2022, 4:05 PM.

Details

Summary

When replacing the uses of the LinalgOp other than the use in the
tensor.cast op, check if the op itself has multiple uses, instead of
the specific result having multiple uses.

Diff Detail

Event Timeline

mravishankar created this revision.Mar 14 2022, 4:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 14 2022, 4:05 PM
mravishankar requested review of this revision.Mar 14 2022, 4:05 PM
hanchung accepted this revision.Mar 14 2022, 5:39 PM
This revision is now accepted and ready to land.Mar 14 2022, 5:39 PM

I think https://reviews.llvm.org/D121369 already fixes the problem and additionally makes the pattern work with the transform dialect. Landing the test still make sense!

I think https://reviews.llvm.org/D121369 already fixes the problem and additionally makes the pattern work with the transform dialect. Landing the test still make sense!

Ah I see this is the same commit you pointed me to. Didnt connect the two. Ill land the test then.

Dropping cod echange and only keeping the test.

This revision was landed with ongoing or failed builds.Mar 15 2022, 10:06 PM
This revision was automatically updated to reflect the committed changes.