22
33# Import third party config rules.
44load ("@bazel_skylib//lib:versions.bzl" , "versions" )
5- load ("@bazel_skylib//lib:paths.bzl" , "paths" )
65load ("//third_party/gpus:cuda_configure.bzl" , "cuda_configure" )
76load ("//third_party/gpus:rocm_configure.bzl" , "rocm_configure" )
87load ("//third_party/tensorrt:tensorrt_configure.bzl" , "tensorrt_configure" )
@@ -13,7 +12,7 @@ load("//third_party/systemlibs:syslibs_configure.bzl", "syslibs_configure")
1312load ("//tools/toolchains:cpus/aarch64/aarch64_compiler_configure.bzl" , "aarch64_compiler_configure" )
1413load ("//tools/toolchains:cpus/arm/arm_compiler_configure.bzl" , "arm_compiler_configure" )
1514load ("//tools/toolchains/embedded/arm-linux:arm_linux_toolchain_configure.bzl" , "arm_linux_toolchain_configure" )
16- load ("//third_party:repo.bzl" , "tf_http_archive" , "tf_mirror_urls" )
15+ load ("//third_party:repo.bzl" , "tf_http_archive" , "tf_mirror_urls" , "tf_vendored" )
1716load ("//third_party/clang_toolchain:cc_configure_clang.bzl" , "cc_download_clang_toolchain" )
1817load ("//third_party/llvm:setup.bzl" , "llvm_setup" )
1918
@@ -39,7 +38,7 @@ load("//tools/toolchains/remote_config:configs.bzl", "initialize_rbe_configs")
3938load ("//tools/toolchains/remote:configure.bzl" , "remote_execution_configure" )
4039load ("//tools/toolchains/clang6:repo.bzl" , "clang6_configure" )
4140
42- def _initialize_third_party (xla_path ):
41+ def _initialize_third_party ():
4342 """ Load third party repositories. See above load() statements. """
4443 absl ()
4544 benchmark ()
@@ -54,7 +53,7 @@ def _initialize_third_party(xla_path):
5453 tensorrt ()
5554 triton ()
5655
57- native . local_repository (name = "tsl" , path = paths . join ( xla_path + "third_party/tsl" ) )
56+ tf_vendored (name = "tsl" , relpath = "third_party/tsl" )
5857
5958# Toolchains & platforms required by Tensorflow to build.
6059def _tf_toolchains ():
@@ -605,7 +604,7 @@ def _tf_repositories():
605604
606605# buildifier: disable=function-docstring
607606# buildifier: disable=unnamed-macro
608- def workspace (xla_path = "./" ):
607+ def workspace ():
609608 # Check the bazel version before executing any repository rules, in case
610609 # those rules rely on the version we require here.
611610 versions .check ("1.0.0" )
@@ -614,7 +613,7 @@ def workspace(xla_path = "./"):
614613 _tf_toolchains ()
615614
616615 # Import third party repositories according to go/tfbr-thirdparty.
617- _initialize_third_party (xla_path )
616+ _initialize_third_party ()
618617
619618 # Import all other repositories. This should happen before initializing
620619 # any external repositories, because those come with their own
0 commit comments