[mlir][sparse] add sparse tensor type conversion operation
authorAart Bik <ajcbik@google.com>
Sat, 31 Jul 2021 00:52:39 +0000 (17:52 -0700)
committerAart Bik <ajcbik@google.com>
Sat, 31 Jul 2021 19:53:31 +0000 (12:53 -0700)
commit697ea09d47a93d92e40990a38fccf9e246cc22e6
tree2e1f095ccff812d96f8a5572a1cf1c971b3cc847
parent7f5555776513f174729a686ed01270e23462aaf7
[mlir][sparse] add sparse tensor type conversion operation

Introduces a conversion from one (sparse) tensor type to another
(sparse) tensor type. See the operation doc for details. Actual
codegen for all cases is still TBD.

Reviewed By: ThomasRaoux

Differential Revision: https://reviews.llvm.org/D107205
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
mlir/test/Dialect/SparseTensor/invalid.mlir
mlir/test/Dialect/SparseTensor/roundtrip.mlir