[mlir][Linalg] Fix incorrect logic in deciding when to fuse reshapes by linearization.
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. Differential Revision: https://reviews.llvm.org/D104970
Loading
Please sign in to comment