This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] make fusion for SDDMM more robust
ClosedPublic

Authored by aartbik on Dec 6 2022, 1:24 PM.

Diff Detail

Event Timeline

aartbik created this revision.Dec 6 2022, 1:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 6 2022, 1:24 PM
aartbik requested review of this revision.Dec 6 2022, 1:24 PM
Peiming accepted this revision.Dec 6 2022, 1:39 PM
Peiming added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
62

Just out of curiosity, m_Zero matches Dense<0> too?

This revision is now accepted and ready to land.Dec 6 2022, 1:39 PM
aartbik marked an inline comment as done.Dec 6 2022, 2:20 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
62

Yes, it is pretty advanced in matching! So in this case a full tensor of zero's matches it too.

Note that the test is really the same as parse_sddmm.mlir but without the --test-tensor-copy-insertion pass, which means the zero is not converted to a alloc + copy zero yet. But by testing both now, we ensure that our fusion is less brittle for such changes....

This revision was landed with ongoing or failed builds.Dec 6 2022, 2:32 PM
This revision was automatically updated to reflect the committed changes.
aartbik marked an inline comment as done.