Skip to content

Commit

Permalink
Integrate LLVM at e0e615efac522365591119165a7691ce869de512 (iree-org#…
Browse files Browse the repository at this point in the history
…16973)

IREE-side, just had to fix a faulty test, same issue as in integrate
iree-org#16944. Just some incoherent shapes in `tosa.reshape`.
  • Loading branch information
bjacob authored Apr 4, 2024
1 parent 089027d commit b82c1aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
// CHECK: tosa.negate %[[RESULT]]

func.func @mlp_invocation(%lhs: tensor<2x4xf32>, %rhs : tensor<4x8xf32>) -> tensor<2x8xf32> {
%lhs_3D = tosa.reshape %lhs {new_shape = array<i64 : 1, 2, 2>} : (tensor<2x4xf32>) -> tensor<1x2x4xf32>
%rhs_3D = tosa.reshape %rhs {new_shape = array<i64 : 1, 2, 2>} : (tensor<4x8xf32>) -> tensor<1x4x8xf32>
%lhs_3D = tosa.reshape %lhs {new_shape = array<i64 : 1, 2, 4>} : (tensor<2x4xf32>) -> tensor<1x2x4xf32>
%rhs_3D = tosa.reshape %rhs {new_shape = array<i64 : 1, 4, 8>} : (tensor<4x8xf32>) -> tensor<1x4x8xf32>
%0 = tosa.matmul %lhs_3D, %rhs_3D : (tensor<1x2x4xf32>, tensor<1x4x8xf32>) -> tensor<1x2x8xf32>
%1 = tosa.clamp %0 {
min_int = 0 : i64, max_int = 9223372036854775807 : i64,
min_fp = 0.0 : f32, max_fp = 3.4028235e+38 : f32}
: (tensor<1x2x8xf32>) -> tensor<1x2x8xf32>
%2 = tosa.negate %1 : (tensor<1x2x8xf32>) -> tensor<1x2x8xf32>
%3 = tosa.reshape %2 {new_shape = array<i64 : 2, 2>} : (tensor<1x2x8xf32>) -> tensor<2x8xf32>
%3 = tosa.reshape %2 {new_shape = array<i64 : 2, 8>} : (tensor<1x2x8xf32>) -> tensor<2x8xf32>
return %3 : tensor<2x8xf32>
}
2 changes: 1 addition & 1 deletion third_party/llvm-project

0 comments on commit b82c1aa

Please sign in to comment.