This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] avoid sorting when unnecessary when convert sparse tensors.
ClosedPublic

Authored by Peiming on Dec 9 2022, 3:21 PM.

Diff Detail

Event Timeline

Peiming created this revision.Dec 9 2022, 3:21 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Dec 9 2022, 3:21 PM
Peiming updated this revision to Diff 481764.Dec 9 2022, 3:24 PM

minor fixes.

aartbik accepted this revision.Dec 9 2022, 3:52 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
52

can you please write this in the same style as above

if (auto enc = getSparseTensorEncoding(rtp))) {

...

}
return true

This revision is now accepted and ready to land.Dec 9 2022, 3:52 PM
Peiming updated this revision to Diff 481773.Dec 9 2022, 4:00 PM

address comments.

Peiming marked an inline comment as done.Dec 9 2022, 4:00 PM
aartbik accepted this revision.Dec 9 2022, 4:12 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
52

Yeah, reads much easier, thanks!

Peiming updated this revision to Diff 481777.Dec 9 2022, 4:19 PM

remove redundant condition.

Peiming updated this revision to Diff 481778.Dec 9 2022, 4:22 PM

minor fix.

aartbik accepted this revision.Dec 9 2022, 4:23 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
53

and it keeps getting better. ship it before no code is left! ;-)

This revision was landed with ongoing or failed builds.Dec 9 2022, 4:24 PM
This revision was automatically updated to reflect the committed changes.