[mlir][sparse] Fix a bug in rewriting dense2dense convert op.
authorbixia1 <bixia@google.com>
Fri, 11 Nov 2022 07:13:20 +0000 (23:13 -0800)
committerbixia1 <bixia@google.com>
Fri, 11 Nov 2022 17:11:54 +0000 (09:11 -0800)
commit57416d872ae0fd3b8ee1808fed5c6b2ad4925bd8
tree148e933cb249f4262515a8dd0629ec57d3843694
parenta77a02aa5794a63584a3c8b9bc8aa2164dc2a1e2
[mlir][sparse] Fix a bug in rewriting dense2dense convert op.

Permutation wasn't handled correctly. Add a test for the rewriting.

Extend an integration test to run with enable_runtime_library=false to
also test the rewriting.

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D137845
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir