llvm-project
af2e2468 - [mlir] Add missing pad reshape propagation patterns (#168888)

Commit
33 days ago
[mlir] Add missing pad reshape propagation patterns (#168888) The existing `FoldPadWithProducerReshapeOpByExpansion` and `FoldPadWithProducerReshapeOpByCollapsing` patterns did not cover all reshape propagation cases, because they only consider cases where the pad op is the consumer operation. This PR adds 2 new patterns to cover the cases where the pad op is the producer operation, which completes the propagation pattern set for pad op with expand_shape and collapse_shape. Note for integration: This PR also removes the single user restriction for the `FoldPadWithProducerReshapeOpByExpansion` and `FoldPadWithProducerReshapeOpByCollapsing` patterns, which leaves more control to the users of the pattern. If this constraint is needed, then it should be added to the control function for these patterns. --------- Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Author
Parents
Loading