[mlir][sparse] add option for 32-bit indices in scatter/gather
authorAart Bik <ajcbik@google.com>
Fri, 4 Jun 2021 23:17:16 +0000 (16:17 -0700)
committerAart Bik <ajcbik@google.com>
Fri, 4 Jun 2021 23:57:12 +0000 (16:57 -0700)
commit86e9bc1a34a0eafcce52c0dfda0817b1465a0dc2
tree72a9e77c1fe28b6d4c585ab9ced2c5a78daa0426
parent00542932fe13ea3b989f40b434399c72f5eca4ec
[mlir][sparse] add option for 32-bit indices in scatter/gather

Controlled by a compiler option, if 32-bit indices can be handled
with zero/sign-extention alike (viz. no worries on non-negative
indices), scatter/gather operations can use the more efficient
32-bit SIMD version.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D103632
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
mlir/test/Dialect/SparseTensor/sparse_vector.mlir