From 1ac7e75ee629ddb4d780a34ff38ad8c8c0d050eb Mon Sep 17 00:00:00 2001 From: Michael Hudgins Date: Tue, 5 Sep 2023 08:15:21 -0700 Subject: [PATCH] Move XLA dependency to using tf_http_archive to enable the ability for bazel to use a GCS mirror for the XLA dependency. PiperOrigin-RevId: 562783418 --- third_party/xla/workspace.bzl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/third_party/xla/workspace.bzl b/third_party/xla/workspace.bzl index 12c9eba86..3a6545419 100644 --- a/third_party/xla/workspace.bzl +++ b/third_party/xla/workspace.bzl @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") # To update XLA to a new revision, # a) update XLA_COMMIT to the new git commit hash @@ -24,13 +24,11 @@ XLA_COMMIT = "09ee9c8ff80c66fffa1774cc89b20060698d3d52" XLA_SHA256 = "bc7ff5691e881dd80fc9794685e731e0e53ff459b0f7a8e380f4006f42da0d25" def repo(): - http_archive( + tf_http_archive( name = "xla", sha256 = XLA_SHA256, strip_prefix = "xla-{commit}".format(commit = XLA_COMMIT), - urls = [ - "https://github.com/openxla/xla/archive/{commit}.tar.gz".format(commit = XLA_COMMIT), - ], + urls = tf_mirror_urls("https://github.com/openxla/xla/archive/{commit}.tar.gz".format(commit = XLA_COMMIT)), ) # For development, one often wants to make changes to the TF repository as well