Skip to content

Commit 0597644

Browse files
authored
[mlir][transform] replace original op to loop ops (#83537)
1 parent 79e8f29 commit 0597644

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2121,6 +2121,7 @@ DiagnosedSilenceableFailure transform::ConvertToLoopsOp::applyToOne(
21212121
scf::lowerToLoopsUsingSCFForOp(rewriter, target);
21222122
if (failed(loops))
21232123
return emitDefaultDefiniteFailure(target);
2124+
rewriter.eraseOp(target);
21242125
return DiagnosedSilenceableFailure::success();
21252126
}
21262127

mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module attributes {transform.with_named_sequence} {
3333
// CHECK: %[[MULF:.+]] = arith.mulf %[[LHS]], %[[RHS]]
3434
// CHECK: %[[ADDF:.+]] = arith.addf %[[OUT]], %[[MULF]]
3535
// CHECK: memref.store %[[ADDF]], %[[ARG2]][%[[IV0]], %[[IV1]]]
36+
// CHECK-NOT: linalg.matmul ins(%arg0, %arg1 : memref<?x?xf32>, memref<?x?xf32>)
3637

3738
// -----
3839

0 commit comments

Comments
 (0)