File tree 1 file changed +10
-0
lines changed
mlir/lib/Dialect/Linalg/Transforms
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -974,6 +974,11 @@ class FoldPadWithProducerReshapeOpByExpansion
974
974
if (!reshapeOp->hasOneUse ())
975
975
return failure ();
976
976
977
+ if (!controlFoldingReshapes (&padOp.getSourceMutable ())) {
978
+ return rewriter.notifyMatchFailure (padOp,
979
+ " fusion blocked by control function" );
980
+ }
981
+
977
982
ArrayRef<int64_t > low = padOp.getStaticLow ();
978
983
ArrayRef<int64_t > high = padOp.getStaticHigh ();
979
984
SmallVector<ReassociationIndices> reassociations =
@@ -1778,6 +1783,11 @@ class FoldPadWithProducerReshapeOpByCollapsing
1778
1783
if (!reshapeOp->hasOneUse ())
1779
1784
return failure ();
1780
1785
1786
+ if (!controlFoldingReshapes (&padOp.getSourceMutable ())) {
1787
+ return rewriter.notifyMatchFailure (padOp,
1788
+ " fusion blocked by control function" );
1789
+ }
1790
+
1781
1791
ArrayRef<int64_t > low = padOp.getStaticLow ();
1782
1792
ArrayRef<int64_t > high = padOp.getStaticHigh ();
1783
1793
SmallVector<ReassociationIndices> reassociations =
You can’t perform that action at this time.
0 commit comments