This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Fix a bug in rewriting dense2dense convert op.
ClosedPublic

Authored by bixia on Nov 11 2022, 7:51 AM.

Details

Summary

Permutation wasn't handled correctly. Add a test for the rewriting.

Extend an integration test to run with enable_runtime_library=false to
also test the rewriting.

Diff Detail

Event Timeline

bixia created this revision.Nov 11 2022, 7:51 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Nov 11 2022, 7:51 AM
Peiming accepted this revision.Nov 11 2022, 9:03 AM
This revision is now accepted and ready to land.Nov 11 2022, 9:03 AM
This revision was landed with ongoing or failed builds.Nov 11 2022, 9:12 AM
This revision was automatically updated to reflect the committed changes.

LGTM with two nits

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
650

I would move this to L654 (i.e. after the comment describing what is done)

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sorted_coo.mlir
8

Can you put a


Do the same run, but now with direct IR generation.
//

for the time being (until we introduce an automated way to run all tests in both modes)