This is an archive of the discontinued LLVM Phabricator instance.

[mlir][memref] Fix layout map computation in inferRankReducedResultType
ClosedPublic

Authored by springerm on Jun 20 2022, 12:42 AM.

Diff Detail

Event Timeline

springerm created this revision.Jun 20 2022, 12:42 AM
springerm requested review of this revision.Jun 20 2022, 12:42 AM

This fixes https://github.com/google/iree/issues/9556.

We have no tests for inferRankReducedResultType. Should I add a C++ unit test for this?

jpienaar accepted this revision.Jun 20 2022, 9:00 AM

Thanks for quick fix.

This fixes https://github.com/google/iree/issues/9556.

We have no tests for inferRankReducedResultType. Should I add a C++ unit test for this?

Aren't these used during verification? E.g., could we test simply by having a couple of invalid ops that get flagged? If not, my preference would be a tester pass (that just runs infer and prints out) that way we can easily add tests and different configs.

This revision is now accepted and ready to land.Jun 20 2022, 9:00 AM

Aren't these used during verification? E.g., could we test simply by having a couple of invalid ops that get flagged? If not, my preference would be a tester pass (that just runs infer and prints out) that way we can easily add tests and different configs.

There are two inferRankReducedResultType overloads. The verifier executes only one of them. The other one is only used when building a new op with the C++ API.

springerm updated this revision to Diff 438582.Jun 21 2022, 1:04 AM

add test cases

This revision was landed with ongoing or failed builds.Jun 21 2022, 1:12 AM
This revision was automatically updated to reflect the committed changes.