[mlir][sparse] Extend convertToMLIRSparseTensor to support permutation and more gener...
authorBixia Zheng <bixia@google.com>
Mon, 28 Feb 2022 22:22:41 +0000 (14:22 -0800)
committerBixia Zheng <bixia@google.com>
Tue, 1 Mar 2022 18:51:39 +0000 (10:51 -0800)
commit20eaa88fff478616259668c9917332d1f505ccdd
treed0e7b04be7a55fe666dfce906bf6edaedd33525f
parentba4f1e44e480d661d99973007a39dc642f5d79a4
[mlir][sparse] Extend convertToMLIRSparseTensor to support permutation and more general sparsity values.

Previously, convertToMLIRSparseTensor assumes identity storage ordering and all
compressed dimensions. This change extends the function with two parameters for
users to specify the storage ordering and the sparsity of each dimension.

Modify PyTACO to reflect this change.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D120643
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py