[mlir][taco] Use sparse_tensor.out to write sparse tensors to files.
Add a Python method, output_sparse_tensor, to use sparse_tensor.out to write a sparse tensor value to a file. Modify the method that evaluates a tensor expression to return a pointer of the MLIR sparse tensor for the result to delay the extraction of the coordinates and non-zero values. Implement the Tensor to_file method to evaluate the tensor assignment and write the result to a file. Add unit tests. Modify test golden files to reflect the change that TNS outputs now have a comment line and two meta data lines. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D118956
Loading
Please register or sign in to comment