@@ -524,48 +524,6 @@ func.func @test_slice(%arg0 : tensor<?xi32>) -> () {
524524
525525// -----
526526
527- // CHECK-LABEL: @test_slice_size_minus_one
528- func.func @test_slice_size_minus_one (%arg0 : tensor <?x8 x8 x8 xi32 >) -> () {
529- // CHECK: tosa.slice %arg0 {size = array<i64: -1, -1, -1, -1>, start = array<i64: 0, 1, -1, 8>} : (tensor<?x8x8x8xi32>) -> tensor<?x7x?x?xi32>
530- // this checks following
531- // dim 0: size=-1, input dim=? => inferred output dim is ?
532- // dim 1: size=-1 => inferred output dim is input_dim - start
533- // dim 2: size=-1, start=-1 => inferred output dim is ?
534- // dim 3: size=-1, start=8 => inferred output dim is ? because start is out of bound
535- %2 = tosa.slice %arg0 { start = array<i64 : 0 , 1 , -1 , 8 >, size = array<i64 : -1 , -1 , -1 , -1 > } : (tensor <?x8 x8 x8 xi32 >) -> tensor <?x?x?x?xi32 >
536- return
537- }
538-
539- // -----
540- // COM: AMD: disabled, input is invalid
541- // // COM-LABEL: @test_slice_size_out_of_bound
542- // func.func @test_slice_size_out_of_bound(%arg0 : tensor<8x8x8x?xi32>) -> () {
543- // // COM: tosa.slice %arg0 {size = array<i64: 0, -2, 9, 4>, start = array<i64: 0, 0, 0, 0>} : (tensor<8x8x8x?xi32>) -> tensor<?x?x?x4xi32>
544- // // this checks following
545- // // dim 0: size=0 => inferred output dim is ?
546- // // dim 1: size=-2 => inferred output dim is ?
547- // // dim 3: start+size out of bound because size too big: inferred output dim is ?
548- // // dim 4: size=4, input dim=? => inferred output dim is 4
549- // %2= tosa.slice %arg0 { start = array<i64: 0, 0, 0, 0>, size = array<i64: 0, -2, 9, 4> } : (tensor<8x8x8x?xi32>) -> tensor<?x?x?x?xi32>
550- // return
551- // }
552-
553- // -----
554- // COM: AMD: disabled, input is invalid
555- // // COM-LABEL: @test_slice_start_out_of_bound
556- // func.func @test_slice_start_out_of_bound(%arg0 : tensor<8x8x8x?xi32>) -> () {
557- // // COM: tosa.slice %arg0 {size = array<i64: 1, 1, 3, 4>, start = array<i64: -1, 8, 6, 8000000>} : (tensor<8x8x8x?xi32>) -> tensor<?x?x?x4xi32>
558- // // this checks following
559- // // dim 0: start=-1 => inferred output dim is ?
560- // // dim 1: start=8 => inferred output dim is ?
561- // // dim 2: start+size out of bound: inferred output dim is ?
562- // // dim 3: start=8000000, size=4, input dim=? => inferred output dim is 4
563- // %2= tosa.slice %arg0 { start = array<i64: -1, 8, 6, 8000000>, size = array<i64: 1, 1, 3, 4> } : (tensor<8x8x8x?xi32>) -> tensor<?x?x?x?xi32>
564- // return
565- // }
566-
567- // -----
568-
569527// CHECK-LABEL: @test_slice_dynamic
570528func.func @test_slice_dynamic (%arg0 : tensor <10 x?x2 xf32 >) -> () {
571529 // CHECK: tosa.slice %arg0 {size = array<i64: 7, -1, 1>, start = array<i64: 1, 0, 0>} : (tensor<10x?x2xf32>) -> tensor<7x?x1xf32>
0 commit comments