[Mlir-commits] [mlir] dfcb671 - [mlir][sparse] Fix checks in a test.
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Dec 8 08:49:00 PST 2022
Author: bixia1
Date: 2022-12-08T08:48:55-08:00
New Revision: dfcb67190a9ec5dc4f6a2efd9407b9c83bfe567b
URL: https://github.com/llvm/llvm-project/commit/dfcb67190a9ec5dc4f6a2efd9407b9c83bfe567b
DIFF: https://github.com/llvm/llvm-project/commit/dfcb67190a9ec5dc4f6a2efd9407b9c83bfe567b.diff
LOG: [mlir][sparse] Fix checks in a test.
Reviewed By: Peiming
Differential Revision: https://reviews.llvm.org/D139636
Added:
Modified:
mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir
Removed:
################################################################################
diff --git a/mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir b/mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir
index 496d5941580cd..3b975cce5f3c7 100644
--- a/mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir
+++ b/mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir
@@ -25,7 +25,7 @@
dimLevelType = ["compressed"]
}>
-#SortedWRT3D = #sparse_tensor.encoding<{
+#SortedCOO3D = #sparse_tensor.encoding<{
dimLevelType = [ "compressed-nu", "singleton-nu", "singleton" ]
}>
@@ -169,29 +169,29 @@ func.func @sparse_convert_singleton(%arg0: tensor<?xf32, #SparseSingleton64>) ->
return %0 : tensor<?xf32, #SparseSingleton32>
}
-// CHECK-WRT-LABEL: func.func @sparse_convert_permuted(
-// CHECK-WRT-SAME: %[[COO:.*]]:
-// CHECK-WRT-DAG: %[[C0:.*]] = arith.constant 0 : index
-// CHECK-WRT-DAG: %[[C1:.*]] = arith.constant 1 : index
-// CHECK-WRT-DAG: %[[C2:.*]] = arith.constant 2 : index
-// CHECK-WRT: %[[D0:.*]] = tensor.dim %[[COO]], %[[C0]]
-// CHECK-WRT: %[[D1:.*]] = tensor.dim %[[COO]], %[[C1]]
-// CHECK-WRT: %[[D2:.*]] = tensor.dim %[[COO]], %[[C2]]
-// CHECK-WRT: %[[I0:.*]] = sparse_tensor.indices %[[COO]] {dimension = 0 : index}
-// CHECK-WRT: %[[I1:.*]] = sparse_tensor.indices %[[COO]] {dimension = 1 : index}
-// CHECK-WRT: %[[I2:.*]] = sparse_tensor.indices %[[COO]] {dimension = 2 : index}
-// CHECK-WRT: %[[NNZ:.*]] = sparse_tensor.number_of_entries %[[COO]]
-// CHECK-WRT: %[[V:.*]] = sparse_tensor.values %[[COO]]
-// CHECK-WRT: sparse_tensor.sort %[[NNZ]], %[[I2]], %[[I0]], %[[I1]] jointly %[[V]]
-// CHECK-WRT: %[[T1:.*]] = bufferization.alloc_tensor(%[[D0]], %[[D1]], %[[D2]])
-// CHECK-WRT: %[[T2:.*]] = sparse_tensor.foreach in %[[COO]] init(%[[T1]])
-// CHECK-WRT: ^bb0(%[[LI0:.*]]: index, %[[LI1:.*]]: index, %[[LI2:.*]]: index, %[[LV:.*]]: f32, %[[LT1:.*]]: tensor<?x?x?xf32,
-// CHECK-WRT: %[[LT2:.*]] = sparse_tensor.insert %[[LV]] into %[[LT1]]{{\[}}%[[LI2]], %[[LI0]], %[[LI1]]]
-// CHECK-WRT: sparse_tensor.yield %[[LT2]]
-// CHECK-WRT: }
-// CHECK-WRT: %[[T3:.*]] = sparse_tensor.load %[[T2:.*]] hasInserts
-// CHECK-WRT: %[[T4:.*]] = sparse_tensor.convert %[[T3]]
-// CHECK-WRT: return %[[T4]]
+// CHECK-RWT-LABEL: func.func @sparse_convert_permuted(
+// CHECK-RWT-SAME: %[[COO:.*]]:
+// CHECK-RWT-DAG: %[[C0:.*]] = arith.constant 0 : index
+// CHECK-RWT-DAG: %[[C1:.*]] = arith.constant 1 : index
+// CHECK-RWT-DAG: %[[C2:.*]] = arith.constant 2 : index
+// CHECK-RWT: %[[D0:.*]] = tensor.dim %[[COO]], %[[C0]]
+// CHECK-RWT: %[[D1:.*]] = tensor.dim %[[COO]], %[[C1]]
+// CHECK-RWT: %[[D2:.*]] = tensor.dim %[[COO]], %[[C2]]
+// CHECK-RWT: %[[I0:.*]] = sparse_tensor.indices %[[COO]] {dimension = 0 : index}
+// CHECK-RWT: %[[I1:.*]] = sparse_tensor.indices %[[COO]] {dimension = 1 : index}
+// CHECK-RWT: %[[I2:.*]] = sparse_tensor.indices %[[COO]] {dimension = 2 : index}
+// CHECK-RWT: %[[NNZ:.*]] = sparse_tensor.number_of_entries %[[COO]]
+// CHECK-RWT: %[[V:.*]] = sparse_tensor.values %[[COO]]
+// CHECK-RWT: sparse_tensor.sort %[[NNZ]], %[[I2]], %[[I0]], %[[I1]] jointly %[[V]]
+// CHECK-RWT: %[[T1:.*]] = bufferization.alloc_tensor(%[[D0]], %[[D1]], %[[D2]])
+// CHECK-RWT: %[[T2:.*]] = sparse_tensor.foreach in %[[COO]] init(%[[T1]])
+// CHECK-RWT: ^bb0(%[[LI0:.*]]: index, %[[LI1:.*]]: index, %[[LI2:.*]]: index, %[[LV:.*]]: f32, %[[LT1:.*]]: tensor<?x?x?xf32,
+// CHECK-RWT: %[[LT2:.*]] = sparse_tensor.insert %[[LV]] into %[[LT1]]{{\[}}%[[LI2]], %[[LI0]], %[[LI1]]]
+// CHECK-RWT: sparse_tensor.yield %[[LT2]]
+// CHECK-RWT: }
+// CHECK-RWT: %[[T3:.*]] = sparse_tensor.load %[[T2:.*]] hasInserts
+// CHECK-RWT: %[[T4:.*]] = sparse_tensor.convert %[[T3]]
+// CHECK-RWT: return %[[T4]]
func.func @sparse_convert_permuted(%arg0: tensor<?x?x?xf32, #SortedCOO3D>) -> tensor<?x?x?xf32, #TsssPermuted> {
%0 = sparse_tensor.convert %arg0 : tensor<?x?x?xf32, #SortedCOO3D> to tensor<?x?x?xf32, #TsssPermuted>
return %0 : tensor<?x?x?xf32, #TsssPermuted>
More information about the Mlir-commits
mailing list