Page MenuHomePhabricator

[mlir][sparse] add folding to sparse_tensor.convert
ClosedPublic

Authored by aartbik on Sep 9 2021, 2:39 PM.

Details

Summary

folds conversion between identical types (with tests)

Diff Detail

Event Timeline

aartbik created this revision.Sep 9 2021, 2:39 PM
aartbik requested review of this revision.Sep 9 2021, 2:39 PM
aartbik updated this revision to Diff 371725.Sep 9 2021, 2:41 PM

rebase with diff in main

ThomasRaoux accepted this revision.Sep 9 2021, 2:45 PM
ThomasRaoux added inline comments.
mlir/test/Dialect/SparseTensor/conversion.mlir
115–121

this looks like the same test as in fold.mlir? Is that on purpose?

This revision is now accepted and ready to land.Sep 9 2021, 2:45 PM
aartbik marked an inline comment as done.Sep 9 2021, 2:48 PM
aartbik added inline comments.
mlir/test/Dialect/SparseTensor/conversion.mlir
115–121

Almost, but it has also converted the type into the opaque pointer! Just to make sure we don't fold "too late".

This revision was automatically updated to reflect the committed changes.
aartbik marked an inline comment as done.