This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse][taco] Use the SparseCompiler from python/tools.
ClosedPublic

Authored by bixia on Apr 13 2022, 11:03 AM.

Details

Summary

Copy the implementation of SparseCompiler from python/tools to taco/tools until we have a common place to install it. Modify TACO to use this SparseCompiler for compilation and jitting.

Diff Detail

Event Timeline

bixia created this revision.Apr 13 2022, 11:03 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Apr 13 2022, 11:03 AM
bixia retitled this revision from [mlir][sparse][taco] Use the sparse_compiler from python/tools. to WIP [mlir][sparse][taco] Use the sparse_compiler from python/tools..Apr 13 2022, 11:28 AM
bixia retitled this revision from WIP [mlir][sparse][taco] Use the sparse_compiler from python/tools. to [mlir][sparse][taco] Use the sparse_compiler from python/tools..Apr 13 2022, 11:46 AM

Thanks for following up so quickly with this!

mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
21–25

I am also okay if you simply copy the sparse_compiler.py into mlir_sparse_compiler.mlir of this directory to avoid all this ugliness. It is not that much code duplication, and makes this directory self contained.

197

shall we only set up a sparse_compiler object once, and reuse it between all invocations?
wdyt?

bixia updated this revision to Diff 422898.Apr 14 2022, 9:47 AM

Address review comment.

bixia retitled this revision from [mlir][sparse][taco] Use the sparse_compiler from python/tools. to [mlir][sparse][taco] Use the SparseCompiler from python/tools..Apr 14 2022, 9:48 AM
bixia edited the summary of this revision. (Show Details)
bixia updated this revision to Diff 422899.Apr 14 2022, 9:50 AM

Removed an import line.

bixia marked 2 inline comments as done.Apr 14 2022, 9:51 AM
aartbik accepted this revision.Apr 14 2022, 12:00 PM
This revision is now accepted and ready to land.Apr 14 2022, 12:00 PM
This revision was landed with ongoing or failed builds.Apr 14 2022, 3:17 PM
This revision was automatically updated to reflect the committed changes.