This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Reorganize tests for the sparse_tensor.convert operator.
ClosedPublic

Authored by bixia on Oct 13 2022, 2:44 PM.

Details

Summary

Rename conversion_sparse2dense.mlir and conversion_sparse2sparse.mlir to
convert_sparse2dense.mlir/sparse2sparse.mlir.

Add convert_dense2sparse.mlir. Move the sparse_tensor.convert operator tests
out of conversion.mlir.

Diff Detail

Event Timeline

bixia created this revision.Oct 13 2022, 2:44 PM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Oct 13 2022, 2:44 PM

Why this renaming?

Note that the "conversion" prefix in the file applied to SparseTensorConversion, just like the "codegen" prefix appplies to SparseTensorCodegen.
This renaming seems to use "convert" to make it specific to the op? What are your plans for codegen vs conversion?

bixia added a comment.Oct 14 2022, 1:44 PM

I was thinking to make it like https://github.com/llvm/llvm-project/blob/main/mlir/test/Dialect/SparseTensor/sparse_reshape.mlir, use the same file different run option for testing the conversion and codegen path.

aartbik accepted this revision.Oct 14 2022, 1:59 PM
This revision is now accepted and ready to land.Oct 14 2022, 1:59 PM
mlir/test/Dialect/SparseTensor/convert_dense2sparse.mlir