This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Vector] Update ShapeCastOp folder to use producer-consumer value forwarding.
ClosedPublic

Authored by andydavis1 on Apr 1 2020, 4:15 PM.

Details

Summary

Update ShapeCastOp folder to use producer-consumer value forwarding.
Support is added for tracking sub-vectors through trivial shape cast operations,
where the sub-vector shape is preserved across shape cast operations and only
leading ones are added or removed.
Support is preserved for cancelling shape cast operations.
One unit test is added and two are updated.

Diff Detail

Event Timeline

andydavis1 created this revision.Apr 1 2020, 4:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2020, 4:15 PM
andydavis1 retitled this revision from BEGIN_PUBLIC [MLIR][Vector] Update ShapeCastOp folder to use producer-consumer value forwarding. to [MLIR][Vector] Update ShapeCastOp folder to use producer-consumer value forwarding..Apr 1 2020, 4:16 PM
andydavis1 edited the summary of this revision. (Show Details)
aartbik added inline comments.Apr 7 2020, 10:28 AM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
765

a break is effectively a return nullptr, right? so, given how far the while/return are, why not use that to make it more clear? same appplies to other breaks (also given you have a few return nullptr here and there too)

andydavis1 edited the summary of this revision. (Show Details)

addressing comments

andydavis1 marked an inline comment as done.Apr 7 2020, 11:40 AM

Thanks PTAL...

rriddle added inline comments.Apr 7 2020, 12:02 PM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
787

I would expect llvm::reverse() to work here.

Adressing comments and rebasing.

andydavis1 marked 2 inline comments as done.Apr 7 2020, 12:51 PM
andydavis1 added inline comments.
mlir/lib/Dialect/Vector/VectorTransforms.cpp
787

Thanks!

nicolasvasilache accepted this revision.Apr 7 2020, 1:46 PM
This revision is now accepted and ready to land.Apr 7 2020, 1:46 PM
aartbik accepted this revision.Apr 7 2020, 4:43 PM
andydavis1 updated this revision to Diff 256038.Apr 8 2020, 8:54 AM
andydavis1 marked an inline comment as done.

rebase

This revision was automatically updated to reflect the committed changes.