-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[mlir][linalg] Fix memory leak in pack-dynamic-inner-tile.mlir
#137589
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
Conversation
|
@llvm/pr-subscribers-mlir-linalg @llvm/pr-subscribers-mlir Author: Matthias Springer (matthias-springer) ChangesFull diff: https://github.com/llvm/llvm-project/pull/137589.diff 1 Files Affected:
diff --git a/mlir/test/Integration/Dialect/Linalg/CPU/pack-dynamic-inner-tile.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/pack-dynamic-inner-tile.mlir
index 7b410ccee9633..187d7b862604b 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/pack-dynamic-inner-tile.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/pack-dynamic-inner-tile.mlir
@@ -125,9 +125,13 @@ module @transforms attributes { transform.with_named_sequence } {
%bufferize = transform.bufferization.one_shot_bufferize %module
{bufferize_function_boundaries=true} : (!transform.any_op) -> !transform.any_op
- // 5. Canonicalize
+ // 5. Deallocate buffers.
%func_op_bufferized = transform.structured.match ops{["func.func"]} in %bufferize : (!transform.any_op) -> !transform.op<"func.func">
- transform.apply_patterns to %func_op_bufferized {
+ %func_op_deallocated = transform.apply_registered_pass "buffer-deallocation-pipeline" to %func_op_bufferized
+ : (!transform.op<"func.func">) -> !transform.op<"func.func">
+
+ // 6. Canonicalize
+ transform.apply_patterns to %func_op_deallocated {
transform.apply_patterns.canonicalization
} : !transform.op<"func.func">
|
banach-space
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, LGTM!
This fixes the test when running with ASAN
How do you enable ASAN? LLVM_USE_SANITIZER=memory?
|
Btw, the |
I can look into that if you want, sounds like a familiar issue. |
|
Feel free to take a took. But I think we're going to have to extend the buffer deallocation pass in some way (to make sure that we pick the correct insertion point for the dealloc op) |
…m#137589) This fixes the test when running with ASAN.
…m#137589) This fixes the test when running with ASAN.
This fixes the test when running with ASAN.