This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Improve the rewriting for dense-to-sparse conversion.
ClosedPublic

Authored by bixia on Jan 9 2023, 5:04 PM.

Diff Detail

Event Timeline

bixia created this revision.Jan 9 2023, 5:04 PM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Jan 9 2023, 5:04 PM
Peiming added inline comments.Jan 10 2023, 9:26 AM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
699

Can this constraint be further released? You do not need identity ordering for dense tensors (they can be accessed in random order).

But of course, foreachOp does not support this, so maybe this is a future work?

Peiming added inline comments.Jan 10 2023, 9:29 AM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
719

This brace should be removed per style guide.

bixia updated this revision to Diff 487856.Jan 10 2023, 9:50 AM
bixia marked an inline comment as done.

Removed unnecessary {}. Added a TODO.

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
699

Right, I add a TODO and will work on that.

Peiming accepted this revision.Jan 10 2023, 11:31 AM
This revision is now accepted and ready to land.Jan 10 2023, 11:31 AM