@@ -743,6 +743,26 @@ func.func @test_resize(%arg0: tensor<1x32x32x8xf32>) -> tensor<1x64x64x8xf32> {
743
743
return %1 : tensor <1 x64 x64 x8 xf32 >
744
744
}
745
745
746
+ // -----
747
+ // CHECK-LABEL: resize_unranked_output
748
+ func.func @test_resize_unranked_output (%arg0: tensor <1 x32 x32 x8 xf32 >) -> tensor <*xf32 > {
749
+ %scale = tosa.const_shape { values = dense <[4 , 2 , 4 , 2 ]> : tensor <4 xindex > } : () -> !tosa.shape <4 >
750
+ %offset = tosa.const_shape { values = dense <[-1 , -1 ]> : tensor <2 xindex > } : () -> !tosa.shape <2 >
751
+ %border = tosa.const_shape { values = dense <[1 , 1 ]> : tensor <2 xindex > } : () -> !tosa.shape <2 >
752
+ %1 = tosa.resize %arg0 , %scale , %offset , %border { mode = " BILINEAR" } : (tensor <1 x32 x32 x8 xf32 >, !tosa.shape <4 >, !tosa.shape <2 >, !tosa.shape <2 >) -> tensor <*xf32 >
753
+ return %1 : tensor <*xf32 >
754
+ }
755
+
756
+ // -----
757
+ // CHECK-LABEL: resize_unranked_input
758
+ func.func @test_resize_unranked_input (%arg0: tensor <*xf32 >) -> tensor <1 x64 x64 x8 xf32 > {
759
+ %scale = tosa.const_shape { values = dense <[4 , 2 , 4 , 2 ]> : tensor <4 xindex > } : () -> !tosa.shape <4 >
760
+ %offset = tosa.const_shape { values = dense <[-1 , -1 ]> : tensor <2 xindex > } : () -> !tosa.shape <2 >
761
+ %border = tosa.const_shape { values = dense <[1 , 1 ]> : tensor <2 xindex > } : () -> !tosa.shape <2 >
762
+ %1 = tosa.resize %arg0 , %scale , %offset , %border { mode = " BILINEAR" } : (tensor <*xf32 >, !tosa.shape <4 >, !tosa.shape <2 >, !tosa.shape <2 >) -> tensor <1 x64 x64 x8 xf32 >
763
+ return %1 : tensor <1 x64 x64 x8 xf32 >
764
+ }
765
+
746
766
// -----
747
767
// CHECK-LABEL: cast
748
768
func.func @test_cast1 (%arg0: tensor <13 x21 x3 xi32 >) -> tensor <13 x21 x3 xf32 > {
0 commit comments