@@ -19,8 +19,8 @@ func.func @test_argmax(%arg0: tensor<14x19xf32>) -> tensor<14xi32> {
19
19
func.func @test_avg_pool2d (%arg0: tensor <1 x7 x7 x9 xf32 >) -> tensor <1 x7 x7 x9 xf32 > {
20
20
// CHECK: profiles: [ [pro_int, pro_fp] ]
21
21
// CHECK: extensions: [ [int16, fp8e4m3, fp8e5m2, bf16] ]
22
- %input_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
23
- %output_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
22
+ %input_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
23
+ %output_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
24
24
%0 = tosa.avg_pool2d %arg0 , %input_zp , %output_zp {acc_type = f32 , kernel = array<i64 : 2 , 2 >, pad = array<i64 : 0 , 1 , 0 , 1 >, stride = array<i64 : 1 , 1 >} : (tensor <1 x7 x7 x9 xf32 >, tensor <1 xf32 >, tensor <1 xf32 >) -> tensor <1 x7 x7 x9 xf32 >
25
25
return %0 : tensor <1 x7 x7 x9 xf32 >
26
26
}
@@ -30,8 +30,8 @@ func.func @test_avg_pool2d(%arg0: tensor<1x7x7x9xf32>) -> tensor<1x7x7x9xf32> {
30
30
func.func @test_conv2d (%arg0: tensor <1 x4 x4 x4 xf32 >, %arg1: tensor <8 x1 x1 x4 xf32 >, %arg2: tensor <8 xf32 >) -> tensor <1 x4 x4 x8 xf32 > {
31
31
// CHECK: profiles: [ [pro_int, pro_fp] ]
32
32
// CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
33
- %input_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
34
- %weight_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
33
+ %input_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
34
+ %weight_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
35
35
%0 = tosa.conv2d %arg0 , %arg1 , %arg2 , %input_zp , %weight_zp {acc_type = f32 , dilation = array<i64 : 1 , 1 >, pad = array<i64 : 0 , 0 , 0 , 0 >, stride = array<i64 : 1 , 1 >, local_bound = true } : (tensor <1 x4 x4 x4 xf32 >, tensor <8 x1 x1 x4 xf32 >, tensor <8 xf32 >, tensor <1 xf32 >, tensor <1 xf32 >) -> tensor <1 x4 x4 x8 xf32 >
36
36
return %0 : tensor <1 x4 x4 x8 xf32 >
37
37
}
@@ -41,8 +41,8 @@ func.func @test_conv2d(%arg0: tensor<1x4x4x4xf32>, %arg1: tensor<8x1x1x4xf32>, %
41
41
func.func @test_conv3d (%arg0: tensor <1 x4 x8 x21 x17 xf32 >, %arg1: tensor <34 x1 x1 x1 x17 xf32 >, %arg2: tensor <34 xf32 >) -> tensor <1 x4 x8 x21 x34 xf32 > {
42
42
// CHECK: profiles: [ [pro_int, pro_fp] ]
43
43
// CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
44
- %input_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
45
- %weight_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
44
+ %input_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
45
+ %weight_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
46
46
%0 = tosa.conv3d %arg0 , %arg1 , %arg2 , %input_zp , %weight_zp {acc_type = f32 , dilation = array<i64 : 1 , 1 , 1 >, pad = array<i64 : 0 , 0 , 0 , 0 , 0 , 0 >, stride = array<i64 : 1 , 1 , 1 >} : (tensor <1 x4 x8 x21 x17 xf32 >, tensor <34 x1 x1 x1 x17 xf32 >, tensor <34 xf32 >, tensor <1 xf32 >, tensor <1 xf32 >) -> tensor <1 x4 x8 x21 x34 xf32 >
47
47
return %0 : tensor <1 x4 x8 x21 x34 xf32 >
48
48
}
@@ -52,8 +52,8 @@ func.func @test_conv3d(%arg0: tensor<1x4x8x21x17xf32>, %arg1: tensor<34x1x1x1x17
52
52
func.func @test_depthwise_conv2d (%arg0: tensor <1 x4 x4 x4 xf32 >, %arg1: tensor <1 x1 x4 x2 xf32 >, %arg2: tensor <8 xf32 >) -> tensor <1 x4 x4 x8 xf32 > {
53
53
// CHECK: profiles: [ [pro_int, pro_fp] ]
54
54
// CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
55
- %input_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
56
- %weight_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
55
+ %input_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
56
+ %weight_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
57
57
%0 = tosa.depthwise_conv2d %arg0 , %arg1 , %arg2 , %input_zp , %weight_zp {acc_type = f32 , dilation = array<i64 : 1 , 1 >, pad = array<i64 : 0 , 0 , 0 , 0 >, stride = array<i64 : 1 , 1 >} : (tensor <1 x4 x4 x4 xf32 >, tensor <1 x1 x4 x2 xf32 >, tensor <8 xf32 >, tensor <1 xf32 >, tensor <1 xf32 >) -> tensor <1 x4 x4 x8 xf32 >
58
58
return %0 : tensor <1 x4 x4 x8 xf32 >
59
59
}
@@ -99,8 +99,8 @@ func.func @test_rfft2d(%arg0: tensor<13x8x16xf32>) -> (tensor<13x8x9xf32>, tenso
99
99
func.func @test_transpose_conv2d (%arg0: tensor <1 x32 x32 x8 xf32 >, %arg1: tensor <16 x1 x1 x8 xf32 >, %arg2: tensor <16 xf32 >) -> tensor <1 x32 x32 x16 xf32 > {
100
100
// CHECK: profiles: [ [pro_int, pro_fp] ]
101
101
// CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
102
- %input_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
103
- %weight_zp = " tosa.const" () <{value = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
102
+ %input_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
103
+ %weight_zp = " tosa.const" () <{values = dense <0.0 > : tensor <1 xf32 >}> : () -> tensor <1 xf32 >
104
104
%0 = tosa.transpose_conv2d %arg0 , %arg1 , %arg2 , %input_zp , %weight_zp {acc_type = f32 , out_pad = array<i64 : 0 , 0 , 0 , 0 >, out_shape = array<i64 : 1 , 32 , 32 , 16 >, stride = array<i64 : 1 , 1 >} : (tensor <1 x32 x32 x8 xf32 >, tensor <16 x1 x1 x8 xf32 >, tensor <16 xf32 >, tensor <1 xf32 >, tensor <1 xf32 >) -> tensor <1 x32 x32 x16 xf32 >
105
105
return %0 : tensor <1 x32 x32 x16 xf32 >
106
106
}
@@ -260,7 +260,7 @@ func.func @test_min(%arg0: tensor<13x21x3xf32>, %arg1: tensor<1x21x3xf32>) -> te
260
260
// -----
261
261
// CHECK-LABEL: mul
262
262
func.func @test_mul (%arg0: tensor <13 x21 x3 xf32 >, %arg1: tensor <13 x1 x3 xf32 >) -> tensor <13 x21 x3 xf32 > {
263
- %shift = " tosa.const" () <{value = dense <0 > : tensor <1 xi8 >}> : () -> tensor <1 xi8 >
263
+ %shift = " tosa.const" () <{values = dense <0 > : tensor <1 xi8 >}> : () -> tensor <1 xi8 >
264
264
// CHECK: profiles: [ [pro_int, pro_fp] ]
265
265
// CHECK: extensions: [ [bf16] ]
266
266
%0 = tosa.mul %arg0 , %arg1 , %shift : (tensor <13 x21 x3 xf32 >, tensor <13 x1 x3 xf32 >, tensor <1 xi8 >) -> tensor <13 x21 x3 xf32 >
@@ -514,7 +514,7 @@ func.func @test_concat(%arg0: tensor<13x21x3xf32>, %arg1: tensor<13x21x3xf32>) -
514
514
// CHECK-LABEL: pad
515
515
func.func @test_pad (%arg0: tensor <13 x21 x3 xf32 >) -> tensor <13 x21 x3 xf32 > {
516
516
%padding = tosa.const_shape {value = dense <0 > : tensor <6 xindex >} : () -> !tosa.shape <6 >
517
- %pad_const = " tosa.const" () {value = dense <3.14 > : tensor <1 xf32 >} : () -> tensor <1 xf32 >
517
+ %pad_const = " tosa.const" () {values = dense <3.14 > : tensor <1 xf32 >} : () -> tensor <1 xf32 >
518
518
// CHECK: profiles: [ [pro_int, pro_fp] ]
519
519
// CHECK: extensions: [ [fp8e4m3, fp8e5m2, bf16] ]
520
520
%0 = tosa.pad %arg0 , %padding , %pad_const : (tensor <13 x21 x3 xf32 >, !tosa.shape <6 >, tensor <1 xf32 >) -> tensor <13 x21 x3 xf32 >
@@ -623,7 +623,7 @@ func.func @test_rescale(%arg0: tensor<13x21x3x!quant.uniform<u8:f32, 0.015655439
623
623
func.func @test_const (%arg0 : index ) -> tensor <4 xi32 > {
624
624
// CHECK: profiles: [ [pro_int, pro_fp] ]
625
625
// CHECK: extensions: [ [int4, int16, fp8e4m3, fp8e5m2, bf16] ]
626
- %0 = " tosa.const" () {value = dense <[3 , 0 , 1 , 2 ]> : tensor <4 xi32 >} : () -> tensor <4 xi32 >
626
+ %0 = " tosa.const" () {values = dense <[3 , 0 , 1 , 2 ]> : tensor <4 xi32 >} : () -> tensor <4 xi32 >
627
627
return %0 : tensor <4 xi32 >
628
628
}
629
629
@@ -654,7 +654,7 @@ func.func @test_cond_if(%arg0: tensor<f32>, %arg1: tensor<f32>, %arg2: tensor<i1
654
654
// -----
655
655
// CHECK-LABEL: while_loop
656
656
func.func @test_while_loop (%arg0: tensor <10 xi32 >, %arg1: tensor <i32 >) {
657
- %0 = " tosa.const" () {value = dense <0 > : tensor <i32 >} : () -> tensor <i32 >
657
+ %0 = " tosa.const" () {values = dense <0 > : tensor <i32 >} : () -> tensor <i32 >
658
658
// CHECK: profiles: [ ]
659
659
// CHECK: extensions: [ [controlflow] ]
660
660
%1:3 = tosa.while_loop (%arg2 = %0 , %arg3 = %0 , %arg4 = %arg0 ) : (tensor <i32 >, tensor <i32 >, tensor <10 xi32 >) -> (tensor <i32 >, tensor <i32 >, tensor <10 xi32 >) {
@@ -663,7 +663,7 @@ func.func @test_while_loop(%arg0: tensor<10xi32>, %arg1: tensor<i32>) {
663
663
tosa.yield %3 : tensor <i1 >
664
664
} do {
665
665
^bb0 (%arg2: tensor <i32 >, %arg3: tensor <i32 >, %arg4: tensor <10 xi32 >):
666
- %2 = " tosa.const" () {value = dense <1 > : tensor <i32 >} : () -> tensor <i32 >
666
+ %2 = " tosa.const" () {values = dense <1 > : tensor <i32 >} : () -> tensor <i32 >
667
667
%3 = tosa.add %arg3 , %2 : (tensor <i32 >, tensor <i32 >) -> tensor <i32 >
668
668
%7 = tosa.const_shape {value = dense <[1 ]> : tensor <1 xindex >} : () -> !tosa.shape <1 >
669
669
%4 = tosa.reshape %2 , %7 : (tensor <i32 >, !tosa.shape <1 >) -> tensor <1 xi32 >
0 commit comments