diff --git a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_sparse2dense.mlir b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_sparse2dense.mlir --- a/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_sparse2dense.mlir +++ b/mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion_sparse2dense.mlir @@ -40,52 +40,48 @@ // module { // - // Utilities for output and releasing memory. + // Utilities for output. // - func.func @dump(%arg0: tensor<2x3x4xf64>) { + func.func @dump_234(%arg0: tensor<2x3x4xf64>) { %c0 = arith.constant 0 : index %d0 = arith.constant -1.0 : f64 %0 = vector.transfer_read %arg0[%c0, %c0, %c0], %d0: tensor<2x3x4xf64>, vector<2x3x4xf64> vector.print %0 : vector<2x3x4xf64> return } - func.func @dumpAndRelease_234(%arg0: tensor<2x3x4xf64>) { - call @dump(%arg0) : (tensor<2x3x4xf64>) -> () - return - } - func.func @dumpAndRelease_p34(%arg0: tensor) { + func.func @dump_p34(%arg0: tensor) { %0 = tensor.cast %arg0 : tensor to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } - func.func @dumpAndRelease_2p4(%arg0: tensor<2x?x4xf64>) { + func.func @dump_2p4(%arg0: tensor<2x?x4xf64>) { %0 = tensor.cast %arg0 : tensor<2x?x4xf64> to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } - func.func @dumpAndRelease_23p(%arg0: tensor<2x3x?xf64>) { + func.func @dump_23p(%arg0: tensor<2x3x?xf64>) { %0 = tensor.cast %arg0 : tensor<2x3x?xf64> to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } - func.func @dumpAndRelease_2pp(%arg0: tensor<2x?x?xf64>) { + func.func @dump_2pp(%arg0: tensor<2x?x?xf64>) { %0 = tensor.cast %arg0 : tensor<2x?x?xf64> to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } - func.func @dumpAndRelease_p3p(%arg0: tensor) { + func.func @dump_p3p(%arg0: tensor) { %0 = tensor.cast %arg0 : tensor to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } - func.func @dumpAndRelease_pp4(%arg0: tensor) { + func.func @dump_pp4(%arg0: tensor) { %0 = tensor.cast %arg0 : tensor to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } - func.func @dumpAndRelease_ppp(%arg0: tensor) { + func.func @dump_ppp(%arg0: tensor) { %0 = tensor.cast %arg0 : tensor to tensor<2x3x4xf64> - call @dump(%0) : (tensor<2x3x4xf64>) -> () + call @dump_234(%0) : (tensor<2x3x4xf64>) -> () return } @@ -165,34 +161,34 @@ // Check round-trip equality. And release dense tensors. // // CHECK-COUNT-28: ( ( ( 1, 2, 3, 4 ), ( 5, 6, 7, 8 ), ( 9, 10, 11, 12 ) ), ( ( 13, 14, 15, 16 ), ( 17, 18, 19, 20 ), ( 21, 22, 23, 24 ) ) ) - call @dump(%src) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_234(%d2341) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_234(%d2342) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_234(%d2343) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_234(%d2344) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_234(%d2345) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_234(%d2346) : (tensor<2x3x4xf64>) -> () - call @dumpAndRelease_p34(%dp344) : (tensor) -> () - call @dumpAndRelease_p34(%dp345) : (tensor) -> () - call @dumpAndRelease_p34(%dp346) : (tensor) -> () - call @dumpAndRelease_2p4(%d2p44) : (tensor<2x?x4xf64>) -> () - call @dumpAndRelease_2p4(%d2p45) : (tensor<2x?x4xf64>) -> () - call @dumpAndRelease_2p4(%d2p46) : (tensor<2x?x4xf64>) -> () - call @dumpAndRelease_23p(%d23p4) : (tensor<2x3x?xf64>) -> () - call @dumpAndRelease_23p(%d23p5) : (tensor<2x3x?xf64>) -> () - call @dumpAndRelease_23p(%d23p6) : (tensor<2x3x?xf64>) -> () - call @dumpAndRelease_2pp(%d2pp4) : (tensor<2x?x?xf64>) -> () - call @dumpAndRelease_2pp(%d2pp5) : (tensor<2x?x?xf64>) -> () - call @dumpAndRelease_2pp(%d2pp6) : (tensor<2x?x?xf64>) -> () - call @dumpAndRelease_p3p(%dp3p4) : (tensor) -> () - call @dumpAndRelease_p3p(%dp3p5) : (tensor) -> () - call @dumpAndRelease_p3p(%dp3p6) : (tensor) -> () - call @dumpAndRelease_pp4(%dpp44) : (tensor) -> () - call @dumpAndRelease_pp4(%dpp45) : (tensor) -> () - call @dumpAndRelease_pp4(%dpp46) : (tensor) -> () - call @dumpAndRelease_ppp(%dppp4) : (tensor) -> () - call @dumpAndRelease_ppp(%dppp5) : (tensor) -> () - call @dumpAndRelease_ppp(%dppp6) : (tensor) -> () + call @dump_234(%src) : (tensor<2x3x4xf64>) -> () + call @dump_234(%d2341) : (tensor<2x3x4xf64>) -> () + call @dump_234(%d2342) : (tensor<2x3x4xf64>) -> () + call @dump_234(%d2343) : (tensor<2x3x4xf64>) -> () + call @dump_234(%d2344) : (tensor<2x3x4xf64>) -> () + call @dump_234(%d2345) : (tensor<2x3x4xf64>) -> () + call @dump_234(%d2346) : (tensor<2x3x4xf64>) -> () + call @dump_p34(%dp344) : (tensor) -> () + call @dump_p34(%dp345) : (tensor) -> () + call @dump_p34(%dp346) : (tensor) -> () + call @dump_2p4(%d2p44) : (tensor<2x?x4xf64>) -> () + call @dump_2p4(%d2p45) : (tensor<2x?x4xf64>) -> () + call @dump_2p4(%d2p46) : (tensor<2x?x4xf64>) -> () + call @dump_23p(%d23p4) : (tensor<2x3x?xf64>) -> () + call @dump_23p(%d23p5) : (tensor<2x3x?xf64>) -> () + call @dump_23p(%d23p6) : (tensor<2x3x?xf64>) -> () + call @dump_2pp(%d2pp4) : (tensor<2x?x?xf64>) -> () + call @dump_2pp(%d2pp5) : (tensor<2x?x?xf64>) -> () + call @dump_2pp(%d2pp6) : (tensor<2x?x?xf64>) -> () + call @dump_p3p(%dp3p4) : (tensor) -> () + call @dump_p3p(%dp3p5) : (tensor) -> () + call @dump_p3p(%dp3p6) : (tensor) -> () + call @dump_pp4(%dpp44) : (tensor) -> () + call @dump_pp4(%dpp45) : (tensor) -> () + call @dump_pp4(%dpp46) : (tensor) -> () + call @dump_ppp(%dppp4) : (tensor) -> () + call @dump_ppp(%dppp5) : (tensor) -> () + call @dump_ppp(%dppp6) : (tensor) -> () // // Release sparse tensors.