Skip to content

Commit 3c2d0e6

Browse files
pifon2atensorflower-gardener
authored andcommitted
Updates LLVM usage to match [6ce76ff7eb76](llvm/llvm-project@6ce76ff7eb76) PiperOrigin-RevId: 367678843 Change-Id: Ieeb2e1216ee1ffb824ed0f53a88a5441ed0f8f30
1 parent 38c9919 commit 3c2d0e6

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎tensorflow/compiler/mlir/hlo/tests/move_up_dynamic_broadcasts_for_fusion.mlir‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ func @move_shape_of_into_assuming(%arg0 : !shape.witness,
129129
shape.assuming_yield %arg1, %1 : tensor<?x32xf32>, tensor<?x32xf32>
130130
}
131131
%2 = shape.shape_of %0#1 : tensor<?x32xf32> -> tensor<3xindex>
132+
"use"(%0#0, %0#1) : (tensor<?x32xf32>, tensor<?x32xf32>) -> ()
132133
return %2 : tensor<3xindex>
133134
}
134135

@@ -150,6 +151,7 @@ func @move_cstr_broadcastable_into_assuming(%arg0 : !shape.witness,
150151
shape.assuming_yield %arg1, %1 : tensor<2xindex>, tensor<3xindex>
151152
}
152153
%1 = shape.cstr_broadcastable %arg1, %0#1 : tensor<2xindex>, tensor<3xindex>
154+
"use"(%0#0, %0#1) : (tensor<2xindex>, tensor<3xindex>) -> ()
153155
return %1 : !shape.witness
154156
}
155157

@@ -223,6 +225,7 @@ func @move_shape_of_out_of_assuming(%arg0 : !shape.witness,
223225
%2 = shape.shape_of %arg1 : tensor<2x?xf32> -> tensor<2xindex>
224226
shape.assuming_yield %1, %2 : tensor<2x?xf32>, tensor<2xindex>
225227
}
228+
"use"(%0#0, %0#1) : (tensor<2x?xf32>, tensor<2xindex>) -> ()
226229
return %0#1 : tensor<2xindex>
227230
}
228231

@@ -283,6 +286,7 @@ func @merge_assuming_ops(%arg0: tensor<?x32xf16>, %arg1 : tensor<?x32xf16>,
283286
%8 = "another.producer"() : () -> tensor<?x?x32xf16>
284287
shape.assuming_yield %8 : tensor<?x?x32xf16>
285288
}
289+
"use"(%5, %7) : (tensor<?x32xf16>, tensor<?x?x32xf16>) -> ()
286290
return %7 : tensor<?x?x32xf16>
287291
}
288292

@@ -297,7 +301,7 @@ func @sub_sub(%arg0: tensor<?x32xf16>, %arg1 : tensor<?x32xf16>,
297301
// CHECK: %[[SHAPE1:.*]] = shape.shape_of %[[ARG1]]
298302
// CHECK: %[[SHAPE2:.*]] = shape.shape_of %[[ARG2]]
299303
// CHECK: %[[WITNESS:.*]] = shape.cstr_broadcastable %[[SHAPE2]], %[[SHAPE0]], %[[SHAPE1]], %[[SHAPE0]], %[[SHAPE1]]
300-
// CHECK: %[[ASSUMING_RESULTS:.*]]:4 = shape.assuming %[[WITNESS]]
304+
// CHECK: %[[ASSUMING_RESULT:.*]] = shape.assuming %[[WITNESS]]
301305
// CHECK-SAME: {
302306
// CHECK: %[[BCASTED_SHAPE01:.*]] = shape.broadcast %[[SHAPE0]], %[[SHAPE1]]
303307
// CHECK: %[[BCASTED_SHAPE012:.*]] = shape.broadcast %[[SHAPE2]], %[[BCASTED_SHAPE01]]
@@ -306,9 +310,9 @@ func @sub_sub(%arg0: tensor<?x32xf16>, %arg1 : tensor<?x32xf16>,
306310
// CHECK: %[[BCASTED_ARG1:.*]] = "mhlo.dynamic_broadcast_in_dim"(%[[ARG1]], %[[BCASTED_SHAPE012]]) {broadcast_dimensions = dense<[1, 2]> : tensor<2xi64>}
307311
// CHECK: %[[TMP:.*]] = mhlo.subtract %[[BCASTED_ARG0]], %[[BCASTED_ARG1]]
308312
// CHECK: %[[RESULT:.*]] = mhlo.subtract %[[BCASTED_ARG2]], %[[TMP]]
309-
// CHECK: shape.assuming_yield %{{.*}}, %{{.*}}, %{{.*}}, %[[RESULT]]
313+
// CHECK: shape.assuming_yield %[[RESULT]]
310314
// CHECK: }
311-
// CHECK: return %[[ASSUMING_RESULTS]]#3
315+
// CHECK: return %[[ASSUMING_RESULT]]
312316
%0 = shape.shape_of %arg0 : tensor<?x32xf16> -> tensor<2xindex>
313317
%1 = shape.shape_of %arg1 : tensor<?x32xf16> -> tensor<2xindex>
314318
%2 = shape.cstr_broadcastable %0, %1 : tensor<2xindex>, tensor<2xindex>

‎third_party/llvm/workspace.bzl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ load("//third_party:repo.bzl", "tf_http_archive")
44

55
def repo(name):
66
"""Imports LLVM."""
7-
LLVM_COMMIT = "39ae25fb8c648b0e710ba2d2d46e7a5b7fafff19"
8-
LLVM_SHA256 = "909ea626e84624fb428fdd6557bf35818b875dfd3ec72dfad810923c0662adf0"
7+
LLVM_COMMIT = "6ce76ff7eb7640e53b65f0473848ce7d08165c98"
8+
LLVM_SHA256 = "7f881381d7fd99216716416d9c98de36d47bebb433881fa54dd43b981163664f"
99

1010
tf_http_archive(
1111
name = name,

0 commit comments

Comments
 (0)