[Mlir-commits] [mlir] 033b9f2 - [mlir][sparse]Replace redundant indices checks in sparse_tensor.conversion

Anlun Xu llvmlistbot at llvm.org
Tue Jul 12 21:04:54 PDT 2022


Author: Anlun Xu
Date: 2022-07-12T21:04:31-07:00
New Revision: 033b9f21b00bdb4554078b9c15e67716cd3fad84

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

LOG: [mlir][sparse]Replace redundant indices checks in sparse_tensor.conversion

Replace some redundant indices checks with the correct checks

Reviewed By: aartbik

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
index 3bcff246167bc..9430bdf992429 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
+++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
@@ -134,12 +134,12 @@ module {
     // CHECK-NEXT: ( 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
     // CHECK-NEXT: ( 0, 1, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
     // CHECK-NEXT: ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0 )
-    // CHECK-NEXT: ( 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
-    // CHECK-NEXT: ( 0, 1, 2, 0, 1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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
     // CHECK-NEXT: ( 0, 1, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )
     // CHECK-NEXT: ( 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0 )
@@ -211,12 +211,12 @@ module {
     call @dumpidx(%v10) : (memref<?xindex>) -> ()
     call @dumpidx(%v11) : (memref<?xindex>) -> ()
     call @dumpidx(%v12) : (memref<?xindex>) -> ()
-    call @dumpidx(%v10) : (memref<?xindex>) -> ()
-    call @dumpidx(%v11) : (memref<?xindex>) -> ()
-    call @dumpidx(%v12) : (memref<?xindex>) -> ()
-    call @dumpidx(%v10) : (memref<?xindex>) -> ()
-    call @dumpidx(%v11) : (memref<?xindex>) -> ()
-    call @dumpidx(%v12) : (memref<?xindex>) -> ()
+    call @dumpidx(%v20) : (memref<?xindex>) -> ()
+    call @dumpidx(%v21) : (memref<?xindex>) -> ()
+    call @dumpidx(%v22) : (memref<?xindex>) -> ()
+    call @dumpidx(%v30) : (memref<?xindex>) -> ()
+    call @dumpidx(%v31) : (memref<?xindex>) -> ()
+    call @dumpidx(%v32) : (memref<?xindex>) -> ()
 
     call @dumpidx(%a10) : (memref<?xindex>) -> ()
     call @dumpidx(%a11) : (memref<?xindex>) -> ()


        


More information about the Mlir-commits mailing list