This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Vector] Support 0-D vectors in `CreateMaskOp`
ClosedPublic

Authored by michalt on Dec 6 2021, 10:47 PM.

Details

Summary

The 0-D case gets lowered in almost the same way that the 1-D case does
in VectorCreateMaskOpConversion. I also had to slightly update the
verifier for the op to always require exactly 1 operand in the 0-D case.

Depends On D115220

Diff Detail

Event Timeline

michalt created this revision.Dec 6 2021, 10:47 PM
michalt requested review of this revision.Dec 6 2021, 10:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2021, 10:47 PM
ftynse added inline comments.Dec 7 2021, 1:07 AM
mlir/lib/Dialect/Vector/VectorOps.cpp
3976

Please add a test for this message.

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

Nit: please use full sentences in comments, i.e., start with a capital letter and end with a full stop.

Also, you can do rewriter.notifyMatchFailure to indicate the failure reason and have it propagated through the debug infra instead of putting it an comment.

michalt updated this revision to Diff 392657.Dec 7 2021, 11:15 PM
michalt marked 2 inline comments as done.

Rebase and address comments

ftynse accepted this revision.Dec 8 2021, 5:37 AM
This revision is now accepted and ready to land.Dec 8 2021, 5:37 AM

Thanks for the review! Could I ask you to also land this? (I don't have commit access)

Rebase by applying patch.

This revision was landed with ongoing or failed builds.Dec 12 2021, 5:36 AM
This revision was automatically updated to reflect the committed changes.