This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse][capi][python] add sparse tensor passes
ClosedPublic

Authored by aartbik on May 12 2021, 1:17 PM.

Details

Summary

First set of "boilerplate" to get sparse tensor
passes available through CAPI and Python.

Diff Detail

Event Timeline

aartbik created this revision.May 12 2021, 1:17 PM
aartbik requested review of this revision.May 12 2021, 1:17 PM
stellaraccident accepted this revision.May 12 2021, 2:37 PM
stellaraccident added inline comments.
mlir/test/python/dialects/sparse_tensor/passes.py
15

Generally, add a "return f" to the above run() function. Then use a decorator like:

@run
def testSparseTensorPass():

And put your CHECK-LABEL above the @run and the CHECK above the print.

This revision is now accepted and ready to land.May 12 2021, 2:37 PM
aartbik marked an inline comment as done.May 12 2021, 2:46 PM
aartbik added inline comments.
mlir/test/python/dialects/sparse_tensor/passes.py
15

Ah, I did not see that style in your test file. Changed.
Thanks!

aartbik updated this revision to Diff 344969.May 12 2021, 3:01 PM
aartbik marked an inline comment as done.

use @run

This revision was automatically updated to reflect the committed changes.