[Mlir-commits] [mlir] [mlir] Canonicalization pattern for 'shape.shape_of' (PR #98531)
Suraj Sudhir
llvmlistbot at llvm.org
Thu Jul 11 19:53:49 PDT 2024
sjarus wrote:
Would it make sense to also add a LIT test that validates the canonicalization behavior you describe, i.e. :
> When 2 consecutive element-wise operations op1 and op2 with unranked inputs are lowered into such a pattern, the proposed canonicalization pattern fuses the last tensor.reshape from op1 with the first shape.shape_of from op2. CSE may then fuse both occurrences of shape.num_elements from op1 and op2.
It ought to serve as a guard against ineffective canonicalizations and also offer a descriptive use case within the test suite.
https://github.com/llvm/llvm-project/pull/98531
More information about the Mlir-commits
mailing list