This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Fix distribution of scf.for with value coming from above
ClosedPublic

Authored by ThomasRaoux on Nov 1 2022, 12:13 AM.

Details

Summary

When a value used in the forOp is defined outside the region but within
the parent warpOp we need to return and distribute the value to pass it
to new operations created within the loop.
Also simplify the lambda interface.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Nov 1 2022, 12:13 AM
Herald added a project: Restricted Project. · View Herald Transcript
ThomasRaoux requested review of this revision.Nov 1 2022, 12:13 AM
Herald added a project: Restricted Project. · View Herald Transcript
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
425

Thanks for factoring out more clearly.
Please add more doc with some non-trivial examples and describe what maps are supported / assumed.

989

can we use getUsedValuesDefinedAbove ?

Address review comments

add extra comments

ThomasRaoux marked an inline comment as done.Nov 1 2022, 10:15 AM
ThomasRaoux added inline comments.
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
989

Yes, it simplifies thing :)

antiagainst accepted this revision.Nov 1 2022, 3:13 PM
This revision is now accepted and ready to land.Nov 1 2022, 3:13 PM