This is an archive of the discontinued LLVM Phabricator instance.

[mlir] [VectorOps] Implement vector.create_mask lowering to LLVM IR
ClosedPublic

Authored by aartbik on May 14 2020, 12:08 PM.

Details

Summary

First, compact implementation of lowering to LLVM IR. A bit more
challenging than the constant mask due to the dynamic indices, of course.
I like to hear if there are more efficient ways of doing this in LLVM,
but this for now at least gives us a functional reference implementation.

Diff Detail

Event Timeline

aartbik created this revision.May 14 2020, 12:08 PM
This revision is now accepted and ready to land.May 15 2020, 10:56 AM
This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.May 27 2020, 12:59 PM
mlir/lib/Dialect/Vector/VectorTransforms.cpp
1239

Can you add comments to what the expected output is given a mask input? Lowerings should really be documented.

aartbik marked 2 inline comments as done.Jun 3 2020, 4:53 PM
aartbik added inline comments.
mlir/lib/Dialect/Vector/VectorTransforms.cpp
1239

Yes of course. Not sure how I missed that when writing this CL.... Fix coming up....

Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2020, 4:53 PM