This is an archive of the discontinued LLVM Phabricator instance.

Upstream MLIR PyTACO implementation.
ClosedPublic

Authored by bixia on Jan 12 2022, 9:35 AM.

Details

Summary

Add TACO tests to test/Integration/Dialect/SparseTensor/taco. Add the MLIR
PyTACO implementation as tools under the directory.

Diff Detail

Event Timeline

bixia created this revision.Jan 12 2022, 9:35 AM
bixia requested review of this revision.Jan 12 2022, 9:35 AM
bixia updated this revision to Diff 399364.Jan 12 2022, 9:53 AM

Add license note.

Shall we add a README to the taco directory with some background information, i.e. link to TACO website, and brief explanation of PyTACO?
A README.md still shows up more prominent when looking at the source tree under e.g. github

mlir/test/Integration/Dialect/SparseTensor/taco/MTTKRP_test.py
4–6

There are quite a few modifications around the core. Can you move this comment to the exact place where we use the original TACO part, so

<code>

This PyTACO part is taken from the TACO open-source project.

PyTaco

<code>

32–35

please do not use commented out code; the test should run as is, and the comment should reflect what is done; if we want to test the other cases too, we should add more tests

mlir/test/Integration/Dialect/SparseTensor/taco/SpMV_test.py
4

same, make it very specific what kernel part is from PyTACO example

33–36

remove commented out code

mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
23

empty line after from

bixia updated this revision to Diff 399757.Jan 13 2022, 1:03 PM
bixia marked 4 inline comments as done.

Address review feedback.

mlir/test/Integration/Dialect/SparseTensor/taco/MTTKRP_test.py
32–35

Remove this comment.

bixia updated this revision to Diff 399773.Jan 13 2022, 1:37 PM

Add README.md.

bixia updated this revision to Diff 399778.Jan 13 2022, 1:47 PM

Format README.md.

aartbik accepted this revision.Jan 13 2022, 2:02 PM

Few last nits.

Also, as some background for others, indeed this code is "upstreamed" so I have seen most of the python bridge before.
Others may want to chime in on style or content, but even though it is a large drop, it has been reviewed earlier.

mlir/test/Integration/Dialect/SparseTensor/taco/MTTKRP_test.py
30

Modify - >This line has been modified from the original program to ....
?

mlir/test/Integration/Dialect/SparseTensor/taco/README.md
12 ↗(On Diff #399778)

machine code -> an executable, or runnable code or something like that?

mlir/test/Integration/Dialect/SparseTensor/taco/SpMV_test.py
31

Modify - >This line has been modified from the original program to ....
?

mlir/test/Integration/Dialect/SparseTensor/taco/simple_tensor_algebra_test.py
29

maybe empty line before this CHECK

This revision is now accepted and ready to land.Jan 13 2022, 2:02 PM
zero9178 added inline comments.
mlir/test/Integration/Dialect/SparseTensor/taco/README.md
8 ↗(On Diff #399778)
bixia updated this revision to Diff 399796.Jan 13 2022, 2:38 PM
bixia marked 4 inline comments as done.

Address review comments.

bixia added inline comments.Jan 13 2022, 2:43 PM
mlir/test/Integration/Dialect/SparseTensor/taco/README.md
12 ↗(On Diff #399778)

machine code -> an executable

This revision was landed with ongoing or failed builds.Jan 13 2022, 2:50 PM
This revision was automatically updated to reflect the committed changes.