Skip to content

Commit 7e716e1

Browse files
HEIR Teamcopybara-github
authored andcommitted
Updates LLVM usage to match [cea799afc632](llvm/llvm-project@cea799afc632) PiperOrigin-RevId: 725108532
1 parent 9b3dd7d commit 7e716e1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

bazel/import_llvm.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ load(
77

88
def import_llvm(name):
99
"""Imports LLVM."""
10-
LLVM_COMMIT = "c269182b13abddc459820e57a4d2065f364b23dc"
10+
LLVM_COMMIT = "cea799afc632879f7d08157108a60c67317829a2"
1111

1212
new_git_repository(
1313
name = name,

tests/Dialect/Secret/Transforms/canonicalize/canonicalize_tensor.mlir

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ module {
2323
%cst = arith.constant 0.000000e+00 : f32
2424
%0 = secret.generic ins(%arg0, %arg1, %arg2 : !secret.secret<tensor<28x28xf32>>, !secret.secret<tensor<784x10xf32>>, !secret.secret<tensor<1x10xf32>>) {
2525
^bb0(%arg3: tensor<28x28xf32>, %arg4: tensor<784x10xf32>, %arg5: tensor<1x10xf32>):
26-
%1 = tosa.reshape %arg3 {new_shape = array<i64: 1, 1, 784>} : (tensor<28x28xf32>) -> tensor<1x1x784xf32>
27-
%2 = tosa.reshape %arg4 {new_shape = array<i64: 1, 784, 10>} : (tensor<784x10xf32>) -> tensor<1x784x10xf32>
26+
%s_1 = "tosa.const_shape"() {value = dense<[1, 1, 784]> : tensor<3xindex>} : () -> !tosa.shape<3>
27+
%1 = tosa.reshape %arg3, %s_1 : (tensor<28x28xf32>, !tosa.shape<3>) -> tensor<1x1x784xf32>
28+
%s_2 = "tosa.const_shape"() {value = dense<[1, 784, 10]> : tensor<3xindex>} : () -> !tosa.shape<3>
29+
%2 = tosa.reshape %arg4, %s_2 : (tensor<784x10xf32>, !tosa.shape<3>) -> tensor<1x784x10xf32>
2830
%3 = tensor.empty() : tensor<1x1x10xf32>
2931
%4 = affine.for %arg6 = 0 to 10 iter_args(%arg7 = %3) -> (tensor<1x1x10xf32>) {
3032
%inserted = tensor.insert %cst into %arg7[%c0, %c0, %arg6] : tensor<1x1x10xf32>
@@ -42,7 +44,8 @@ module {
4244
}
4345
affine.yield %9 : tensor<1x1x10xf32>
4446
}
45-
%6 = tosa.reshape %5 {new_shape = array<i64: 1, 10>} : (tensor<1x1x10xf32>) -> tensor<1x10xf32>
47+
%s_6 = "tosa.const_shape"() {value = dense<[1, 10]> : tensor<2xindex>} : () -> !tosa.shape<2>
48+
%6 = tosa.reshape %5, %s_6 : (tensor<1x1x10xf32>, !tosa.shape<2>) -> tensor<1x10xf32>
4649
%7 = tensor.empty() : tensor<1x10xf32>
4750
%8 = affine.for %arg6 = 0 to 10 iter_args(%arg7 = %7) -> (tensor<1x10xf32>) {
4851
%extracted = tensor.extract %6[%c0, %arg6] : tensor<1x10xf32>

0 commit comments

Comments
 (0)