[mlir][vector] Support vector.extractelement distribution of 1D vectors
authorMatthias Springer <springerm@google.com>
Thu, 10 Nov 2022 14:04:23 +0000 (15:04 +0100)
committerMatthias Springer <springerm@google.com>
Thu, 10 Nov 2022 14:07:56 +0000 (15:07 +0100)
commit9d51b4e4e77691930fa837dd423c648acf4beb5e
tree7bb8c618cdecea5887d91f4d8d226d95c351cf44
parent00d98e6572d1127a953757aee3adc14439645f56
[mlir][vector] Support vector.extractelement distribution of 1D vectors

Ops such as `%1 = vector.extractelement %0[%pos : index] : vector<96xf32>`.

In case of an extract from a 1D vector, the source vector is distributed. The lane into which the requested position falls, extracts the element and shuffles it to all other lanes.

Differential Revision: https://reviews.llvm.org/D137336
mlir/include/mlir/Dialect/Vector/Transforms/VectorDistribution.h
mlir/lib/Dialect/Vector/Transforms/VectorDistribute.cpp
mlir/test/Dialect/Vector/vector-warp-distribute.mlir
mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp