[Mlir-commits] [mlir] f7e7064 - [mlir][SVE] Fix memory leaks in integration tests (#86488)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Mar 25 07:09:56 PDT 2024


Author: Andrzej WarzyƄski
Date: 2024-03-25T14:09:52Z
New Revision: f7e7064992ced7795e66ab90f9a7c3195b6fa230

URL: https://github.com/llvm/llvm-project/commit/f7e7064992ced7795e66ab90f9a7c3195b6fa230
DIFF: https://github.com/llvm/llvm-project/commit/f7e7064992ced7795e66ab90f9a7c3195b6fa230.diff

LOG: [mlir][SVE] Fix memory leaks in integration tests (#86488)

Buffers are no longer deallocated by One-Shot Bufferize - this is now
done by a separate buffer deallocation pass.

In order to see the leaks in SVE integration tests, use the following
CMake flags (enables the address sanitizer and SVE integration tests):

    -DLLVM_USE_SANITIZER="Address"
    -DMLIR_INCLUDE_INTEGRATION_TESTS=On
    -DMLIR_RUN_ARM_SVE_TESTS=On

Follow-up for #85366

Added: 
    

Modified: 
    mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
    mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/matmul.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
index a5b2ad1605cd10..44b555c8c3ad5e 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/fill-1d.mlir
@@ -1,4 +1,4 @@
-// RUN: mlir-opt %s -transform-interpreter -test-transform-dialect-erase-schedule -lower-vector-mask -one-shot-bufferize -test-lower-to-llvm | \
+// RUN: mlir-opt %s -transform-interpreter -test-transform-dialect-erase-schedule -lower-vector-mask -one-shot-bufferize -buffer-deallocation-pipeline -test-lower-to-llvm | \
 // RUN: %mcr_aarch64_cmd -e=entry -entry-point-result=void --march=aarch64 --mattr="+sve" -shared-libs=%mlir_runner_utils,%mlir_c_runner_utils | \
 // RUN: FileCheck %s
 

diff  --git a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/matmul.mlir b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/matmul.mlir
index 51a0c8f7c945aa..68e474fe5cefeb 100644
--- a/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/matmul.mlir
+++ b/mlir/test/Integration/Dialect/Linalg/CPU/ArmSVE/matmul.mlir
@@ -1,6 +1,6 @@
 // DEFINE: %{compile} =  mlir-opt %s \
 // DEFINE:    -transform-interpreter -test-transform-dialect-erase-schedule \
-// DEFINE:    -one-shot-bufferize -func-bufferize -cse -canonicalize -convert-vector-to-scf -arm-sve-legalize-vector-storage \
+// DEFINE:    -one-shot-bufferize="bufferize-function-boundaries" -buffer-deallocation-pipeline -cse -canonicalize -convert-vector-to-scf -arm-sve-legalize-vector-storage \
 // DEFINE:    -convert-vector-to-llvm="enable-arm-sve" -test-lower-to-llvm -o %t
 // DEFINE: %{entry_point} = matmul_f32
 // DEFINE: %{run} = %mcr_aarch64_cmd %t -e %{entry_point} -entry-point-result=void --march=aarch64 --mattr="+sve"\


        


More information about the Mlir-commits mailing list