This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Support vector.extract distribution of >1D vectors
ClosedPublic

Authored by springerm on Nov 8 2022, 7:49 AM.

Details

Summary

Ops such as %1 = vector.extract %0[2] : vector<5x96xf32>.

Distribute the source vector, then extract. In case of a 1d extract, rewrite to vector.extractelement.

Depends On D137336

Diff Detail

Event Timeline

springerm created this revision.Nov 8 2022, 7:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm requested review of this revision.Nov 8 2022, 7:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
ThomasRaoux accepted this revision.Jan 6 2023, 8:35 AM
ThomasRaoux added inline comments.
mlir/test/Dialect/Vector/vector-warp-distribute.mlir
651–658

Yes it sounds like broadcasting the full vector is most likely never what we want to do here. It's fine to leave as is if needed but this is likely to generate inefficient code.

This revision is now accepted and ready to land.Jan 6 2023, 8:35 AM