This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Add unit test for vector distribute by block
ClosedPublic

Authored by ThomasRaoux on Oct 8 2020, 12:08 PM.

Details

Summary

When distributing a vector larger than the given multiplicity, we can distribute it by block where each id gets a chunk of consecutive element along the dimension distributed. This adds a test for this case and adds extra checks to make sure we don't distribute for cases not multiple of multiplicity.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Oct 8 2020, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 8 2020, 12:08 PM
ThomasRaoux requested review of this revision.Oct 8 2020, 12:08 PM
aartbik added inline comments.Oct 8 2020, 12:38 PM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
2451

please add explanation in a comment (since revision comment is harder to obtain)

Add a comment.

mlir/lib/Dialect/Vector/VectorTransforms.cpp
2451

Sure, Added some explanation.

aartbik added inline comments.Oct 8 2020, 2:00 PM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
2452

typo: support

mlir/test/lib/Transforms/TestVectorTransforms.cpp
149

TABs in file?

ThomasRaoux added inline comments.Oct 8 2020, 2:10 PM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
2452

Fixed.

mlir/test/lib/Transforms/TestVectorTransforms.cpp
149

I doubled checked that those are not tabs. I believe this is how phabricator displays that the line change is an indentation.

aartbik accepted this revision.Oct 8 2020, 2:17 PM
This revision is now accepted and ready to land.Oct 8 2020, 2:17 PM