[Mlir-commits] [mlir] d146b51 - [mlir][sparse][nfc] Fix memory leak in sparse sampled matmul integration test

Rajas Vanjape llvmlistbot at llvm.org
Mon Jul 25 01:55:42 PDT 2022


Author: Rajas Vanjape
Date: 2022-07-25T08:55:12Z
New Revision: d146b51162f2c33e311d752e0ba60ed8d06c235f

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

LOG: [mlir][sparse][nfc] Fix memory leak in sparse sampled matmul integration test

https://reviews.llvm.org/D130023 added a memory leak in sparse_sampled_matmul.mlir
This diff fixes the memory leak.

Testing: Ran integration tests after building with -DLLVM_USE_SANITIZER=Address flag.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D130428

Added: 
    

Modified: 
    mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir

Removed: 
    


################################################################################
diff  --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir
index 3a3b8470d4ca1..1b85c1b8e075a 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir
@@ -78,7 +78,7 @@ module {
     %x0 = bufferization.alloc_tensor(%c5, %c5) : tensor<?x?xf32>
     %a, %b, %x = scf.for %i = %c0 to %c5 step %c1 iter_args(%a1 = %a0, %b1 = %b0, %x1 = %x0)
         -> (tensor<?x?xf32>, tensor<?x?xf32>, tensor<?x?xf32>) {
-      %x2 = scf.for %j = %c0 to %c5 step %c1 iter_args(%x3 = %x0) -> (tensor<?x?xf32>) {
+      %x2 = scf.for %j = %c0 to %c5 step %c1 iter_args(%x3 = %x1) -> (tensor<?x?xf32>) {
         %x4 = tensor.insert %d0 into %x3[%i, %j] : tensor<?x?xf32>
         scf.yield %x4 : tensor<?x?xf32>
       }


        


More information about the Mlir-commits mailing list