This patch implements the vectorization of tensor.extract for arbitrary
tensors. It basically extends https://reviews.llvm.org/D133786 by adding
support for n-D tensors. This works by basically flattening the
indices.
While this patch allows for more cases of tensor.extract to be
vectorised, performance on the workloads that we tested
either regressed or didn't improve. For this reason, new functionality
is hidden behind a global command-line flag:
- -linalg-vectorize-n-d-extract.
We may want remove it once the implementation is refined and we
are happy with the performance.
Extra logic in the Linalg vectorizer is added to support the new
command line option.
Related discussion: https://github.com/iree-org/iree/issues/9198
thanks for adding this