From dfcb67190a9ec5dc4f6a2efd9407b9c83bfe567b Mon Sep 17 00:00:00 2001 From: bixia1 Date: Thu, 8 Dec 2022 08:22:37 -0800 Subject: [PATCH] [mlir][sparse] Fix checks in a test. Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D139636 --- .../SparseTensor/convert_sparse2sparse.mlir | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir b/mlir/test/Dialect/SparseTensor/convert_sparse2sparse.mlir index 496d594..3b975cc 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) -> return %0 : tensor } -// 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) -> tensor { %0 = sparse_tensor.convert %arg0 : tensor to tensor return %0 : tensor -- 2.7.4