[mlir][taco] Uses sparse_tensor.new to read tensor input data from files.
authorBixia Zheng <bixia@google.com>
Wed, 2 Feb 2022 16:40:33 +0000 (08:40 -0800)
committerBixia Zheng <bixia@google.com>
Thu, 3 Feb 2022 16:26:33 +0000 (08:26 -0800)
commit93c81f44cce802be7f2b723a96ed8e10db6101fb
tree1fc1a8804585319202207137685b861bb104a5b0
parent59b23c4aecccd8a0687c71b3afc55fd233b935c2
[mlir][taco] Uses sparse_tensor.new to read tensor input data from files.

Replace the Python implementation for reading tensor input data from files with
create_sparse_tensor that uses sparse_tensor.new.

The MLIR TNS format has two extra meta data lines. Add the extra meta data to a
test data file.

Implement TACO tensor methods evaluate and unpack.

Add unit tests.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D118803
mlir/test/Integration/Dialect/SparseTensor/taco/data/nell-2.tns
mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_io.py
mlir/test/Integration/Dialect/SparseTensor/taco/unit_test_tensor_io.py [new file with mode: 0644]