This is an archive of the discontinued LLVM Phabricator instance.

[mlir][taco] Add a utility to create an MLIR sparse tensor from a file.
ClosedPublic

Authored by bixia on Jan 28 2022, 10:57 AM.

Details

Summary

Move the functions that retrieve the supporting C library, compile an MLIR
module and build a JIT execution engine to mlir_pytaco_utils.

Add a function to create an MLIR sparse tensor from a file and return a pointer
to the MLIR sparse tensor as well as the shape of the sparse tensor.

Add unit tests.

Diff Detail

Event Timeline

bixia created this revision.Jan 28 2022, 10:57 AM
bixia requested review of this revision.Jan 28 2022, 10:57 AM
aartbik accepted this revision.Feb 1 2022, 2:06 PM
aartbik added inline comments.
mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
157

note that this can now be the following, using Wren's new pipeline

pipeline = f"builtin.module(sparse-compiler{{{opt}}})"

This revision is now accepted and ready to land.Feb 1 2022, 2:06 PM
bixia added inline comments.Feb 1 2022, 3:35 PM
mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
157

Will delay this change until https://reviews.llvm.org/D118658 is merged.

bixia updated this revision to Diff 405112.Feb 1 2022, 3:41 PM

Rebase.

This revision was landed with ongoing or failed builds.Feb 1 2022, 3:44 PM
This revision was automatically updated to reflect the committed changes.