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 @@ -132,18 +132,21 @@ %s2345 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x4xf64, #Tensor5> %s2346 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x4xf64, #Tensor6> + // NOTE: We commented out most cases with the dynamic-sized output tensor because finishing + // all of them are currently taking too long, and they are not covering too many new code + // pathes. %sp344 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor - %sp345 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor - %sp346 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor - %s2p44 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x4xf64, #Tensor4> + // %sp345 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor + // %sp346 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor + // %s2p44 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x4xf64, #Tensor4> %s2p45 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x4xf64, #Tensor5> - %s2p46 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x4xf64, #Tensor6> - %s23p4 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x?xf64, #Tensor4> - %s23p5 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x?xf64, #Tensor5> + // %s2p46 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x4xf64, #Tensor6> + // %s23p4 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x?xf64, #Tensor4> + // %s23p5 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x?xf64, #Tensor5> %s23p6 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x3x?xf64, #Tensor6> - %s2pp4 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x?xf64, #Tensor4> - %s2pp5 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x?xf64, #Tensor5> - %s2pp6 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x?xf64, #Tensor6> + // %s2pp4 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x?xf64, #Tensor4> + // %s2pp5 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x?xf64, #Tensor5> + // %s2pp6 = sparse_tensor.convert %src : tensor<2x3x4xf64> to tensor<2x?x?xf64, #Tensor6> // // Convert sparse tensor back to dense. @@ -156,32 +159,32 @@ %d2346 = sparse_tensor.convert %s2346 : tensor<2x3x4xf64, #Tensor6> to tensor<2x3x4xf64> %dp344 = sparse_tensor.convert %sp344 : tensor to tensor - %dp345 = sparse_tensor.convert %sp345 : tensor to tensor - %dp346 = sparse_tensor.convert %sp346 : tensor to tensor - %d2p44 = sparse_tensor.convert %s2p44 : tensor<2x?x4xf64, #Tensor4> to tensor<2x?x4xf64> + // %dp345 = sparse_tensor.convert %sp345 : tensor to tensor + // %dp346 = sparse_tensor.convert %sp346 : tensor to tensor + // %d2p44 = sparse_tensor.convert %s2p44 : tensor<2x?x4xf64, #Tensor4> to tensor<2x?x4xf64> %d2p45 = sparse_tensor.convert %s2p45 : tensor<2x?x4xf64, #Tensor5> to tensor<2x?x4xf64> - %d2p46 = sparse_tensor.convert %s2p46 : tensor<2x?x4xf64, #Tensor6> to tensor<2x?x4xf64> - %d23p4 = sparse_tensor.convert %s23p4 : tensor<2x3x?xf64, #Tensor4> to tensor<2x3x?xf64> - %d23p5 = sparse_tensor.convert %s23p5 : tensor<2x3x?xf64, #Tensor5> to tensor<2x3x?xf64> + // %d2p46 = sparse_tensor.convert %s2p46 : tensor<2x?x4xf64, #Tensor6> to tensor<2x?x4xf64> + // %d23p4 = sparse_tensor.convert %s23p4 : tensor<2x3x?xf64, #Tensor4> to tensor<2x3x?xf64> + // %d23p5 = sparse_tensor.convert %s23p5 : tensor<2x3x?xf64, #Tensor5> to tensor<2x3x?xf64> %d23p6 = sparse_tensor.convert %s23p6 : tensor<2x3x?xf64, #Tensor6> to tensor<2x3x?xf64> - %d2pp4 = sparse_tensor.convert %s2pp4 : tensor<2x?x?xf64, #Tensor4> to tensor<2x?x?xf64> - %d2pp5 = sparse_tensor.convert %s2pp5 : tensor<2x?x?xf64, #Tensor5> to tensor<2x?x?xf64> - %d2pp6 = sparse_tensor.convert %s2pp6 : tensor<2x?x?xf64, #Tensor6> to tensor<2x?x?xf64> + // %d2pp4 = sparse_tensor.convert %s2pp4 : tensor<2x?x?xf64, #Tensor4> to tensor<2x?x?xf64> + // %d2pp5 = sparse_tensor.convert %s2pp5 : tensor<2x?x?xf64, #Tensor5> to tensor<2x?x?xf64> + // %d2pp6 = sparse_tensor.convert %s2pp6 : tensor<2x?x?xf64, #Tensor6> to tensor<2x?x?xf64> %dp3p4 = sparse_tensor.convert %sp344 : tensor to tensor - %dp3p5 = sparse_tensor.convert %sp345 : tensor to tensor - %dp3p6 = sparse_tensor.convert %sp346 : tensor to tensor - %dpp44 = sparse_tensor.convert %s2p44 : tensor<2x?x4xf64, #Tensor4> to tensor + // %dp3p5 = sparse_tensor.convert %sp345 : tensor to tensor + // %dp3p6 = sparse_tensor.convert %sp346 : tensor to tensor + // %dpp44 = sparse_tensor.convert %s2p44 : tensor<2x?x4xf64, #Tensor4> to tensor %dpp45 = sparse_tensor.convert %s2p45 : tensor<2x?x4xf64, #Tensor5> to tensor - %dpp46 = sparse_tensor.convert %s2p46 : tensor<2x?x4xf64, #Tensor6> to tensor - %dppp4 = sparse_tensor.convert %s2pp4 : tensor<2x?x?xf64, #Tensor4> to tensor - %dppp5 = sparse_tensor.convert %s2pp5 : tensor<2x?x?xf64, #Tensor5> to tensor - %dppp6 = sparse_tensor.convert %s2pp6 : tensor<2x?x?xf64, #Tensor6> to tensor + // %dpp46 = sparse_tensor.convert %s2p46 : tensor<2x?x4xf64, #Tensor6> to tensor + // %dppp4 = sparse_tensor.convert %s2pp4 : tensor<2x?x?xf64, #Tensor4> to tensor + // %dppp5 = sparse_tensor.convert %s2pp5 : tensor<2x?x?xf64, #Tensor5> to tensor + // %dppp6 = sparse_tensor.convert %s2pp6 : tensor<2x?x?xf64, #Tensor6> to tensor // // 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 ) ) ) + // CHECK-COUNT-12: ( ( ( 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_234(%src) : (tensor<2x3x4xf64>) -> () call @dump_234(%d2341) : (tensor<2x3x4xf64>) -> () call @dump_234(%d2342) : (tensor<2x3x4xf64>) -> () @@ -190,26 +193,26 @@ 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_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_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_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_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) -> () + // call @dump_pp4(%dpp46) : (tensor) -> () + // call @dump_ppp(%dppp4) : (tensor) -> () + // call @dump_ppp(%dppp5) : (tensor) -> () + // call @dump_ppp(%dppp6) : (tensor) -> () // // Release sparse tensors. @@ -221,18 +224,17 @@ bufferization.dealloc_tensor %s2345 : tensor<2x3x4xf64, #Tensor5> bufferization.dealloc_tensor %s2346 : tensor<2x3x4xf64, #Tensor6> bufferization.dealloc_tensor %sp344 : tensor - bufferization.dealloc_tensor %sp345 : tensor - bufferization.dealloc_tensor %sp346 : tensor - bufferization.dealloc_tensor %s2p44 : tensor<2x?x4xf64, #Tensor4> + // bufferization.dealloc_tensor %sp345 : tensor + // bufferization.dealloc_tensor %sp346 : tensor + // bufferization.dealloc_tensor %s2p44 : tensor<2x?x4xf64, #Tensor4> bufferization.dealloc_tensor %s2p45 : tensor<2x?x4xf64, #Tensor5> - bufferization.dealloc_tensor %s2p46 : tensor<2x?x4xf64, #Tensor6> - bufferization.dealloc_tensor %s23p4 : tensor<2x3x?xf64, #Tensor4> - bufferization.dealloc_tensor %s23p5 : tensor<2x3x?xf64, #Tensor5> + // bufferization.dealloc_tensor %s2p46 : tensor<2x?x4xf64, #Tensor6> + // bufferization.dealloc_tensor %s23p4 : tensor<2x3x?xf64, #Tensor4> + // bufferization.dealloc_tensor %s23p5 : tensor<2x3x?xf64, #Tensor5> bufferization.dealloc_tensor %s23p6 : tensor<2x3x?xf64, #Tensor6> - bufferization.dealloc_tensor %s2pp4 : tensor<2x?x?xf64, #Tensor4> - bufferization.dealloc_tensor %s2pp5 : tensor<2x?x?xf64, #Tensor5> - bufferization.dealloc_tensor %s2pp6 : tensor<2x?x?xf64, #Tensor6> - + //bufferization.dealloc_tensor %s2pp4 : tensor<2x?x?xf64, #Tensor4> + // bufferization.dealloc_tensor %s2pp5 : tensor<2x?x?xf64, #Tensor5> + //bufferization.dealloc_tensor %s2pp6 : tensor<2x?x?xf64, #Tensor6> return } }