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
Paths
| Differential D137646
[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 Timelinespringerm added a child revision: D137929: [mlir][vector] Distribute vector.insertelement op.Nov 14 2022, 2:56 AM ThomasRaoux added inline comments.
This revision is now accepted and ready to land.Jan 6 2023, 8:35 AM Closed by commit rG9085f00b4d45: [mlir][vector] Support vector.extract distribution of >1D vectors (authored by springerm). · Explain WhyJan 9 2023, 7:40 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 487434 mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
mlir/test/Dialect/Vector/vector-warp-distribute.mlir
|
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.