This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] add test for DimOp folding
ClosedPublic

Authored by aartbik on Aug 20 2021, 9:57 AM.

Details

Summary

Folding in the MLIR uses the order of the type directly
but folding in the underlying implementation must take
the dim ordering into account. These tests clarify that
behavior and verify it is done right.

Diff Detail

Event Timeline

aartbik created this revision.Aug 20 2021, 9:57 AM
aartbik requested review of this revision.Aug 20 2021, 9:57 AM
bixia added inline comments.Aug 20 2021, 10:17 AM
mlir/test/Dialect/SparseTensor/conversion.mlir
66

can we make the irrelevant dims unknown, such as ?x20x?xf64?

aartbik marked an inline comment as done.Aug 20 2021, 10:50 AM
aartbik added inline comments.
mlir/test/Dialect/SparseTensor/conversion.mlir
66

I could, but why do you think that is better? If you want, I can add another test with that.

bixia accepted this revision.Aug 20 2021, 10:54 AM
bixia added inline comments.
mlir/test/Dialect/SparseTensor/conversion.mlir
66

10x20x30 is a static shape but ?x20x? is a dynamic shape.

This revision is now accepted and ready to land.Aug 20 2021, 10:54 AM
aartbik updated this revision to Diff 367835.Aug 20 2021, 10:59 AM
aartbik marked an inline comment as done.

rebase with main

This revision was landed with ongoing or failed builds.Aug 20 2021, 11:24 AM
This revision was automatically updated to reflect the committed changes.