diff options
author | Che-Yu Wu <cheyuw@google.com> | 2022-08-23 16:45:43 +0000 |
---|---|---|
committer | Diego Caballero <diegocaballero@google.com> | 2022-08-23 16:53:19 +0000 |
commit | 0cbfd6fd1633a075dcfd1bcd8a11e1c6d2785fa8 (patch) | |
tree | 5746950f17a4e26c5844b299dca97d1d46e78c0a /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6ca17b58f569d43838404f5c94856e3584a23d0f (diff) | |
download | llvm-0cbfd6fd1633a075dcfd1bcd8a11e1c6d2785fa8.zip llvm-0cbfd6fd1633a075dcfd1bcd8a11e1c6d2785fa8.tar.gz llvm-0cbfd6fd1633a075dcfd1bcd8a11e1c6d2785fa8.tar.bz2 |
[MLIR]Extend vector.gather to support n-D result
Currently vector.gather only supports reading memory into a 1-D result vector.
This patch extends it to support an n-D result vector with the indices, masks,
and passthroughs in n-D vectors.
As we are trying to vectorize tensor.extract with vector.gather
(https://github.com/iree-org/iree/issues/9198), it will need to gather the
elements into an n-D vector. Having vector.gather with n-D results allows us
to avoid flatten and reshape at the vectorization stage. The backends can then
decide the optimal ways to lower the vector.gather op.
Note that this is different from n-D gathering, which is about reading n-D
memory with the n-D indices. The indices here are still only 1-D offsets on
the base.
Reviewed By: dcaballe
Differential Revision: https://reviews.llvm.org/D131905
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions