This is an archive of the discontinued LLVM Phabricator instance.

[mlir][SparseTensor] Add a few tests for sparse vectorization
ClosedPublic

Authored by qcolombet on Dec 8 2022, 5:08 AM.

Details

Summary

These tests covers mulf, ori, and subi.

NFC

Note: I plan to add more tests to cover the other operators as well (div, add, xor, etc.) but I wanted to double check that the direction was okay first.

BTW, I may have found a bug in the sparsification pass. I found a case where it crashes, but maybe it's because my hand-generated IR is somehow invalid. See https://github.com/llvm/llvm-project/issues/59394 for more details.

Diff Detail

Event Timeline

qcolombet created this revision.Dec 8 2022, 5:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 5:08 AM
qcolombet requested review of this revision.Dec 8 2022, 5:08 AM
aartbik added inline comments.Dec 8 2022, 10:16 AM
mlir/test/Dialect/SparseTensor/vectorize_reduction.mlir
3

can we make this CHECK-ON/CHECK-OFF to make it more consistent with style in this dir?

364

wer -> we

qcolombet updated this revision to Diff 481619.Dec 9 2022, 6:16 AM
  • Prepend CHECK- to check prefixes.
qcolombet marked 2 inline comments as done.Dec 9 2022, 6:16 AM
qcolombet added inline comments.
mlir/test/Dialect/SparseTensor/vectorize_reduction.mlir
3

Sure thing!

364

Good catch

aartbik added inline comments.Dec 9 2022, 4:06 PM
mlir/test/Dialect/SparseTensor/vectorize_reduction.mlir
439

can you remove this part from the test now?

qcolombet marked 2 inline comments as done.Dec 9 2022, 4:17 PM
qcolombet added inline comments.
mlir/test/Dialect/SparseTensor/vectorize_reduction.mlir
439

Sure thing!
I’ll do that next week

  • Remove commented test
qcolombet marked an inline comment as done.Dec 12 2022, 12:49 AM
aartbik accepted this revision.Dec 14 2022, 9:11 AM
This revision is now accepted and ready to land.Dec 14 2022, 9:11 AM