This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] refactor sparsification and bufferization pass into proper TD pass
ClosedPublic

Authored by aartbik on Aug 17 2023, 2:22 PM.

Details

Summary

Registering the SparsificationAndBufferization into a proper TD pass
has the advantage that it can be invoked and tested in isolation. This
change also moves some bufferization specific set up from the pipeline
file into the pass file, keeping the logic more locally.

Diff Detail

Event Timeline

aartbik created this revision.Aug 17 2023, 2:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2023, 2:22 PM
aartbik requested review of this revision.Aug 17 2023, 2:22 PM
Peiming added inline comments.Aug 17 2023, 2:27 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparsificationAndBufferizationPass.cpp
22–24

Are these new header file intended (required by the generated file)?

Peiming accepted this revision.Aug 17 2023, 2:31 PM
This revision is now accepted and ready to land.Aug 17 2023, 2:31 PM
Peiming added inline comments.Aug 17 2023, 2:32 PM
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
376

super nit, maybe bufferization-and-sparsification? (that should be the order if I remembered correctly}

aartbik added inline comments.Aug 17 2023, 2:36 PM
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
376

ah, true, but the class is SparsificationAndBufferization

shall we do a general rename later (not to change the current diffs too much)

Peiming added inline comments.Aug 17 2023, 2:39 PM
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
376

Sure, not a blocker ;-)

aartbik marked an inline comment as done.Aug 17 2023, 3:43 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparsificationAndBufferizationPass.cpp
22–24

yeah due to registration that is now defined by TB code in the inc file

This revision was automatically updated to reflect the committed changes.
aartbik marked an inline comment as done.