This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] deduplicate non-unique coordinates when coiterating collapsed COO tensors.
ClosedPublic

Authored by Peiming on Mar 7 2023, 4:26 PM.

Diff Detail

Event Timeline

Peiming created this revision.Mar 7 2023, 4:26 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Mar 7 2023, 4:26 PM
Peiming updated this revision to Diff 503189.Mar 7 2023, 4:50 PM

fix leaks

aartbik added inline comments.Mar 9 2023, 9:30 AM
mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
417

still good to store this in a new local with an intuitive name (since you use it twice *AND* the name gives meaning)

auto fdim = reassoc.front();

or something like that

740

only forward

749

maybe not now, but this method has become quite a big chunk of code which huge blocks

perhaps moving these blocks into small util methods will help keeping this readable
*and* understanding the blocks in isolation a bit better

Peiming updated this revision to Diff 503818.Mar 9 2023, 9:57 AM
Peiming marked 3 inline comments as done.

address comments.

aartbik accepted this revision.Mar 9 2023, 10:00 AM
This revision is now accepted and ready to land.Mar 9 2023, 10:00 AM
This revision was landed with ongoing or failed builds.Mar 9 2023, 10:15 AM
This revision was automatically updated to reflect the committed changes.