Skip to content

Commit

Permalink
Integrate LLVM at llvm/llvm-project@cea799afc632
Browse files Browse the repository at this point in the history
Updates LLVM usage to match
[cea799afc632](llvm/llvm-project@cea799afc632)

PiperOrigin-RevId: 725108532
  • Loading branch information
HEIR Team authored and copybara-github committed Feb 10, 2025
1 parent 9b3dd7d commit 7e716e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bazel/import_llvm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ load(

def import_llvm(name):
"""Imports LLVM."""
LLVM_COMMIT = "c269182b13abddc459820e57a4d2065f364b23dc"
LLVM_COMMIT = "cea799afc632879f7d08157108a60c67317829a2"

new_git_repository(
name = name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ module {
%cst = arith.constant 0.000000e+00 : f32
%0 = secret.generic ins(%arg0, %arg1, %arg2 : !secret.secret<tensor<28x28xf32>>, !secret.secret<tensor<784x10xf32>>, !secret.secret<tensor<1x10xf32>>) {
^bb0(%arg3: tensor<28x28xf32>, %arg4: tensor<784x10xf32>, %arg5: tensor<1x10xf32>):
%1 = tosa.reshape %arg3 {new_shape = array<i64: 1, 1, 784>} : (tensor<28x28xf32>) -> tensor<1x1x784xf32>
%2 = tosa.reshape %arg4 {new_shape = array<i64: 1, 784, 10>} : (tensor<784x10xf32>) -> tensor<1x784x10xf32>
%s_1 = "tosa.const_shape"() {value = dense<[1, 1, 784]> : tensor<3xindex>} : () -> !tosa.shape<3>
%1 = tosa.reshape %arg3, %s_1 : (tensor<28x28xf32>, !tosa.shape<3>) -> tensor<1x1x784xf32>
%s_2 = "tosa.const_shape"() {value = dense<[1, 784, 10]> : tensor<3xindex>} : () -> !tosa.shape<3>
%2 = tosa.reshape %arg4, %s_2 : (tensor<784x10xf32>, !tosa.shape<3>) -> tensor<1x784x10xf32>
%3 = tensor.empty() : tensor<1x1x10xf32>
%4 = affine.for %arg6 = 0 to 10 iter_args(%arg7 = %3) -> (tensor<1x1x10xf32>) {
%inserted = tensor.insert %cst into %arg7[%c0, %c0, %arg6] : tensor<1x1x10xf32>
Expand All @@ -42,7 +44,8 @@ module {
}
affine.yield %9 : tensor<1x1x10xf32>
}
%6 = tosa.reshape %5 {new_shape = array<i64: 1, 10>} : (tensor<1x1x10xf32>) -> tensor<1x10xf32>
%s_6 = "tosa.const_shape"() {value = dense<[1, 10]> : tensor<2xindex>} : () -> !tosa.shape<2>
%6 = tosa.reshape %5, %s_6 : (tensor<1x1x10xf32>, !tosa.shape<2>) -> tensor<1x10xf32>
%7 = tensor.empty() : tensor<1x10xf32>
%8 = affine.for %arg6 = 0 to 10 iter_args(%arg7 = %7) -> (tensor<1x10xf32>) {
%extracted = tensor.extract %6[%c0, %arg6] : tensor<1x10xf32>
Expand Down

0 comments on commit 7e716e1

Please sign in to comment.