[mlir][vector] Support vector.extract distribution of >1D vectors
authorMatthias Springer <springerm@google.com>
Mon, 9 Jan 2023 15:35:29 +0000 (16:35 +0100)
committerMatthias Springer <springerm@google.com>
Mon, 9 Jan 2023 15:39:50 +0000 (16:39 +0100)
commit9085f00b4d4526013e9ae98e31cef3d1e64b92f9
tree93d65f173d0aaadf71849c67b97720c8931f10bd
parent1f5d698a8bbdc4f05c63e82676d2ee335ee16c18
[mlir][vector] Support vector.extract distribution of >1D vectors

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.

Differential Revision: https://reviews.llvm.org/D137646
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
mlir/test/Dialect/Vector/vector-warp-distribute.mlir