@@ -23,8 +23,10 @@ module {
23
23
%cst = arith.constant 0.000000e+00 : f32
24
24
%0 = secret.generic ins (%arg0 , %arg1 , %arg2 : !secret.secret <tensor <28 x28 xf32 >>, !secret.secret <tensor <784 x10 xf32 >>, !secret.secret <tensor <1 x10 xf32 >>) {
25
25
^bb0 (%arg3: tensor <28 x28 xf32 >, %arg4: tensor <784 x10 xf32 >, %arg5: tensor <1 x10 xf32 >):
26
- %1 = tosa.reshape %arg3 {new_shape = array<i64 : 1 , 1 , 784 >} : (tensor <28 x28 xf32 >) -> tensor <1 x1 x784 xf32 >
27
- %2 = tosa.reshape %arg4 {new_shape = array<i64 : 1 , 784 , 10 >} : (tensor <784 x10 xf32 >) -> tensor <1 x784 x10 xf32 >
26
+ %s_1 = " tosa.const_shape" () {value = dense <[1 , 1 , 784 ]> : tensor <3 xindex >} : () -> !tosa.shape <3 >
27
+ %1 = tosa.reshape %arg3 , %s_1 : (tensor <28 x28 xf32 >, !tosa.shape <3 >) -> tensor <1 x1 x784 xf32 >
28
+ %s_2 = " tosa.const_shape" () {value = dense <[1 , 784 , 10 ]> : tensor <3 xindex >} : () -> !tosa.shape <3 >
29
+ %2 = tosa.reshape %arg4 , %s_2 : (tensor <784 x10 xf32 >, !tosa.shape <3 >) -> tensor <1 x784 x10 xf32 >
28
30
%3 = tensor.empty () : tensor <1 x1 x10 xf32 >
29
31
%4 = affine.for %arg6 = 0 to 10 iter_args (%arg7 = %3 ) -> (tensor <1 x1 x10 xf32 >) {
30
32
%inserted = tensor.insert %cst into %arg7 [%c0 , %c0 , %arg6 ] : tensor <1 x1 x10 xf32 >
@@ -42,7 +44,8 @@ module {
42
44
}
43
45
affine.yield %9 : tensor <1 x1 x10 xf32 >
44
46
}
45
- %6 = tosa.reshape %5 {new_shape = array<i64 : 1 , 10 >} : (tensor <1 x1 x10 xf32 >) -> tensor <1 x10 xf32 >
47
+ %s_6 = " tosa.const_shape" () {value = dense <[1 , 10 ]> : tensor <2 xindex >} : () -> !tosa.shape <2 >
48
+ %6 = tosa.reshape %5 , %s_6 : (tensor <1 x1 x10 xf32 >, !tosa.shape <2 >) -> tensor <1 x10 xf32 >
46
49
%7 = tensor.empty () : tensor <1 x10 xf32 >
47
50
%8 = affine.for %arg6 = 0 to 10 iter_args (%arg7 = %7 ) -> (tensor <1 x10 xf32 >) {
48
51
%extracted = tensor.extract %6 [%c0 , %arg6 ] : tensor <1 x10 xf32 >
0 commit comments