This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] admit un-sparsifiable operations if all its operands are loaded from dense input
ClosedPublic

Authored by Peiming on Jun 28 2023, 1:20 PM.

Diff Detail

Event Timeline

Peiming created this revision.Jun 28 2023, 1:20 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Jun 28 2023, 1:20 PM
Peiming updated this revision to Diff 535504.Jun 28 2023, 1:34 PM

add check test.

aartbik added inline comments.Jun 28 2023, 1:59 PM
mlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
164

For consistency,put this on same line

kDenseOp // special category for all dense ops

651

document the new api, what does the bool mean

mlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
95

can ... have

(not can .. has)

524

rather than always accepting this, can we simply add kDenseOp as special case and skip invalidId only on second?
I feel that otherwise we are removing a lot of safety from the others

545

same here?

885–891

this should be a case for kDenseOp only (or possibly an assert on that when invalid)

1464

we are dealing with an operation that is ...

Peiming updated this revision to Diff 535522.Jun 28 2023, 2:11 PM
Peiming marked 6 inline comments as done.

address comments.

Peiming marked an inline comment as done.Jun 28 2023, 2:12 PM
aartbik accepted this revision.Jun 28 2023, 2:20 PM
This revision is now accepted and ready to land.Jun 28 2023, 2:20 PM
This revision was landed with ongoing or failed builds.Jun 28 2023, 2:28 PM
This revision was automatically updated to reflect the committed changes.