This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] migrate sparse rewriting to sparse transformations pass
ClosedPublic

Authored by aartbik on Jul 15 2022, 4:49 PM.

Details

Summary

The rules in the linalg file were very specific to sparse tensors so will
find a better home under sparse tensor dialect than linalg dialect. Also
moved some rewriting from sparsification into this new "pre-rewriting" file.

Diff Detail

Event Timeline

aartbik created this revision.Jul 15 2022, 4:49 PM
aartbik requested review of this revision.Jul 15 2022, 4:49 PM
aartbik updated this revision to Diff 445160.Jul 15 2022, 4:52 PM

removed debug code

aartbik added inline comments.Jul 15 2022, 5:04 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
243

Note that enabling this rule again yields a bufferization allocation insertion that does not copy the output with the incoming zeros for the sparse_sampled_mm_fusion.mlir test, when the output is dense. We need to fix that before we can enable this rewriting.

springerm accepted this revision.Jul 18 2022, 2:33 AM
This revision is now accepted and ready to land.Jul 18 2022, 2:33 AM
aartbik updated this revision to Diff 445537.Jul 18 2022, 9:27 AM

rebased with main

This revision was landed with ongoing or failed builds.Jul 18 2022, 9:29 AM
This revision was automatically updated to reflect the committed changes.