Skip to content

Commit

Permalink
update syntax of opts tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aqjune committed Oct 25, 2024
1 parent deaee85 commit 69f62d7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module {
%5 = arith.addf %arg1, %arg2 : f32
linalg.yield %5 : f32
} -> tensor<1xf32>
%4 = tensor.expand_shape %3 [[0, 1]] : tensor<1xf32> into tensor<1x1xf32>
%4 = tensor.expand_shape %3 [[0, 1]] output_shape [1,1] : tensor<1xf32> into tensor<1x1xf32>
return %4 : tensor<1x1xf32>
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/concat.src.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// VERIFY

func.func @f(%t1: tensor<1x2xf32>, %t2: tensor<3x2xf32>, %t3: tensor<5x2xf32>) -> tensor<9x2xf32> {
%res = "tosa.concat"(%t1, %t2, %t3) { axis = 0 : i64}
%res = "tosa.concat"(%t1, %t2, %t3) { axis = 0 : i32}
: (tensor<1x2xf32>, tensor<3x2xf32>, tensor<5x2xf32>) -> tensor<9x2xf32>
return %res: tensor<9x2xf32>
}
Expand Down
2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/mul.src.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// VERIFY

func.func @f(%arg0: tensor<8xf32>, %arg1: tensor<8xf32>) -> tensor<8xf32> {
%0 = "tosa.mul"(%arg0, %arg1) {shift=0:i32}: (tensor<8xf32>, tensor<8xf32>) -> tensor<8xf32>
%0 = "tosa.mul"(%arg0, %arg1) {shift=0:i8}: (tensor<8xf32>, tensor<8xf32>) -> tensor<8xf32>
return %0 : tensor<8xf32>
}

2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/muli.src.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// VERIFY

func.func @f(%arg0: tensor<8xi32>, %arg1: tensor<8xi32>) -> tensor<8xi32> {
%0 = "tosa.mul"(%arg0, %arg1) {shift=0:i32}: (tensor<8xi32>, tensor<8xi32>) -> tensor<8xi32>
%0 = "tosa.mul"(%arg0, %arg1) {shift=0:i8}: (tensor<8xi32>, tensor<8xi32>) -> tensor<8xi32>
return %0 : tensor<8xi32>
}

2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/reduce_sum.src.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
// a non-identity value (+0.0) to the output tensor.

func.func @f(%t: tensor<3x4x5xf32>) -> tensor<1x4x5xf32> {
%0 = "tosa.reduce_sum"(%t) {axis = 0 : i64} : (tensor<3x4x5xf32>) -> tensor<1x4x5xf32>
%0 = "tosa.reduce_sum"(%t) {axis = 0 : i32} : (tensor<3x4x5xf32>) -> tensor<1x4x5xf32>
return %0: tensor<1x4x5xf32>
}
2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/reduce_sum2.src.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
// a non-identity value (+0.0) to the output tensor.

func.func @f(%t: tensor<3x4x5xf32>) -> tensor<3x1x5xf32> {
%0 = "tosa.reduce_sum"(%t) {axis = 1 : i64} : (tensor<3x4x5xf32>) -> tensor<3x1x5xf32>
%0 = "tosa.reduce_sum"(%t) {axis = 1 : i32} : (tensor<3x4x5xf32>) -> tensor<3x1x5xf32>
return %0: tensor<3x1x5xf32>
}
2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/reduce_sum3.src.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
// a non-identity value (+0.0) to the output tensor.

func.func @f(%t: tensor<3x1000x5xf32>) -> tensor<3x1x5xf32> {
%0 = "tosa.reduce_sum"(%t) {axis = 1 : i64} : (tensor<3x1000x5xf32>) -> tensor<3x1x5xf32>
%0 = "tosa.reduce_sum"(%t) {axis = 1 : i32} : (tensor<3x1000x5xf32>) -> tensor<3x1x5xf32>
return %0: tensor<3x1x5xf32>
}
2 changes: 1 addition & 1 deletion tests/opts/tosa-to-linalg/reverse.src.mlir
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// VERIFY

func.func @f(%t: tensor<?x?x?xi32>) -> tensor<?x?x?xi32> {
%rt = "tosa.reverse"(%t) {axis = 1 : i64} : (tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
%rt = "tosa.reverse"(%t) {axis = 1 : i32} : (tensor<?x?x?xi32>) -> tensor<?x?x?xi32>
return %rt: tensor<?x?x?xi32>
}

Expand Down

0 comments on commit 69f62d7

Please sign in to comment.