This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] start a sparse codegen conversion pass
ClosedPublic

Authored by aartbik on Aug 26 2022, 3:27 PM.

Details

Summary

This new pass provides an alternative to the current conversion pass
that converts sparse tensor types and sparse primitives to opaque pointers
and calls into a runtime support library. This pass will map sparse tensor
types to actual data structures and primitives to actual code. In the long
run, this new pass will remove our dependence on the support library, avoid
the need to link in fully templated and expanded code, and provide much better
opportunities for optimization on the generated code.

Diff Detail

Event Timeline

aartbik created this revision.Aug 26 2022, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2022, 3:27 PM
aartbik requested review of this revision.Aug 26 2022, 3:27 PM
Peiming added inline comments.Aug 29 2022, 9:04 AM
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
126

Should we also differentiate the summary in sparse-tensor-codegen with sparse-tensor-conversion?

"Apply conversion rules to sparse tensor primitives and types with the use of a runtime library"
"Apply conversion rules to sparse tensor primitives and types using directly generated code "

Is it the help message that will be shown with mlir-opt -help?

aartbik marked an inline comment as done.Aug 29 2022, 9:13 AM
aartbik added inline comments.
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
126

Yeah, good suggestion!

aartbik updated this revision to Diff 456381.Aug 29 2022, 9:33 AM
aartbik marked an inline comment as done.

addressed comment

Peiming accepted this revision.Aug 29 2022, 9:35 AM
This revision is now accepted and ready to land.Aug 29 2022, 9:35 AM
This revision was landed with ongoing or failed builds.Aug 29 2022, 9:39 AM
This revision was automatically updated to reflect the committed changes.