This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Fix incorrect logic in deciding when to fuse reshapes by linearization.
ClosedPublic

Authored by mravishankar on Jun 25 2021, 11:13 PM.

Details

Summary

Fusion by linearization should not happen when

  • The reshape is expanding and it is a consumer
  • The reshape is collapsing and is a producer.

The bug introduced in this logic by some recent refactoring resulted
in a crash.
To enforce this (negetive) use case, add a test that reproduces the
error and verifies the fix.

Diff Detail

Event Timeline

mravishankar created this revision.Jun 25 2021, 11:13 PM
mravishankar requested review of this revision.Jun 25 2021, 11:13 PM
ThomasRaoux added inline comments.
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
1492 ↗(On Diff #354648)

Looks like this file was uploaded by mistake?

ThomasRaoux accepted this revision.Jul 2 2021, 9:41 AM
This revision is now accepted and ready to land.Jul 2 2021, 9:41 AM

Rebase and drop unrelated BUILD file change.