-
Notifications
You must be signed in to change notification settings - Fork 11.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mlir][transform] replace original op to loop ops #83537
Merged
HerrCai0907
merged 1 commit into
llvm:main
from
HerrCai0907:83252-mlir-transformstructuredconvert_to_loops-does-not-delete-target-op
Mar 4, 2024
Merged
[mlir][transform] replace original op to loop ops #83537
HerrCai0907
merged 1 commit into
llvm:main
from
HerrCai0907:83252-mlir-transformstructuredconvert_to_loops-does-not-delete-target-op
Mar 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConvertToLoopsOp should erase original op Fixes: llvm#83252
@llvm/pr-subscribers-mlir-linalg @llvm/pr-subscribers-mlir Author: Congcong Cai (HerrCai0907) ChangesConvertToLoopsOp should erase original op Full diff: https://github.com/llvm/llvm-project/pull/83537.diff 2 Files Affected:
diff --git a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
index ef9cd5561665fc..0ac0a89dcc76ae 100644
--- a/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+++ b/mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
@@ -2121,6 +2121,7 @@ DiagnosedSilenceableFailure transform::ConvertToLoopsOp::applyToOne(
scf::lowerToLoopsUsingSCFForOp(rewriter, target);
if (failed(loops))
return emitDefaultDefiniteFailure(target);
+ rewriter.eraseOp(target);
return DiagnosedSilenceableFailure::success();
}
diff --git a/mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir b/mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir
index 7969de0d456bb6..1b2c553b25ded0 100644
--- a/mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir
+++ b/mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir
@@ -33,6 +33,7 @@ module attributes {transform.with_named_sequence} {
// CHECK: %[[MULF:.+]] = arith.mulf %[[LHS]], %[[RHS]]
// CHECK: %[[ADDF:.+]] = arith.addf %[[OUT]], %[[MULF]]
// CHECK: memref.store %[[ADDF]], %[[ARG2]][%[[IV0]], %[[IV1]]]
+// CHECK-NOT: linalg.matmul ins(%arg0, %arg1 : memref<?x?xf32>, memref<?x?xf32>)
// -----
|
hanhanW
approved these changes
Mar 1, 2024
HerrCai0907
deleted the
83252-mlir-transformstructuredconvert_to_loops-does-not-delete-target-op
branch
March 4, 2024 19:58
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Mar 20, 2024
(cherry picked from commit 0597644)
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Mar 29, 2024
(cherry picked from commit 0597644)
tstellar
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Apr 1, 2024
(cherry picked from commit 0597644)
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ConvertToLoopsOp should erase original op
Fixes: #83252