diff --git a/tensorflow/BUILD b/tensorflow/BUILD index 5dab9b300a8..71487e2aec0 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -1117,8 +1117,8 @@ bzl_library( "@local_config_cuda//cuda:build_defs_bzl", "@local_config_rocm//rocm:build_defs_bzl", "@local_config_tensorrt//:build_defs_bzl", - "@local_tsl//tsl:tsl_bzl", "@local_tsl//tsl/platform/default:cuda_build_defs_bzl", + "@local_xla//xla/tsl:tsl_bzl", "@local_xla//xla/tsl/mkl:build_defs_bzl", "@rules_java//java:rules", ], diff --git a/tensorflow/compiler/mlir/stablehlo/BUILD b/tensorflow/compiler/mlir/stablehlo/BUILD index 5d5342e8a26..28e2f104221 100644 --- a/tensorflow/compiler/mlir/stablehlo/BUILD +++ b/tensorflow/compiler/mlir/stablehlo/BUILD @@ -1,4 +1,4 @@ -load("@local_tsl//tsl:tsl.default.bzl", "tsl_pybind_extension") +load("@local_xla//xla/tsl:tsl.default.bzl", "tsl_pybind_extension") load("//tensorflow:pytype.default.bzl", "pytype_strict_library") load("//tensorflow:strict.default.bzl", "py_strict_test") diff --git a/tensorflow/core/data/service/snapshot/BUILD b/tensorflow/core/data/service/snapshot/BUILD index 717699dc1b2..523bfebc44d 100644 --- a/tensorflow/core/data/service/snapshot/BUILD +++ b/tensorflow/core/data/service/snapshot/BUILD @@ -1,6 +1,6 @@ # Distributed snapshot library. -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") load("//tensorflow:tensorflow.bzl", "tf_cc_test") load("//tensorflow:tensorflow.default.bzl", "tf_grpc_cc_dependencies", "tf_kernel_library") load("//tensorflow/core/platform:build_config.bzl", "tf_protos_profiler_service") diff --git a/tensorflow/core/platform/build_config.default.bzl b/tensorflow/core/platform/build_config.default.bzl index f3c7eba3fd0..650e776c042 100644 --- a/tensorflow/core/platform/build_config.default.bzl +++ b/tensorflow/core/platform/build_config.default.bzl @@ -2,7 +2,7 @@ load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_libtpu", ) load( diff --git a/tensorflow/core/platform/build_config_root.default.bzl b/tensorflow/core/platform/build_config_root.default.bzl index 1e40dd6a7a1..b503d99729b 100644 --- a/tensorflow/core/platform/build_config_root.default.bzl +++ b/tensorflow/core/platform/build_config_root.default.bzl @@ -3,7 +3,7 @@ # unused in TSL def tf_additional_plugin_deps(): return select({ - str(Label("@local_tsl//tsl:with_xla_support")): [ + str(Label("@local_xla//xla/tsl:with_xla_support")): [ str(Label("//tensorflow/compiler/jit")), ], "//conditions:default": [], diff --git a/tensorflow/core/platform/cloud/BUILD b/tensorflow/core/platform/cloud/BUILD index c1d6061917c..5f4ae9b22bd 100644 --- a/tensorflow/core/platform/cloud/BUILD +++ b/tensorflow/core/platform/cloud/BUILD @@ -2,7 +2,7 @@ # Cloud file system implementation. load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "tsl_copts", ) load("//tensorflow/core/platform:rules_cc.bzl", "cc_library") diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index a5887ab1de1..e015e7430bc 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -69,7 +69,7 @@ load( "rocm_copts", ) load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "tsl_gpu_library", _cc_header_only_library = "cc_header_only_library", _if_cuda_or_rocm = "if_cuda_or_rocm", diff --git a/tensorflow/tools/lib_package/BUILD b/tensorflow/tools/lib_package/BUILD index c78d03f82b5..6c005edb7c8 100644 --- a/tensorflow/tools/lib_package/BUILD +++ b/tensorflow/tools/lib_package/BUILD @@ -160,7 +160,7 @@ genrule( "@com_github_googlecloudplatform_google_cloud_cpp//:LICENSE", ], }) + select({ - "@local_tsl//tsl:with_numa_support": [ + "@local_xla//xla/tsl:with_numa_support": [ "@hwloc//:COPYING", ], "//conditions:default": [], @@ -203,7 +203,7 @@ genrule( "@com_github_googlecloudplatform_google_cloud_cpp//:LICENSE", ], }) + select({ - "@local_tsl//tsl:with_numa_support": [ + "@local_xla//xla/tsl:with_numa_support": [ "@hwloc//:COPYING", ], "//conditions:default": [], diff --git a/tensorflow/tools/pip_package/BUILD b/tensorflow/tools/pip_package/BUILD index 282b7c12291..c4d4c8d4060 100644 --- a/tensorflow/tools/pip_package/BUILD +++ b/tensorflow/tools/pip_package/BUILD @@ -113,7 +113,7 @@ filegroup( "@com_github_googlecloudplatform_google_cloud_cpp//:LICENSE", ], }) + select({ - "@local_tsl//tsl:with_numa_support": [ + "@local_xla//xla/tsl:with_numa_support": [ "@hwloc//:COPYING", ], "//conditions:default": [], diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD index b31d8488aaa..a58b18c73bd 100644 --- a/third_party/curl.BUILD +++ b/third_party/curl.BUILD @@ -353,13 +353,13 @@ cc_library( "lib/ws.c", "lib/ws.h", ] + select({ - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "lib/vtls/sectransp.c", ], - "@local_tsl//tsl:ios": [ + "@local_xla//xla/tsl:ios": [ "lib/vtls/sectransp.c", ], - "@local_tsl//tsl:windows": CURL_WIN_SRCS, + "@local_xla//xla/tsl:windows": CURL_WIN_SRCS, "//conditions:default": [ ], }), @@ -378,7 +378,7 @@ cc_library( "include/curl/websockets.h", ], copts = select({ - "@local_tsl//tsl:windows": CURL_WIN_COPTS, + "@local_xla//xla/tsl:windows": CURL_WIN_COPTS, "//conditions:default": [ "-Iexternal/curl/lib", "-D_GNU_SOURCE", @@ -391,10 +391,10 @@ cc_library( "-Wno-string-plus-int", ], }) + select({ - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "-fno-constant-cfstrings", ], - "@local_tsl//tsl:windows": [ + "@local_xla//xla/tsl:windows": [ # See curl.h for discussion of write size and Windows "/DCURL_MAX_WRITE_SIZE=16384", ], @@ -405,10 +405,10 @@ cc_library( defines = ["CURL_STATICLIB"], includes = ["include"], linkopts = select({ - "@local_tsl//tsl:android": [ + "@local_xla//xla/tsl:android": [ "-pie", ], - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "-Wl,-framework", "-Wl,CoreFoundation", "-Wl,-framework", @@ -416,8 +416,8 @@ cc_library( "-Wl,-framework", "-Wl,Security", ], - "@local_tsl//tsl:ios": [], - "@local_tsl//tsl:windows": [ + "@local_xla//xla/tsl:ios": [], + "@local_xla//xla/tsl:windows": [ "-DEFAULTLIB:ws2_32.lib", "-DEFAULTLIB:advapi32.lib", "-DEFAULTLIB:crypt32.lib", @@ -431,8 +431,8 @@ cc_library( deps = [ "@zlib", ] + select({ - "@local_tsl//tsl:ios": [], - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:ios": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "@boringssl//:ssl", ], @@ -538,7 +538,7 @@ cc_binary( "src/tool_xattr.h", ], copts = select({ - "@local_tsl//tsl:windows": CURL_BIN_WIN_COPTS, + "@local_xla//xla/tsl:windows": CURL_BIN_WIN_COPTS, "//conditions:default": [ "-Iexternal/curl/lib", "-D_GNU_SOURCE", diff --git a/third_party/gloo/gloo.BUILD b/third_party/gloo/gloo.BUILD index 68ba4e3610d..79fa3cb22c7 100644 --- a/third_party/gloo/gloo.BUILD +++ b/third_party/gloo/gloo.BUILD @@ -57,8 +57,8 @@ cc_library( "gloo/rendezvous/prefix_store.cc", "gloo/rendezvous/store.cc", ] + select({ - "@local_tsl//tsl:macos": [], - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:macos": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "gloo/common/linux.cc", ], diff --git a/third_party/hwloc/hwloc.BUILD b/third_party/hwloc/hwloc.BUILD index 457cef02490..c2ce91ac241 100644 --- a/third_party/hwloc/hwloc.BUILD +++ b/third_party/hwloc/hwloc.BUILD @@ -50,7 +50,7 @@ expand_template( name = "include_hwloc_autogen_config_h", out = "include/hwloc/autogen/config.h", substitutions = select({ - "@local_tsl//tsl:linux_x86_64": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS, + "@local_xla//xla/tsl:linux_x86_64": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS, "//conditions:default": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS, }), template = "include/hwloc/autogen/config.h.in", @@ -259,21 +259,21 @@ cc_library( "include/private/private.h", "include/private/xml.h", ] + select({ - "@local_tsl//tsl:linux_x86_64": [ + "@local_xla//xla/tsl:linux_x86_64": [ "hwloc/topology-linux.c", "hwloc/topology-x86.c", "include/hwloc/linux.h", "include/private/cpuid-x86.h", ], - "@local_tsl//tsl:linux_aarch64": [ + "@local_xla//xla/tsl:linux_aarch64": [ "hwloc/topology-linux.c", "include/hwloc/linux.h", ], - "@local_tsl//tsl:linux_ppc64le": [ + "@local_xla//xla/tsl:linux_ppc64le": [ "hwloc/topology-linux.c", "include/hwloc/linux.h", ], - "@local_tsl//tsl:freebsd": [ + "@local_xla//xla/tsl:freebsd": [ "hwloc/topology-freebsd.c", "hwloc/topology-x86.c", "include/private/cpuid-x86.h", diff --git a/third_party/llvm_openmp/BUILD b/third_party/llvm_openmp/BUILD index e60c91bbe37..031d29f5b7f 100644 --- a/third_party/llvm_openmp/BUILD +++ b/third_party/llvm_openmp/BUILD @@ -12,7 +12,7 @@ load( "libiomp5_cc_binary", ) load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_linux_x86_64", "if_macos", "if_windows", @@ -36,7 +36,7 @@ py_binary( ) kmp_i18n_os_type = select({ - "@local_tsl//tsl:windows": "win", + "@local_xla//xla/tsl:windows": "win", "//conditions:default": "lin", }) @@ -114,7 +114,7 @@ omp_vars_win = { } omp_all_cmake_vars = select({ - "@local_tsl//tsl:windows": cmake_var_string( + "@local_xla//xla/tsl:windows": cmake_var_string( dict_add( omp_vars, omp_vars_win, diff --git a/third_party/llvm_openmp/openmp.bzl b/third_party/llvm_openmp/openmp.bzl index df985649a2f..bbc44451c60 100644 --- a/third_party/llvm_openmp/openmp.bzl +++ b/third_party/llvm_openmp/openmp.bzl @@ -33,9 +33,9 @@ def dict_add(*dictionaries): def select_os_specific(L, M, W): return select({ - "@local_tsl//tsl:linux_x86_64": L, - "@local_tsl//tsl:macos": M, - "@local_tsl//tsl:windows": W, + "@local_xla//xla/tsl:linux_x86_64": L, + "@local_xla//xla/tsl:macos": M, + "@local_xla//xla/tsl:windows": W, "//conditions:default": L, }) diff --git a/third_party/mkl_dnn/mkldnn_v1.BUILD b/third_party/mkl_dnn/mkldnn_v1.BUILD index 021557f4c2b..cc9e66d77e3 100644 --- a/third_party/mkl_dnn/mkldnn_v1.BUILD +++ b/third_party/mkl_dnn/mkldnn_v1.BUILD @@ -1,6 +1,6 @@ load("@bazel_skylib//rules:expand_template.bzl", "expand_template") load("@local_tsl//third_party/mkl_dnn:build_defs.bzl", "if_mkldnn_openmp") -load("@local_tsl//tsl:tsl.bzl", "tf_openmp_copts") +load("@local_xla//xla/tsl:tsl.bzl", "tf_openmp_copts") load("@local_xla//xla/tsl/mkl:build_defs.bzl", "if_mkl", "if_mkl_ml") exports_files(["LICENSE"]) @@ -102,7 +102,7 @@ expand_template( ) _COPTS_LIST = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": ["-fexceptions"], }) + [ "-UUSE_MKL", @@ -171,9 +171,9 @@ cc_library( includes = _INCLUDES_LIST, # TODO(penpornk): Use lrt_if_needed from tensorflow.bzl instead. linkopts = select({ - "@local_tsl//tsl:linux_aarch64": ["-lrt"], - "@local_tsl//tsl:linux_x86_64": ["-lrt"], - "@local_tsl//tsl:linux_ppc64le": ["-lrt"], + "@local_xla//xla/tsl:linux_aarch64": ["-lrt"], + "@local_xla//xla/tsl:linux_x86_64": ["-lrt"], + "@local_xla//xla/tsl:linux_ppc64le": ["-lrt"], "//conditions:default": [], }), textual_hdrs = _TEXTUAL_HDRS_LIST, diff --git a/third_party/nccl/build_defs.bzl.tpl b/third_party/nccl/build_defs.bzl.tpl index 25dcdf4aa23..53a6d4e1e41 100644 --- a/third_party/nccl/build_defs.bzl.tpl +++ b/third_party/nccl/build_defs.bzl.tpl @@ -329,8 +329,8 @@ def cuda_rdc_library(name, hdrs = None, copts = None, linkstatic = True, **kwarg out = dlink_cc, gpu_archs = cuda_gpu_architectures(), nvlink_args = select({ - "@local_tsl//tsl:linux_x86_64": ["--cpu-arch=X86_64"], - "@local_tsl//tsl:linux_ppc64le": ["--cpu-arch=PPC64LE"], + "@local_xla//xla/tsl:linux_x86_64": ["--cpu-arch=X86_64"], + "@local_xla//xla/tsl:linux_ppc64le": ["--cpu-arch=PPC64LE"], "//conditions:default": [], }), ) diff --git a/third_party/png.BUILD b/third_party/png.BUILD index 0e2a5d0e3c4..e79442e35bc 100644 --- a/third_party/png.BUILD +++ b/third_party/png.BUILD @@ -33,7 +33,7 @@ cc_library( "intel/filter_sse2_intrinsics.c", "intel/intel_init.c", ], - "@local_tsl//tsl:linux_ppc64le": [ + "@local_xla//xla/tsl:linux_ppc64le": [ "powerpc/filter_vsx_intrinsics.c", "powerpc/powerpc_init.c", ], diff --git a/third_party/snappy.BUILD b/third_party/snappy.BUILD index fbf4e2eae9e..9559b8e9f17 100644 --- a/third_party/snappy.BUILD +++ b/third_party/snappy.BUILD @@ -19,7 +19,7 @@ cc_library( ], hdrs = ["snappy.h"], copts = ["-DHAVE_CONFIG_H"] + select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "-fno-exceptions", "-Wno-sign-compare", @@ -28,7 +28,7 @@ cc_library( ], }), defines = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": ["HAVE_SYS_UIO_H"], }), ) diff --git a/third_party/sqlite.BUILD b/third_party/sqlite.BUILD index 353c65c9a6e..de61e86bf91 100644 --- a/third_party/sqlite.BUILD +++ b/third_party/sqlite.BUILD @@ -11,10 +11,10 @@ SQLITE_COPTS = [ "-D_FILE_OFFSET_BITS=64", "-D_REENTRANT=1", ] + select({ - "@local_tsl//tsl:windows": [ + "@local_xla//xla/tsl:windows": [ "-DSQLITE_MAX_TRIGGER_DEPTH=100", ], - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "-Os", "-DHAVE_GMTIME_R=1", "-DHAVE_LOCALTIME_R=1", @@ -46,7 +46,7 @@ cc_library( "SQLITE_OMIT_DEPRECATED", ], linkopts = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "-ldl", "-lpthread", diff --git a/third_party/vulkan_headers/vulkan_headers.BUILD b/third_party/vulkan_headers/vulkan_headers.BUILD index 3fef1972332..35c4a2d4439 100644 --- a/third_party/vulkan_headers/vulkan_headers.BUILD +++ b/third_party/vulkan_headers/vulkan_headers.BUILD @@ -53,8 +53,8 @@ cc_library( name = "vulkan_hpp", srcs = select({ - "@local_tsl//tsl:macos": [], - "@local_tsl//tsl:ios": [], + "@local_xla//xla/tsl:macos": [], + "@local_xla//xla/tsl:ios": [], "//conditions:default": ["tensorflow/vulkan_hpp_dispatch_loader_dynamic.cc"], }), hdrs = ["include/vulkan/vulkan.hpp"], @@ -65,8 +65,8 @@ cc_library( "VULKAN_HPP_TYPESAFE_CONVERSION", "VULKAN_HPP_TYPESAFE_EXPLICIT", ] + select({ - "@local_tsl//tsl:macos": [], - "@local_tsl//tsl:ios": [], + "@local_xla//xla/tsl:macos": [], + "@local_xla//xla/tsl:ios": [], "//conditions:default": ["VULKAN_HPP_DISPATCH_LOADER_DYNAMIC"], }), includes = ["include"], diff --git a/third_party/xla/third_party/gloo/gloo.BUILD b/third_party/xla/third_party/gloo/gloo.BUILD index e960fc518a7..99a8e32c69c 100644 --- a/third_party/xla/third_party/gloo/gloo.BUILD +++ b/third_party/xla/third_party/gloo/gloo.BUILD @@ -57,8 +57,8 @@ cc_library( "gloo/rendezvous/prefix_store.cc", "gloo/rendezvous/store.cc", ] + select({ - "@local_tsl//tsl:macos": [], - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:macos": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "gloo/common/linux.cc", ], diff --git a/third_party/xla/third_party/llvm_openmp/BUILD b/third_party/xla/third_party/llvm_openmp/BUILD index e60c91bbe37..031d29f5b7f 100644 --- a/third_party/xla/third_party/llvm_openmp/BUILD +++ b/third_party/xla/third_party/llvm_openmp/BUILD @@ -12,7 +12,7 @@ load( "libiomp5_cc_binary", ) load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_linux_x86_64", "if_macos", "if_windows", @@ -36,7 +36,7 @@ py_binary( ) kmp_i18n_os_type = select({ - "@local_tsl//tsl:windows": "win", + "@local_xla//xla/tsl:windows": "win", "//conditions:default": "lin", }) @@ -114,7 +114,7 @@ omp_vars_win = { } omp_all_cmake_vars = select({ - "@local_tsl//tsl:windows": cmake_var_string( + "@local_xla//xla/tsl:windows": cmake_var_string( dict_add( omp_vars, omp_vars_win, diff --git a/third_party/xla/third_party/llvm_openmp/openmp.bzl b/third_party/xla/third_party/llvm_openmp/openmp.bzl index df985649a2f..bbc44451c60 100644 --- a/third_party/xla/third_party/llvm_openmp/openmp.bzl +++ b/third_party/xla/third_party/llvm_openmp/openmp.bzl @@ -33,9 +33,9 @@ def dict_add(*dictionaries): def select_os_specific(L, M, W): return select({ - "@local_tsl//tsl:linux_x86_64": L, - "@local_tsl//tsl:macos": M, - "@local_tsl//tsl:windows": W, + "@local_xla//xla/tsl:linux_x86_64": L, + "@local_xla//xla/tsl:macos": M, + "@local_xla//xla/tsl:windows": W, "//conditions:default": L, }) diff --git a/third_party/xla/third_party/tsl/third_party/curl.BUILD b/third_party/xla/third_party/tsl/third_party/curl.BUILD index b31d8488aaa..a58b18c73bd 100644 --- a/third_party/xla/third_party/tsl/third_party/curl.BUILD +++ b/third_party/xla/third_party/tsl/third_party/curl.BUILD @@ -353,13 +353,13 @@ cc_library( "lib/ws.c", "lib/ws.h", ] + select({ - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "lib/vtls/sectransp.c", ], - "@local_tsl//tsl:ios": [ + "@local_xla//xla/tsl:ios": [ "lib/vtls/sectransp.c", ], - "@local_tsl//tsl:windows": CURL_WIN_SRCS, + "@local_xla//xla/tsl:windows": CURL_WIN_SRCS, "//conditions:default": [ ], }), @@ -378,7 +378,7 @@ cc_library( "include/curl/websockets.h", ], copts = select({ - "@local_tsl//tsl:windows": CURL_WIN_COPTS, + "@local_xla//xla/tsl:windows": CURL_WIN_COPTS, "//conditions:default": [ "-Iexternal/curl/lib", "-D_GNU_SOURCE", @@ -391,10 +391,10 @@ cc_library( "-Wno-string-plus-int", ], }) + select({ - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "-fno-constant-cfstrings", ], - "@local_tsl//tsl:windows": [ + "@local_xla//xla/tsl:windows": [ # See curl.h for discussion of write size and Windows "/DCURL_MAX_WRITE_SIZE=16384", ], @@ -405,10 +405,10 @@ cc_library( defines = ["CURL_STATICLIB"], includes = ["include"], linkopts = select({ - "@local_tsl//tsl:android": [ + "@local_xla//xla/tsl:android": [ "-pie", ], - "@local_tsl//tsl:macos": [ + "@local_xla//xla/tsl:macos": [ "-Wl,-framework", "-Wl,CoreFoundation", "-Wl,-framework", @@ -416,8 +416,8 @@ cc_library( "-Wl,-framework", "-Wl,Security", ], - "@local_tsl//tsl:ios": [], - "@local_tsl//tsl:windows": [ + "@local_xla//xla/tsl:ios": [], + "@local_xla//xla/tsl:windows": [ "-DEFAULTLIB:ws2_32.lib", "-DEFAULTLIB:advapi32.lib", "-DEFAULTLIB:crypt32.lib", @@ -431,8 +431,8 @@ cc_library( deps = [ "@zlib", ] + select({ - "@local_tsl//tsl:ios": [], - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:ios": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "@boringssl//:ssl", ], @@ -538,7 +538,7 @@ cc_binary( "src/tool_xattr.h", ], copts = select({ - "@local_tsl//tsl:windows": CURL_BIN_WIN_COPTS, + "@local_xla//xla/tsl:windows": CURL_BIN_WIN_COPTS, "//conditions:default": [ "-Iexternal/curl/lib", "-D_GNU_SOURCE", diff --git a/third_party/xla/third_party/tsl/third_party/hwloc/hwloc.BUILD b/third_party/xla/third_party/tsl/third_party/hwloc/hwloc.BUILD index 457cef02490..c2ce91ac241 100644 --- a/third_party/xla/third_party/tsl/third_party/hwloc/hwloc.BUILD +++ b/third_party/xla/third_party/tsl/third_party/hwloc/hwloc.BUILD @@ -50,7 +50,7 @@ expand_template( name = "include_hwloc_autogen_config_h", out = "include/hwloc/autogen/config.h", substitutions = select({ - "@local_tsl//tsl:linux_x86_64": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS, + "@local_xla//xla/tsl:linux_x86_64": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_LINUX_SUBS, "//conditions:default": _INCLUDE_HWLOC_AUTOIGEN_CONFIG_H_COMMON_SUBS, }), template = "include/hwloc/autogen/config.h.in", @@ -259,21 +259,21 @@ cc_library( "include/private/private.h", "include/private/xml.h", ] + select({ - "@local_tsl//tsl:linux_x86_64": [ + "@local_xla//xla/tsl:linux_x86_64": [ "hwloc/topology-linux.c", "hwloc/topology-x86.c", "include/hwloc/linux.h", "include/private/cpuid-x86.h", ], - "@local_tsl//tsl:linux_aarch64": [ + "@local_xla//xla/tsl:linux_aarch64": [ "hwloc/topology-linux.c", "include/hwloc/linux.h", ], - "@local_tsl//tsl:linux_ppc64le": [ + "@local_xla//xla/tsl:linux_ppc64le": [ "hwloc/topology-linux.c", "include/hwloc/linux.h", ], - "@local_tsl//tsl:freebsd": [ + "@local_xla//xla/tsl:freebsd": [ "hwloc/topology-freebsd.c", "hwloc/topology-x86.c", "include/private/cpuid-x86.h", diff --git a/third_party/xla/third_party/tsl/third_party/llvm_openmp/BUILD b/third_party/xla/third_party/tsl/third_party/llvm_openmp/BUILD index e60c91bbe37..031d29f5b7f 100644 --- a/third_party/xla/third_party/tsl/third_party/llvm_openmp/BUILD +++ b/third_party/xla/third_party/tsl/third_party/llvm_openmp/BUILD @@ -12,7 +12,7 @@ load( "libiomp5_cc_binary", ) load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_linux_x86_64", "if_macos", "if_windows", @@ -36,7 +36,7 @@ py_binary( ) kmp_i18n_os_type = select({ - "@local_tsl//tsl:windows": "win", + "@local_xla//xla/tsl:windows": "win", "//conditions:default": "lin", }) @@ -114,7 +114,7 @@ omp_vars_win = { } omp_all_cmake_vars = select({ - "@local_tsl//tsl:windows": cmake_var_string( + "@local_xla//xla/tsl:windows": cmake_var_string( dict_add( omp_vars, omp_vars_win, diff --git a/third_party/xla/third_party/tsl/third_party/llvm_openmp/openmp.bzl b/third_party/xla/third_party/tsl/third_party/llvm_openmp/openmp.bzl index df985649a2f..bbc44451c60 100644 --- a/third_party/xla/third_party/tsl/third_party/llvm_openmp/openmp.bzl +++ b/third_party/xla/third_party/tsl/third_party/llvm_openmp/openmp.bzl @@ -33,9 +33,9 @@ def dict_add(*dictionaries): def select_os_specific(L, M, W): return select({ - "@local_tsl//tsl:linux_x86_64": L, - "@local_tsl//tsl:macos": M, - "@local_tsl//tsl:windows": W, + "@local_xla//xla/tsl:linux_x86_64": L, + "@local_xla//xla/tsl:macos": M, + "@local_xla//xla/tsl:windows": W, "//conditions:default": L, }) diff --git a/third_party/xla/third_party/tsl/third_party/mkl_dnn/mkldnn_v1.BUILD b/third_party/xla/third_party/tsl/third_party/mkl_dnn/mkldnn_v1.BUILD index 021557f4c2b..cc9e66d77e3 100644 --- a/third_party/xla/third_party/tsl/third_party/mkl_dnn/mkldnn_v1.BUILD +++ b/third_party/xla/third_party/tsl/third_party/mkl_dnn/mkldnn_v1.BUILD @@ -1,6 +1,6 @@ load("@bazel_skylib//rules:expand_template.bzl", "expand_template") load("@local_tsl//third_party/mkl_dnn:build_defs.bzl", "if_mkldnn_openmp") -load("@local_tsl//tsl:tsl.bzl", "tf_openmp_copts") +load("@local_xla//xla/tsl:tsl.bzl", "tf_openmp_copts") load("@local_xla//xla/tsl/mkl:build_defs.bzl", "if_mkl", "if_mkl_ml") exports_files(["LICENSE"]) @@ -102,7 +102,7 @@ expand_template( ) _COPTS_LIST = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": ["-fexceptions"], }) + [ "-UUSE_MKL", @@ -171,9 +171,9 @@ cc_library( includes = _INCLUDES_LIST, # TODO(penpornk): Use lrt_if_needed from tensorflow.bzl instead. linkopts = select({ - "@local_tsl//tsl:linux_aarch64": ["-lrt"], - "@local_tsl//tsl:linux_x86_64": ["-lrt"], - "@local_tsl//tsl:linux_ppc64le": ["-lrt"], + "@local_xla//xla/tsl:linux_aarch64": ["-lrt"], + "@local_xla//xla/tsl:linux_x86_64": ["-lrt"], + "@local_xla//xla/tsl:linux_ppc64le": ["-lrt"], "//conditions:default": [], }), textual_hdrs = _TEXTUAL_HDRS_LIST, diff --git a/third_party/xla/third_party/tsl/third_party/nccl/build_defs.bzl.tpl b/third_party/xla/third_party/tsl/third_party/nccl/build_defs.bzl.tpl index 25dcdf4aa23..53a6d4e1e41 100644 --- a/third_party/xla/third_party/tsl/third_party/nccl/build_defs.bzl.tpl +++ b/third_party/xla/third_party/tsl/third_party/nccl/build_defs.bzl.tpl @@ -329,8 +329,8 @@ def cuda_rdc_library(name, hdrs = None, copts = None, linkstatic = True, **kwarg out = dlink_cc, gpu_archs = cuda_gpu_architectures(), nvlink_args = select({ - "@local_tsl//tsl:linux_x86_64": ["--cpu-arch=X86_64"], - "@local_tsl//tsl:linux_ppc64le": ["--cpu-arch=PPC64LE"], + "@local_xla//xla/tsl:linux_x86_64": ["--cpu-arch=X86_64"], + "@local_xla//xla/tsl:linux_ppc64le": ["--cpu-arch=PPC64LE"], "//conditions:default": [], }), ) diff --git a/third_party/xla/third_party/tsl/third_party/snappy.BUILD b/third_party/xla/third_party/tsl/third_party/snappy.BUILD index fbf4e2eae9e..9559b8e9f17 100644 --- a/third_party/xla/third_party/tsl/third_party/snappy.BUILD +++ b/third_party/xla/third_party/tsl/third_party/snappy.BUILD @@ -19,7 +19,7 @@ cc_library( ], hdrs = ["snappy.h"], copts = ["-DHAVE_CONFIG_H"] + select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "-fno-exceptions", "-Wno-sign-compare", @@ -28,7 +28,7 @@ cc_library( ], }), defines = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": ["HAVE_SYS_UIO_H"], }), ) diff --git a/third_party/xla/third_party/tsl/third_party/zlib.BUILD b/third_party/xla/third_party/tsl/third_party/zlib.BUILD index b8ca17d13b3..bab615b54df 100644 --- a/third_party/xla/third_party/tsl/third_party/zlib.BUILD +++ b/third_party/xla/third_party/tsl/third_party/zlib.BUILD @@ -33,7 +33,7 @@ cc_library( ], hdrs = ["zlib.h"], copts = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "-Wno-shift-negative-value", "-DZ_HAVE_UNISTD_H", diff --git a/third_party/xla/third_party/tsl/tsl/concurrency/BUILD b/third_party/xla/third_party/tsl/tsl/concurrency/BUILD index bbf4c8e157c..9eded5f2cab 100644 --- a/third_party/xla/third_party/tsl/tsl/concurrency/BUILD +++ b/third_party/xla/third_party/tsl/tsl/concurrency/BUILD @@ -1,5 +1,5 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") load("//tsl/platform:build_config.bzl", "tsl_cc_test") package( diff --git a/third_party/xla/third_party/tsl/tsl/distributed_runtime/BUILD b/third_party/xla/third_party/tsl/tsl/distributed_runtime/BUILD index 69980ac4a1d..e1876e12915 100644 --- a/third_party/xla/third_party/tsl/tsl/distributed_runtime/BUILD +++ b/third_party/xla/third_party/tsl/tsl/distributed_runtime/BUILD @@ -6,12 +6,12 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ - "//tsl:internal", + "@local_xla//xla/tsl:internal", ]), licenses = ["notice"], ) diff --git a/third_party/xla/third_party/tsl/tsl/distributed_runtime/coordination/BUILD b/third_party/xla/third_party/tsl/tsl/distributed_runtime/coordination/BUILD index a95081f56bd..51c9217357e 100644 --- a/third_party/xla/third_party/tsl/tsl/distributed_runtime/coordination/BUILD +++ b/third_party/xla/third_party/tsl/tsl/distributed_runtime/coordination/BUILD @@ -1,11 +1,11 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "if_oss", "internal_visibility", "tsl_gpu_library") +load("@local_xla//xla/tsl:tsl.bzl", "if_oss", "internal_visibility", "tsl_gpu_library") load("//tsl/platform:build_config.bzl", "tf_proto_library", "tsl_cc_test") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ - "//tsl:internal", + "@local_xla//xla/tsl:internal", ]), licenses = ["notice"], ) diff --git a/third_party/xla/third_party/tsl/tsl/distributed_runtime/preemption/BUILD b/third_party/xla/third_party/tsl/tsl/distributed_runtime/preemption/BUILD index 4acb411bf32..acb086535cb 100644 --- a/third_party/xla/third_party/tsl/tsl/distributed_runtime/preemption/BUILD +++ b/third_party/xla/third_party/tsl/tsl/distributed_runtime/preemption/BUILD @@ -1,12 +1,12 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable", "tsl_grpc_cc_dependencies") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable", "tsl_grpc_cc_dependencies") load("//tsl/platform:build_config.bzl", "tsl_cc_test") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ - "//tsl:internal", + "@local_xla//xla/tsl:internal", ]), licenses = ["notice"], ) diff --git a/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/BUILD b/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/BUILD index 205029043be..1e54cf545e3 100644 --- a/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/BUILD +++ b/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/BUILD @@ -2,14 +2,14 @@ # RPC communication interfaces and implementations for TensorFlow. load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") load("//tsl/platform:build_config.bzl", "tf_proto_library", "tsl_cc_test") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ - "//tsl:internal", + "@local_xla//xla/tsl:internal", ]), licenses = ["notice"], ) diff --git a/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/coordination/BUILD b/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/coordination/BUILD index 7eb439e018a..44ff19fd570 100644 --- a/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/coordination/BUILD +++ b/third_party/xla/third_party/tsl/tsl/distributed_runtime/rpc/coordination/BUILD @@ -1,11 +1,11 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ - "//tsl:internal", + "@local_xla//xla/tsl:internal", ]), licenses = ["notice"], ) diff --git a/third_party/xla/third_party/tsl/tsl/framework/BUILD b/third_party/xla/third_party/tsl/tsl/framework/BUILD index bca669a616f..e6e771d111f 100644 --- a/third_party/xla/third_party/tsl/tsl/framework/BUILD +++ b/third_party/xla/third_party/tsl/tsl/framework/BUILD @@ -8,8 +8,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/framework/contraction/BUILD b/third_party/xla/third_party/tsl/tsl/framework/contraction/BUILD index 47bf5f20aa8..e047e3f3852 100644 --- a/third_party/xla/third_party/tsl/tsl/framework/contraction/BUILD +++ b/third_party/xla/third_party/tsl/tsl/framework/contraction/BUILD @@ -1,7 +1,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -88,15 +88,15 @@ cc_library( hdrs = ["eigen_contraction_kernel.h"], defines = select({ ":disable_onednn_contraction_kernel_config": [], - "//tsl:android_x86": [], - "//tsl:arm_any": [ + "@local_xla//xla/tsl:android_x86": [], + "@local_xla//xla/tsl:arm_any": [ "TENSORFLOW_USE_CUSTOM_CONTRACTION_KERNEL", ], - "//tsl:fuchsia_x86_64": [], - "//tsl:ios": [], - "//tsl:linux_ppc64le": [], - "//tsl:linux_s390x": [], - "//tsl:macos_arm64": [], + "@local_xla//xla/tsl:fuchsia_x86_64": [], + "@local_xla//xla/tsl:ios": [], + "@local_xla//xla/tsl:linux_ppc64le": [], + "@local_xla//xla/tsl:linux_s390x": [], + "@local_xla//xla/tsl:macos_arm64": [], "//conditions:default": [ "TENSORFLOW_USE_CUSTOM_CONTRACTION_KERNEL", "TENSORFLOW_USE_MKLDNN_CONTRACTION_KERNEL", @@ -109,13 +109,13 @@ cc_library( "@eigen_archive//:eigen3", ] + select({ ":disable_onednn_contraction_kernel_config": [], - "//tsl:android_x86": [], - "//tsl:arm_any": [], - "//tsl:fuchsia_x86_64": [], - "//tsl:ios": [], - "//tsl:linux_ppc64le": [], - "//tsl:linux_s390x": [], - "//tsl:macos_arm64": [], + "@local_xla//xla/tsl:android_x86": [], + "@local_xla//xla/tsl:arm_any": [], + "@local_xla//xla/tsl:fuchsia_x86_64": [], + "@local_xla//xla/tsl:ios": [], + "@local_xla//xla/tsl:linux_ppc64le": [], + "@local_xla//xla/tsl:linux_s390x": [], + "@local_xla//xla/tsl:macos_arm64": [], "//conditions:default": ["@onednn//:mkl_dnn"], }), ) @@ -137,7 +137,7 @@ cc_library( # Somehow the following code works with fixedpoint, but not here. # visibility = [ # "//tensorflow:__subpackages__", - # "//tsl:internal", + # "@local_xla//xla/tsl:internal", # ], deps = [ "//tsl/framework/fixedpoint", diff --git a/third_party/xla/third_party/tsl/tsl/framework/convolution/BUILD b/third_party/xla/third_party/tsl/tsl/framework/convolution/BUILD index 6af7b983946..c019f7ff998 100644 --- a/third_party/xla/third_party/tsl/tsl/framework/convolution/BUILD +++ b/third_party/xla/third_party/tsl/tsl/framework/convolution/BUILD @@ -1,5 +1,5 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", @@ -64,7 +64,7 @@ filegroup( # Somehow the following code works with fixedpoint, but not here. # visibility = [ # "//tensorflow:__subpackages__", - # "//tsl:internal", + # "@local_xla//xla/tsl:internal", # ], ) diff --git a/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/BUILD b/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/BUILD index 5818820ad65..dc9d644968a 100644 --- a/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/BUILD +++ b/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/BUILD @@ -1,6 +1,6 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -50,7 +50,7 @@ filegroup( compatible_with = get_compatible_with_portable(), visibility = internal_visibility([ "//tensorflow:__subpackages__", - "//tsl:internal", + "@local_xla//xla/tsl:internal", ]), ) diff --git a/third_party/xla/third_party/tsl/tsl/lib/core/BUILD b/third_party/xla/third_party/tsl/tsl/lib/core/BUILD index c5b5830535d..285a5bf3455 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/core/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/core/BUILD @@ -8,8 +8,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") load("//tsl/platform:build_config.bzl", "tsl_cc_test") # TODO(rdzhabarov): Tighten visibility after migration is complete. diff --git a/third_party/xla/third_party/tsl/tsl/lib/gtl/BUILD b/third_party/xla/third_party/tsl/tsl/lib/gtl/BUILD index 8a6185374c9..514bdb04c5d 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/gtl/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/gtl/BUILD @@ -2,8 +2,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/lib/gtl/subtle/BUILD b/third_party/xla/third_party/tsl/tsl/lib/gtl/subtle/BUILD index 3e9bfe7a5d0..e2f9763dfd2 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/gtl/subtle/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/gtl/subtle/BUILD @@ -1,8 +1,8 @@ # Description: # gtl subtle packages. -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/lib/hash/BUILD b/third_party/xla/third_party/tsl/tsl/lib/hash/BUILD index 2145beac6e8..c497abfe17a 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/hash/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/hash/BUILD @@ -3,12 +3,12 @@ load( "cc_library", ) load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_linux_x86_64", "internal_visibility", "tsl_copts", ) -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/lib/histogram/BUILD b/third_party/xla/third_party/tsl/tsl/lib/histogram/BUILD index 3f0565eaf9a..7d6f66ad849 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/histogram/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/histogram/BUILD @@ -2,8 +2,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/lib/io/BUILD b/third_party/xla/third_party/tsl/tsl/lib/io/BUILD index 9d6e02ec835..e92e2896dc9 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/io/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/io/BUILD @@ -2,8 +2,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") load("//tsl/platform:build_config.bzl", "tsl_cc_test") package( diff --git a/third_party/xla/third_party/tsl/tsl/lib/io/snappy/BUILD b/third_party/xla/third_party/tsl/tsl/lib/io/snappy/BUILD index 57e178d668e..3f42c5fa8b0 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/io/snappy/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/io/snappy/BUILD @@ -1,4 +1,4 @@ -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/lib/math/BUILD b/third_party/xla/third_party/tsl/tsl/lib/math/BUILD index e5f11783826..a78947f3c38 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/math/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/math/BUILD @@ -1,5 +1,5 @@ -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/lib/monitoring/BUILD b/third_party/xla/third_party/tsl/tsl/lib/monitoring/BUILD index 06af0dc45a5..83b56998c33 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/monitoring/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/monitoring/BUILD @@ -2,8 +2,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/lib/random/BUILD b/third_party/xla/third_party/tsl/tsl/lib/random/BUILD index 169d41b6f6c..d9da60f5887 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/random/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/random/BUILD @@ -1,6 +1,6 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load( "//tsl/platform:build_config.bzl", "tsl_cc_test", diff --git a/third_party/xla/third_party/tsl/tsl/lib/strings/BUILD b/third_party/xla/third_party/tsl/tsl/lib/strings/BUILD index 6593d44eb6c..f529fb39595 100644 --- a/third_party/xla/third_party/tsl/tsl/lib/strings/BUILD +++ b/third_party/xla/third_party/tsl/tsl/lib/strings/BUILD @@ -2,8 +2,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") # copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"]) diff --git a/third_party/xla/third_party/tsl/tsl/platform/BUILD b/third_party/xla/third_party/tsl/tsl/platform/BUILD index 2757cc6b86b..acbcb3350d4 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/BUILD @@ -13,12 +13,12 @@ load( "cc_library", ) load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_not_fuchsia", "internal_visibility", "tsl_copts", ) -load("//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("@local_xla//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") load( "//tsl/platform:build_config.bzl", "tf_cuda_libdevice_path_deps", @@ -578,7 +578,7 @@ filegroup( "threadpool_interface.h", "tracing.h", ] + select({ - "//tsl:fuchsia": tf_google_mobile_srcs_no_runtime(), + "@local_xla//xla/tsl:fuchsia": tf_google_mobile_srcs_no_runtime(), "//conditions:default": [ "file_system_helper.cc", "tracing.cc", @@ -1296,7 +1296,7 @@ cc_library( srcs = ["test_main.cc"], copts = tsl_copts(), linkopts = select({ - "//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": ["-lm"], }), deps = [ diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD b/third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD index 21e13663a4b..2ce4463f65b 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/cloud/BUILD @@ -3,7 +3,7 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_windows", "internal_visibility", "tsl_copts", diff --git a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD b/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD index 1cafb7b63b7..08ff42cba72 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/cloud/testdata/BUILD @@ -1,6 +1,6 @@ # Cloud test data files. -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/BUILD b/third_party/xla/third_party/tsl/tsl/platform/default/BUILD index bac3898fef5..c09089518ec 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/default/BUILD @@ -2,13 +2,13 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_not_fuchsia", "if_not_windows", "internal_visibility", "tsl_copts", ) -load("//tsl:tsl.default.bzl", "filegroup", "tsl_grpc_cc_dependencies") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup", "tsl_grpc_cc_dependencies") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -76,7 +76,7 @@ cc_library( name = "dso_loader", srcs = ["dso_loader.cc"] + select({ # include dynamic loading checker only for open source build - "//tsl:oss": ["dlopen_checker.cc"], + "@local_xla//xla/tsl:oss": ["dlopen_checker.cc"], "//conditions:default": ["dlopen_checker_stub.cc"], }), hdrs = ["dso_loader.h"], @@ -341,7 +341,7 @@ cc_library( copts = tsl_copts(), defines = ["TF_USE_SNAPPY"] + select({ # TF Additional NUMA defines - "//tsl:with_numa_support": ["TENSORFLOW_USE_NUMA"], + "@local_xla//xla/tsl:with_numa_support": ["TENSORFLOW_USE_NUMA"], "//conditions:default": [], }), tags = [ @@ -361,7 +361,7 @@ cc_library( "@snappy", ] + select({ # TF Additional NUMA dependencies - "//tsl:with_numa_support": [ + "@local_xla//xla/tsl:with_numa_support": [ # Don't merge in a single line "@hwloc", ], diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl b/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl index d8ba2d02903..35cdcdc503a 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl +++ b/third_party/xla/third_party/tsl/tsl/platform/default/build_config.bzl @@ -3,7 +3,7 @@ load("@com_github_grpc_grpc//bazel:generate_cc.bzl", "generate_cc") load("@com_google_protobuf//:protobuf.bzl", "proto_gen") load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "clean_dep", "if_not_windows", "if_tsl_link_protobuf", @@ -665,7 +665,7 @@ def tf_additional_lib_hdrs(): clean_dep("//tsl/platform/default:tracing_impl.h"), clean_dep("//tsl/platform/default:unbounded_work_queue.h"), ] + select({ - clean_dep("//tsl:windows"): [ + clean_dep("@local_xla//xla/tsl:windows"): [ clean_dep("//tsl/platform/windows:intrinsics_port.h"), clean_dep("//tsl/platform/windows:stacktrace.h"), clean_dep("//tsl/platform/windows:subprocess.h"), @@ -720,9 +720,9 @@ def tf_additional_lib_deps(): def tf_additional_core_deps(): return select({ - clean_dep("//tsl:android"): [], - clean_dep("//tsl:ios"): [], - clean_dep("//tsl:linux_s390x"): [], + clean_dep("@local_xla//xla/tsl:android"): [], + clean_dep("@local_xla//xla/tsl:ios"): [], + clean_dep("@local_xla//xla/tsl:linux_s390x"): [], "//conditions:default": [ clean_dep("//tsl/platform/cloud:gcs_file_system"), ], @@ -807,7 +807,7 @@ def tf_protobuf_compiler_deps(): def tf_windows_aware_platform_deps(name): return select({ - clean_dep("//tsl:windows"): [ + clean_dep("@local_xla//xla/tsl:windows"): [ clean_dep("//tsl/platform/windows:" + name), ], "//conditions:default": [ diff --git a/third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl b/third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl index 9280779cbf2..8339df91baf 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl +++ b/third_party/xla/third_party/tsl/tsl/platform/default/build_config_root.bzl @@ -46,53 +46,53 @@ def tf_additional_tpu_ops_deps(): # used for all framework_shared_object platforms including MacOS. def if_static(extra_deps, otherwise = [], macos = []): ret = { - str(Label("//tsl:framework_shared_object")): otherwise, + str(Label("@local_xla//xla/tsl:framework_shared_object")): otherwise, "//conditions:default": extra_deps, } if macos: - ret[str(Label("//tsl:macos_with_framework_shared_object"))] = macos + ret[str(Label("@local_xla//xla/tsl:macos_with_framework_shared_object"))] = macos return select(ret) def if_static_and_not_mobile(extra_deps, otherwise = []): return select({ - str(Label("//tsl:framework_shared_object")): otherwise, - str(Label("//tsl:android")): otherwise, - str(Label("//tsl:ios")): otherwise, + str(Label("@local_xla//xla/tsl:framework_shared_object")): otherwise, + str(Label("@local_xla//xla/tsl:android")): otherwise, + str(Label("@local_xla//xla/tsl:ios")): otherwise, "//conditions:default": extra_deps, }) def if_llvm_aarch32_available(then, otherwise = []): return select({ - str(Label("//tsl:aarch32_or_cross")): then, + str(Label("@local_xla//xla/tsl:aarch32_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_aarch64_available(then, otherwise = []): return select({ - str(Label("//tsl:aarch64_or_cross")): then, + str(Label("@local_xla//xla/tsl:aarch64_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_arm_available(then, otherwise = []): return select({ - str(Label("//tsl:arm_or_cross")): then, + str(Label("@local_xla//xla/tsl:arm_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_powerpc_available(then, otherwise = []): return select({ - str(Label("//tsl:ppc64le_or_cross")): then, + str(Label("@local_xla//xla/tsl:ppc64le_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_system_z_available(then, otherwise = []): return select({ - str(Label("//tsl:s390x_or_cross")): then, + str(Label("@local_xla//xla/tsl:s390x_or_cross")): then, "//conditions:default": otherwise, }) def if_llvm_x86_available(then, otherwise = []): return select({ - str(Label("//tsl:x86_or_cross")): then, + str(Label("@local_xla//xla/tsl:x86_or_cross")): then, "//conditions:default": otherwise, }) diff --git a/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD b/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD index 5285e49bcb1..180662871a8 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/profile_utils/BUILD @@ -5,8 +5,8 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility", "tsl_copts") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility", "tsl_copts") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/platform/windows/BUILD b/third_party/xla/third_party/tsl/tsl/platform/windows/BUILD index c8f4ed0d14b..bd07c1b07f5 100644 --- a/third_party/xla/third_party/tsl/tsl/platform/windows/BUILD +++ b/third_party/xla/third_party/tsl/tsl/platform/windows/BUILD @@ -5,11 +5,11 @@ load( # Tensorflow windows-specific implementations of tensorflow/core/platform libraries. load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "internal_visibility", "tsl_copts", ) -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/profiler/backends/cpu/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/backends/cpu/BUILD index 7c7d9e7f036..97df0bce4d9 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/backends/cpu/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/backends/cpu/BUILD @@ -1,5 +1,5 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") load("//tsl/platform:build_config.bzl", "tsl_cc_test") load("//tsl/platform:build_config_root.bzl", "if_static") load("//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") diff --git a/third_party/xla/third_party/tsl/tsl/profiler/builds/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/builds/BUILD index 050103eec55..00fbfff0990 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/builds/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/builds/BUILD @@ -1,4 +1,4 @@ -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/profiler/builds/build_config.bzl b/third_party/xla/third_party/tsl/tsl/profiler/builds/build_config.bzl index 72e2e535377..07e631362e3 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/builds/build_config.bzl +++ b/third_party/xla/third_party/tsl/tsl/profiler/builds/build_config.bzl @@ -1,6 +1,6 @@ """Provides a redirection point for platform specific implementations of Starlark utilities.""" -load("//tsl:tsl.bzl", "clean_dep") +load("@local_xla//xla/tsl:tsl.bzl", "clean_dep") load( "//tsl/profiler/builds/oss:build_config.bzl", _tf_profiler_alias = "tf_profiler_alias", diff --git a/third_party/xla/third_party/tsl/tsl/profiler/builds/oss/build_config.bzl b/third_party/xla/third_party/tsl/tsl/profiler/builds/oss/build_config.bzl index a9d620a56da..1b1f3892889 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/builds/oss/build_config.bzl +++ b/third_party/xla/third_party/tsl/tsl/profiler/builds/oss/build_config.bzl @@ -3,7 +3,7 @@ TF profiler build macros for use in OSS. """ -load("//tsl:tsl.bzl", "cc_header_only_library") +load("@local_xla//xla/tsl:tsl.bzl", "cc_header_only_library") def tf_profiler_alias(target_dir, name): return target_dir + "oss:" + name diff --git a/third_party/xla/third_party/tsl/tsl/profiler/convert/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/convert/BUILD index e6ab8e6b5ab..5cbbafe87ef 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/convert/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/convert/BUILD @@ -2,7 +2,7 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") load("//tsl/platform:build_config.bzl", "tsl_cc_test") load("//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") diff --git a/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD index 84f6a143971..80884ebf821 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/lib/BUILD @@ -1,6 +1,6 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "if_not_android", "internal_visibility", "nvtx_headers") -load("//tsl:tsl.default.bzl", "filegroup") +load("@local_xla//xla/tsl:tsl.bzl", "if_not_android", "internal_visibility", "nvtx_headers") +load("@local_xla//xla/tsl:tsl.default.bzl", "filegroup") load("//tsl/platform:build_config.bzl", "tsl_cc_test") load("//tsl/platform:build_config_root.bzl", "if_static") load( @@ -126,7 +126,7 @@ cc_library( hdrs = ["profiler_interface.h"], copts = tf_profiler_copts(), visibility = internal_visibility([ - "//tsl:internal", + "@local_xla//xla/tsl:internal", "//tsl/profiler:internal", "//tsl/profiler:xla_profiler_backends", ]), @@ -168,7 +168,7 @@ tsl_cc_test( cc_library( name = "profiler_session", hdrs = ["profiler_session.h"], - visibility = internal_visibility(["//tsl:internal"]), + visibility = internal_visibility(["@local_xla//xla/tsl:internal"]), deps = [ "//tsl/platform", "//tsl/platform:errors", diff --git a/third_party/xla/third_party/tsl/tsl/profiler/protobuf/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/protobuf/BUILD index 428a963d2c3..e5707120bd9 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/protobuf/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/protobuf/BUILD @@ -1,6 +1,6 @@ # copybara:uncomment(oss-unused) load("//net/grpc/go/build_defs:go_grpc_library.bzl", "go_grpc_library") # Placeholder: load py_proto_library -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") load("//tsl/platform:build_config.bzl", "tf_proto_library") # copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"]) diff --git a/third_party/xla/third_party/tsl/tsl/profiler/rpc/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/rpc/BUILD index d87ad885f05..32c76097471 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/rpc/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/rpc/BUILD @@ -1,6 +1,6 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") load( "//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts", diff --git a/third_party/xla/third_party/tsl/tsl/profiler/rpc/client/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/rpc/client/BUILD index f9210aeaab5..925af9f6ebe 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/rpc/client/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/rpc/client/BUILD @@ -1,6 +1,6 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") -load("//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") load( "//tsl/platform:build_config.bzl", "tf_protos_profiler_service", diff --git a/third_party/xla/third_party/tsl/tsl/profiler/utils/BUILD b/third_party/xla/third_party/tsl/tsl/profiler/utils/BUILD index 41d669aedbd..af8e63de152 100644 --- a/third_party/xla/third_party/tsl/tsl/profiler/utils/BUILD +++ b/third_party/xla/third_party/tsl/tsl/profiler/utils/BUILD @@ -1,5 +1,5 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") -load("//tsl:tsl.bzl", "internal_visibility") +load("@local_xla//xla/tsl:tsl.bzl", "internal_visibility") load("//tsl/platform:build_config.bzl", "tsl_cc_test") load("//tsl/platform:build_config_root.bzl", "if_static") load("//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") diff --git a/third_party/xla/third_party/tsl/tsl/protobuf/BUILD b/third_party/xla/third_party/tsl/tsl/protobuf/BUILD index 557d9fcf220..395527e4e22 100644 --- a/third_party/xla/third_party/tsl/tsl/protobuf/BUILD +++ b/third_party/xla/third_party/tsl/tsl/protobuf/BUILD @@ -1,6 +1,6 @@ # Placeholder: load py_proto_library load( - "//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "if_google", "internal_visibility", ) @@ -13,7 +13,7 @@ package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = internal_visibility([ "//tensorflow/core:__subpackages__", - "//tsl:internal", + "@local_xla//xla/tsl:internal", "//tensorflow_models:__subpackages__", ]), features = if_google(["-parse_headers"]), diff --git a/third_party/xla/xla/BUILD b/third_party/xla/xla/BUILD index 51a0744299b..90792451869 100644 --- a/third_party/xla/xla/BUILD +++ b/third_party/xla/xla/BUILD @@ -1,5 +1,3 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -9,6 +7,8 @@ load("//third_party/compute_library:build_defs.bzl", "if_enable_acl") # Placeholder: load py_proto_library load("//xla:xla.bzl", "xla_cc_test", "xla_py_proto_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -317,7 +317,7 @@ cc_library( "statusor.h", ], linkopts = select({ - "@local_tsl//tsl:freebsd": ["-lexecinfo"], + "//xla/tsl:freebsd": ["-lexecinfo"], "//conditions:default": [], }), visibility = ["//visibility:public"], diff --git a/third_party/xla/xla/backends/profiler/BUILD b/third_party/xla/xla/backends/profiler/BUILD index 5978f53341c..65f5da2138f 100644 --- a/third_party/xla/xla/backends/profiler/BUILD +++ b/third_party/xla/xla/backends/profiler/BUILD @@ -1,5 +1,5 @@ load( - "@local_tsl//tsl:tsl.bzl", + "//xla/tsl:tsl.bzl", "if_with_tpu_support", "internal_visibility", "tsl_gpu_library", diff --git a/third_party/xla/xla/backends/profiler/cpu/BUILD b/third_party/xla/xla/backends/profiler/cpu/BUILD index 6cfd1f1a518..76c00ba08bd 100644 --- a/third_party/xla/xla/backends/profiler/cpu/BUILD +++ b/third_party/xla/xla/backends/profiler/cpu/BUILD @@ -1,10 +1,10 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("@local_tsl//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") load( "//xla:xla.bzl", "xla_cc_test", ) +load("//xla/tsl:tsl.bzl", "internal_visibility") # copybara:uncomment package(default_applicable_licenses = ["//tensorflow:license"]) diff --git a/third_party/xla/xla/backends/profiler/gpu/BUILD b/third_party/xla/xla/backends/profiler/gpu/BUILD index 5ea81b05c32..7d6a522c1b8 100644 --- a/third_party/xla/xla/backends/profiler/gpu/BUILD +++ b/third_party/xla/xla/backends/profiler/gpu/BUILD @@ -1,11 +1,5 @@ load("@local_config_cuda//cuda:build_defs.bzl", "cuda_library", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") -load( - "@local_tsl//tsl:tsl.bzl", - "internal_visibility", - "tsl_copts", - "tsl_gpu_library", -) load( "@local_tsl//tsl/platform:build_config.bzl", "tf_additional_device_tracer_srcs", @@ -23,6 +17,12 @@ load( "//xla:xla.bzl", "xla_cc_test", ) +load( + "//xla/tsl:tsl.bzl", + "internal_visibility", + "tsl_copts", + "tsl_gpu_library", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/backends/profiler/tpu/BUILD b/third_party/xla/xla/backends/profiler/tpu/BUILD index c485f5adef0..b292ec9819d 100644 --- a/third_party/xla/xla/backends/profiler/tpu/BUILD +++ b/third_party/xla/xla/backends/profiler/tpu/BUILD @@ -1,6 +1,6 @@ -load("@local_tsl//tsl:tsl.bzl", "if_with_tpu_support") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("@local_tsl//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") +load("//xla/tsl:tsl.bzl", "if_with_tpu_support") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/c/BUILD b/third_party/xla/xla/c/BUILD index 2a2288a13c9..fcf764145d3 100644 --- a/third_party/xla/xla/c/BUILD +++ b/third_party/xla/xla/c/BUILD @@ -1,5 +1,5 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/client/BUILD b/third_party/xla/xla/client/BUILD index d55782e8658..1a49aad11ee 100644 --- a/third_party/xla/xla/client/BUILD +++ b/third_party/xla/xla/client/BUILD @@ -1,9 +1,9 @@ # Description: # XLA client libraries. -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/client/lib/BUILD b/third_party/xla/xla/client/lib/BUILD index dcfd207d69e..c070d5af6fe 100644 --- a/third_party/xla/xla/client/lib/BUILD +++ b/third_party/xla/xla/client/lib/BUILD @@ -1,9 +1,9 @@ # Common computation builders for XLA. -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla/tests:build_defs.bzl", "generate_backend_suites", "xla_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/ffi/api/BUILD b/third_party/xla/xla/ffi/api/BUILD index fcd33d23fef..ab36db4a82d 100644 --- a/third_party/xla/xla/ffi/api/BUILD +++ b/third_party/xla/xla/ffi/api/BUILD @@ -1,6 +1,6 @@ -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/hlo/experimental/auto_sharding/BUILD b/third_party/xla/xla/hlo/experimental/auto_sharding/BUILD index 4dc21724ca3..9984d3b1fc1 100644 --- a/third_party/xla/xla/hlo/experimental/auto_sharding/BUILD +++ b/third_party/xla/xla/hlo/experimental/auto_sharding/BUILD @@ -1,9 +1,9 @@ # Automatic sharding annotation load("@bazel_skylib//rules:build_test.bzl", "build_test") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_libtpu_portable") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("//xla:xla.bzl", "auto_sharding_deps", "auto_sharding_solver_deps", "xla_cc_binary", "xla_cc_test") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_libtpu_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/hlo/ir/BUILD b/third_party/xla/xla/hlo/ir/BUILD index 56fe33017d6..1e8ac27a54d 100644 --- a/third_party/xla/xla/hlo/ir/BUILD +++ b/third_party/xla/xla/hlo/ir/BUILD @@ -1,8 +1,8 @@ # Description: # XLA’s HLO Intermediate Representation implementation. -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/backends/cpu/transforms/BUILD b/third_party/xla/xla/mlir/backends/cpu/transforms/BUILD index ff81d082104..bae1e833302 100644 --- a/third_party/xla/xla/mlir/backends/cpu/transforms/BUILD +++ b/third_party/xla/xla/mlir/backends/cpu/transforms/BUILD @@ -1,6 +1,6 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/framework/ir/BUILD b/third_party/xla/xla/mlir/framework/ir/BUILD index 9db56a6a5e1..462810ebd04 100644 --- a/third_party/xla/xla/mlir/framework/ir/BUILD +++ b/third_party/xla/xla/mlir/framework/ir/BUILD @@ -1,7 +1,7 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/framework/transforms/BUILD b/third_party/xla/xla/mlir/framework/transforms/BUILD index 26cbb6afcf9..d9fe2f7f19d 100644 --- a/third_party/xla/xla/mlir/framework/transforms/BUILD +++ b/third_party/xla/xla/mlir/framework/transforms/BUILD @@ -1,7 +1,7 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/memref/transforms/BUILD b/third_party/xla/xla/mlir/memref/transforms/BUILD index adc78fc5b6a..cd30507edc3 100644 --- a/third_party/xla/xla/mlir/memref/transforms/BUILD +++ b/third_party/xla/xla/mlir/memref/transforms/BUILD @@ -1,6 +1,6 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/runtime/ir/BUILD b/third_party/xla/xla/mlir/runtime/ir/BUILD index 703d2f83a19..f044bf6f4b5 100644 --- a/third_party/xla/xla/mlir/runtime/ir/BUILD +++ b/third_party/xla/xla/mlir/runtime/ir/BUILD @@ -1,6 +1,6 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/runtime/transforms/BUILD b/third_party/xla/xla/mlir/runtime/transforms/BUILD index 6df59ca0f44..5cce7260f13 100644 --- a/third_party/xla/xla/mlir/runtime/transforms/BUILD +++ b/third_party/xla/xla/mlir/runtime/transforms/BUILD @@ -1,5 +1,4 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load( "@local_tsl//tsl/platform:build_config_root.bzl", "if_llvm_aarch64_available", @@ -10,6 +9,7 @@ load( ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/runtime/utils/BUILD b/third_party/xla/xla/mlir/runtime/utils/BUILD index b45fcb04ffd..812119ac4c8 100644 --- a/third_party/xla/xla/mlir/runtime/utils/BUILD +++ b/third_party/xla/xla/mlir/runtime/utils/BUILD @@ -1,5 +1,5 @@ -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/utils/BUILD b/third_party/xla/xla/mlir/utils/BUILD index cabd61a0d73..9652b2fbf3d 100644 --- a/third_party/xla/xla/mlir/utils/BUILD +++ b/third_party/xla/xla/mlir/utils/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir/xla_cpu/ir/BUILD b/third_party/xla/xla/mlir/xla_cpu/ir/BUILD index bb09094c14d..b5933c23b96 100644 --- a/third_party/xla/xla/mlir/xla_cpu/ir/BUILD +++ b/third_party/xla/xla/mlir/xla_cpu/ir/BUILD @@ -1,10 +1,10 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") +load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") load( - "@local_tsl//tsl:tsl.default.bzl", + "//xla/tsl:tsl.default.bzl", "get_compatible_with_portable", ) -load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/mlir_hlo/BUILD b/third_party/xla/xla/mlir_hlo/BUILD index dfed55f77e5..761446ff70f 100644 --- a/third_party/xla/xla/mlir_hlo/BUILD +++ b/third_party/xla/xla/mlir_hlo/BUILD @@ -1,8 +1,8 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "gentbl_filegroup", "td_library") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/pjrt/BUILD b/third_party/xla/xla/pjrt/BUILD index a1f75a76837..b8d7657e923 100644 --- a/third_party/xla/xla/pjrt/BUILD +++ b/third_party/xla/xla/pjrt/BUILD @@ -1,4 +1,3 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -7,6 +6,7 @@ load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") # Placeholder: load py_proto_library load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/pjrt/cpu/BUILD b/third_party/xla/xla/pjrt/cpu/BUILD index af70455c4e0..edb5b2e8cdf 100644 --- a/third_party/xla/xla/pjrt/cpu/BUILD +++ b/third_party/xla/xla/pjrt/cpu/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.bzl", "if_oss", "internal_visibility") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "if_oss", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/pjrt/distributed/BUILD b/third_party/xla/xla/pjrt/distributed/BUILD index 1085bb23670..a8311ae6675 100644 --- a/third_party/xla/xla/pjrt/distributed/BUILD +++ b/third_party/xla/xla/pjrt/distributed/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.default.bzl", "tsl_grpc_cc_dependencies") licenses(["notice"]) diff --git a/third_party/xla/xla/pjrt/gpu/BUILD b/third_party/xla/xla/pjrt/gpu/BUILD index c9e9bd8db0a..e446772dcd6 100644 --- a/third_party/xla/xla/pjrt/gpu/BUILD +++ b/third_party/xla/xla/pjrt/gpu/BUILD @@ -1,10 +1,10 @@ load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") -load("@local_tsl//tsl:tsl.bzl", "if_google", "internal_visibility") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") load("//xla/stream_executor:build_defs.bzl", "if_cuda_or_rocm", "if_gpu_is_configured") +load("//xla/tsl:tsl.bzl", "if_google", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/BUILD b/third_party/xla/xla/python/BUILD index 66da51be875..69d7cac93a2 100644 --- a/third_party/xla/xla/python/BUILD +++ b/third_party/xla/xla/python/BUILD @@ -1,13 +1,6 @@ load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") -load( - "@local_tsl//tsl:tsl.bzl", - "if_cuda_or_rocm", - "if_google", - "internal_visibility", -) -load("@local_tsl//tsl:tsl.default.bzl", "tsl_pybind_extension") load("@local_tsl//tsl/platform:build_config.bzl", "pyx_library", "tf_proto_library") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load( @@ -21,6 +14,13 @@ load( "xla_cc_test", "xla_py_test_deps", ) +load( + "//xla/tsl:tsl.bzl", + "if_cuda_or_rocm", + "if_google", + "internal_visibility", +) +load("//xla/tsl:tsl.default.bzl", "tsl_pybind_extension") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -1273,8 +1273,8 @@ tsl_pybind_extension( "@llvm-project//mlir:IR", ] + select({ # gloo transport only builds on linux - "@local_tsl//tsl:macos": [], - "@local_tsl//tsl:windows": [], + "//xla/tsl:macos": [], + "//xla/tsl:windows": [], "//conditions:default": [ "//third_party/gloo:transport_tcp", "//xla/pjrt/cpu:gloo_collectives", @@ -1282,7 +1282,7 @@ tsl_pybind_extension( ], }) + select({ # mpitrampoline does not build on windows - "@local_tsl//tsl:windows": [], + "//xla/tsl:windows": [], "//conditions:default": [ "//xla/pjrt/cpu:mpi_collectives", ], diff --git a/third_party/xla/xla/python/ifrt/BUILD b/third_party/xla/xla/python/ifrt/BUILD index e5816a0a29c..402eeeb6726 100644 --- a/third_party/xla/xla/python/ifrt/BUILD +++ b/third_party/xla/xla/python/ifrt/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package_group( name = "friends", diff --git a/third_party/xla/xla/python/ifrt/ir/BUILD b/third_party/xla/xla/python/ifrt/ir/BUILD index 301fd1e2a64..50a5f28f87d 100644 --- a/third_party/xla/xla/python/ifrt/ir/BUILD +++ b/third_party/xla/xla/python/ifrt/ir/BUILD @@ -1,5 +1,5 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/ifrt/ir/transforms/BUILD b/third_party/xla/xla/python/ifrt/ir/transforms/BUILD index 7c33186213f..73686314704 100644 --- a/third_party/xla/xla/python/ifrt/ir/transforms/BUILD +++ b/third_party/xla/xla/python/ifrt/ir/transforms/BUILD @@ -1,5 +1,5 @@ load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/ifrt/ir/transforms/spmd_expanders/BUILD b/third_party/xla/xla/python/ifrt/ir/transforms/spmd_expanders/BUILD index 090ca21d09d..9ff15e6ced8 100644 --- a/third_party/xla/xla/python/ifrt/ir/transforms/spmd_expanders/BUILD +++ b/third_party/xla/xla/python/ifrt/ir/transforms/spmd_expanders/BUILD @@ -1,4 +1,4 @@ -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/ifrt_proxy/client/BUILD b/third_party/xla/xla/python/ifrt_proxy/client/BUILD index ad7ccd14646..dce93e9b6e7 100644 --- a/third_party/xla/xla/python/ifrt_proxy/client/BUILD +++ b/third_party/xla/xla/python/ifrt_proxy/client/BUILD @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@local_tsl//tsl:tsl.bzl", "if_google") load("//xla/python/ifrt_proxy/common:ifrt_proxy.bzl", "default_ifrt_proxy_visibility", "ifrt_proxy_cc_test") +load("//xla/tsl:tsl.bzl", "if_google") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/ifrt_proxy/common/BUILD b/third_party/xla/xla/python/ifrt_proxy/common/BUILD index ac38f4e6f36..cfe004734bc 100644 --- a/third_party/xla/xla/python/ifrt_proxy/common/BUILD +++ b/third_party/xla/xla/python/ifrt_proxy/common/BUILD @@ -12,11 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@local_tsl//tsl:tsl.bzl", "if_google") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") # copybara:uncomment load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("//xla/python/ifrt_proxy/common:ifrt_proxy.bzl", "default_ifrt_proxy_visibility", "ifrt_proxy_cc_test") +load("//xla/tsl:tsl.bzl", "if_google") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/pjrt_ifrt/BUILD b/third_party/xla/xla/python/pjrt_ifrt/BUILD index 760dfb6cae2..2d4089f3952 100644 --- a/third_party/xla/xla/python/pjrt_ifrt/BUILD +++ b/third_party/xla/xla/python/pjrt_ifrt/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package_group( name = "friends", diff --git a/third_party/xla/xla/python/profiler/internal/BUILD b/third_party/xla/xla/python/profiler/internal/BUILD index 127a5b54638..00db5bd09ff 100644 --- a/third_party/xla/xla/python/profiler/internal/BUILD +++ b/third_party/xla/xla/python/profiler/internal/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("@local_tsl//tsl/profiler/builds:build_config.bzl", "tf_profiler_copts") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/python/tools/BUILD b/third_party/xla/xla/python/tools/BUILD index a099300c228..480f20bb2fa 100644 --- a/third_party/xla/xla/python/tools/BUILD +++ b/third_party/xla/xla/python/tools/BUILD @@ -1,10 +1,9 @@ -load("@local_tsl//tsl:tsl.default.bzl", "tsl_pybind_extension") - # NOTE: We can't use `pytype_pybind_extension` nor `pytype_strict_contrib_test` # because the OSS versions of these files do not include ports of those rules. # We must instead use `tsl_pybind_extension` and `py_strict_test`. load("//xla:pytype.default.bzl", "pytype_strict_library") load("//xla:strict.default.bzl", "py_strict_test") +load("//xla/tsl:tsl.default.bzl", "tsl_pybind_extension") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/runtime/BUILD b/third_party/xla/xla/runtime/BUILD index 45f2217fcf0..2f9adfb4546 100644 --- a/third_party/xla/xla/runtime/BUILD +++ b/third_party/xla/xla/runtime/BUILD @@ -1,5 +1,3 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load("@local_tsl//tsl/platform:build_config.bzl", "tf_platform_deps") load( "@local_tsl//tsl/platform:build_config_root.bzl", @@ -11,6 +9,8 @@ load( ) load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/runtime/default/BUILD b/third_party/xla/xla/runtime/default/BUILD index 0cce6f64235..c331cf8ef3d 100644 --- a/third_party/xla/xla/runtime/default/BUILD +++ b/third_party/xla/xla/runtime/default/BUILD @@ -1,5 +1,5 @@ -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/runtime/ffi/BUILD b/third_party/xla/xla/runtime/ffi/BUILD index f971eadcf16..024d01d5550 100644 --- a/third_party/xla/xla/runtime/ffi/BUILD +++ b/third_party/xla/xla/runtime/ffi/BUILD @@ -1,5 +1,5 @@ -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/BUILD b/third_party/xla/xla/service/BUILD index 75528004b78..d1c66c68c98 100644 --- a/third_party/xla/xla/service/BUILD +++ b/third_party/xla/xla/service/BUILD @@ -8,8 +8,6 @@ load( "if_rocm", "if_rocm_is_configured", ) -load("@local_tsl//tsl:tsl.bzl", "if_google", "if_libtpu", "internal_visibility", "tsl_copts") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable", "internal_hlo_deps") load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -32,6 +30,8 @@ load( load("//xla/service:xla_compile.bzl", "xla_aot_compile_cpu", "xla_aot_compile_gpu", "xla_aot_compile_gpu_runtime_autotuning") load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "xla_test") +load("//xla/tsl:tsl.bzl", "if_google", "if_libtpu", "internal_visibility", "tsl_copts") +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable", "internal_hlo_deps") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/cpu/BUILD b/third_party/xla/xla/service/cpu/BUILD index bea6c9187be..5f6d02dffec 100644 --- a/third_party/xla/xla/service/cpu/BUILD +++ b/third_party/xla/xla/service/cpu/BUILD @@ -3,8 +3,6 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility", "tf_openmp_copts", "tsl_copts") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load( "@local_tsl//tsl/platform:build_config_root.bzl", @@ -25,6 +23,8 @@ load( "xla_cc_binary", "xla_cc_test", ) +load("//xla/tsl:tsl.bzl", "internal_visibility", "tf_openmp_copts", "tsl_copts") +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load( "//xla/tsl/mkl:build_defs.bzl", "mkl_deps", diff --git a/third_party/xla/xla/service/cpu/build_defs.bzl b/third_party/xla/xla/service/cpu/build_defs.bzl index 36a296218a0..35cb88f7ca9 100644 --- a/third_party/xla/xla/service/cpu/build_defs.bzl +++ b/third_party/xla/xla/service/cpu/build_defs.bzl @@ -1,11 +1,13 @@ """build_defs for service/cpu.""" +load("//xla/tsl:tsl.bzl", "clean_dep") + def runtime_copts(): """Returns copts used for CPU runtime libraries.""" return (["-DEIGEN_AVOID_STL_ARRAY"] + select({ - "@local_tsl//tsl:android_arm": ["-mfpu=neon"], + clean_dep("//xla/tsl:android_arm"): ["-mfpu=neon"], "//conditions:default": [], }) + select({ - "@local_tsl//tsl:android": ["-O2"], + clean_dep("//xla/tsl:android"): ["-O2"], "//conditions:default": [], })) diff --git a/third_party/xla/xla/service/cpu/tests/BUILD b/third_party/xla/xla/service/cpu/tests/BUILD index ca14a25112c..eaa3e2f5f03 100644 --- a/third_party/xla/xla/service/cpu/tests/BUILD +++ b/third_party/xla/xla/service/cpu/tests/BUILD @@ -1,9 +1,9 @@ # Description: # Tests for LLVM-based CPU backend for XLA. -load("@local_tsl//tsl:tsl.bzl", "tsl_copts") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "tsl_copts") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/BUILD b/third_party/xla/xla/service/gpu/BUILD index 31cfdcc67f9..d08e59084fe 100644 --- a/third_party/xla/xla/service/gpu/BUILD +++ b/third_party/xla/xla/service/gpu/BUILD @@ -9,15 +9,6 @@ load( "if_rocm_is_configured", "rocm_copts", ) -load( - "@local_tsl//tsl:tsl.bzl", - "if_google", - "if_nccl", - "internal_visibility", - "tsl_copts", - "tsl_gpu_library", -) -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -44,6 +35,15 @@ load( "if_gpu_is_configured", ) load("//xla/tests:build_defs.bzl", "xla_test") +load( + "//xla/tsl:tsl.bzl", + "if_google", + "if_nccl", + "internal_visibility", + "tsl_copts", + "tsl_gpu_library", +) +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD b/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD index fb93f0495e6..9421a45e05a 100644 --- a/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD +++ b/third_party/xla/xla/service/gpu/llvm_gpu_backend/BUILD @@ -2,8 +2,8 @@ load( "@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", ) -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/model/BUILD b/third_party/xla/xla/service/gpu/model/BUILD index 497f4303f9e..a1d8a0a3659 100644 --- a/third_party/xla/xla/service/gpu/model/BUILD +++ b/third_party/xla/xla/service/gpu/model/BUILD @@ -1,6 +1,4 @@ load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("@local_tsl//tsl/platform:build_config_root.bzl", "tf_cuda_tests_tags") load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") @@ -8,6 +6,8 @@ load("//xla:xla.bzl", "xla_cc_test", "xla_nvml_deps") # Libraries for performance modeling of HLO. load("//xla/tests:build_defs.bzl", "xla_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/runtime/BUILD b/third_party/xla/xla/service/gpu/runtime/BUILD index 8c3f9ea52c5..d358004301e 100644 --- a/third_party/xla/xla/service/gpu/runtime/BUILD +++ b/third_party/xla/xla/service/gpu/runtime/BUILD @@ -1,10 +1,10 @@ load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load("@local_tsl//tsl:tsl.bzl", "if_google", "if_nccl", "nvtx_headers") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured") load("//xla/service/gpu:build_defs.bzl", "get_cub_sort_kernel_types") load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "xla_test") +load("//xla/tsl:tsl.bzl", "if_google", "if_nccl", "nvtx_headers") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/gpu/tests/BUILD b/third_party/xla/xla/service/gpu/tests/BUILD index b9e7764047d..9c74ece017f 100644 --- a/third_party/xla/xla/service/gpu/tests/BUILD +++ b/third_party/xla/xla/service/gpu/tests/BUILD @@ -5,7 +5,6 @@ load( "@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", ) -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load( "@local_tsl//tsl/platform:build_config_root.bzl", "tf_cuda_tests_tags", @@ -21,6 +20,7 @@ load( "xla_cc_test", ) load("//xla/tests:build_defs.bzl", "xla_test") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/graphcycles/BUILD b/third_party/xla/xla/service/graphcycles/BUILD index 78e5a7b878d..1c7d54d1847 100644 --- a/third_party/xla/xla/service/graphcycles/BUILD +++ b/third_party/xla/xla/service/graphcycles/BUILD @@ -1,6 +1,6 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/llvm_ir/BUILD b/third_party/xla/xla/service/llvm_ir/BUILD index d4fac0bce71..34a94ec25e8 100644 --- a/third_party/xla/xla/service/llvm_ir/BUILD +++ b/third_party/xla/xla/service/llvm_ir/BUILD @@ -1,10 +1,10 @@ # Description: # Libraries for helping construct LLVM IR for XLA backends. -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/service/memory_space_assignment/BUILD b/third_party/xla/xla/service/memory_space_assignment/BUILD index 9e95c1e61e3..73563d4fa9d 100644 --- a/third_party/xla/xla/service/memory_space_assignment/BUILD +++ b/third_party/xla/xla/service/memory_space_assignment/BUILD @@ -1,7 +1,6 @@ # Description: # Memory Space Assignment service implementation. -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -11,6 +10,7 @@ load( "//xla:xla.bzl", "xla_cc_test", ) +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/BUILD b/third_party/xla/xla/stream_executor/BUILD index a2ff3d1ba7f..c942445533e 100644 --- a/third_party/xla/xla/stream_executor/BUILD +++ b/third_party/xla/xla/stream_executor/BUILD @@ -1,10 +1,10 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility", "transitive_hdrs") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library") load("@local_tsl//tsl/platform:build_config_root.bzl", "if_static") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") load("//xla/stream_executor:build_defs.bzl", "stream_executor_friends", "stream_executor_internal") +load("//xla/tsl:tsl.bzl", "internal_visibility", "transitive_hdrs") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/cuda/BUILD b/third_party/xla/xla/stream_executor/cuda/BUILD index 3eef12172ed..275287b73ae 100644 --- a/third_party/xla/xla/stream_executor/cuda/BUILD +++ b/third_party/xla/xla/stream_executor/cuda/BUILD @@ -1,5 +1,4 @@ load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") -load("@local_tsl//tsl:tsl.bzl", "if_google", "if_nccl", "internal_visibility", "tsl_copts") load( "@local_tsl//tsl/platform:build_config_root.bzl", "if_static", @@ -25,6 +24,7 @@ load( "tf_additional_cudnn_plugin_copts", "tf_additional_gpu_compilation_copts", ) +load("//xla/tsl:tsl.bzl", "if_google", "if_nccl", "internal_visibility", "tsl_copts") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -685,7 +685,7 @@ cc_library( [ "//xla/tsl/cuda:cudart", ] + select({ - "@local_tsl//tsl:macos": ["IOKit"], + "//xla/tsl:macos": ["IOKit"], "//conditions:default": [], }), ), diff --git a/third_party/xla/xla/stream_executor/gpu/BUILD b/third_party/xla/xla/stream_executor/gpu/BUILD index be7dc010aa4..e45306a49c7 100644 --- a/third_party/xla/xla/stream_executor/gpu/BUILD +++ b/third_party/xla/xla/stream_executor/gpu/BUILD @@ -10,13 +10,6 @@ load( "if_rocm", "if_rocm_is_configured", ) -load( - "@local_tsl//tsl:tsl.bzl", - "if_libtpu", - "internal_visibility", - "tsl_copts", - "tsl_gpu_library", -) load( "@local_tsl//tsl/platform:build_config_root.bzl", "if_static", @@ -47,6 +40,13 @@ load( "//xla/tests:build_defs.bzl", "xla_test", ) +load( + "//xla/tsl:tsl.bzl", + "if_libtpu", + "internal_visibility", + "tsl_copts", + "tsl_gpu_library", +) package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -238,7 +238,7 @@ tsl_gpu_library( "gpu_init.h", ], visibility = internal_visibility([ - "@local_tsl//tsl:internal", + "//xla/tsl:internal", ]), deps = [ "@com_google_absl//absl/status", diff --git a/third_party/xla/xla/stream_executor/host/BUILD b/third_party/xla/xla/stream_executor/host/BUILD index 04edca1c9e2..de5ed381c1c 100644 --- a/third_party/xla/xla/stream_executor/host/BUILD +++ b/third_party/xla/xla/stream_executor/host/BUILD @@ -1,10 +1,10 @@ # Description: # Host-platform specific StreamExecutor support code. -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") load("//xla/stream_executor:build_defs.bzl", "stream_executor_friends") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/integrations/BUILD b/third_party/xla/xla/stream_executor/integrations/BUILD index 1b3682d9cce..862f9b4a875 100644 --- a/third_party/xla/xla/stream_executor/integrations/BUILD +++ b/third_party/xla/xla/stream_executor/integrations/BUILD @@ -1,8 +1,8 @@ -load("@local_tsl//tsl:tsl.bzl", "if_google", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") load("//xla/stream_executor:build_defs.bzl", "stream_executor_friends") +load("//xla/tsl:tsl.bzl", "if_google", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/platform/BUILD b/third_party/xla/xla/stream_executor/platform/BUILD index 6754de3ebe3..7334d2cc63b 100644 --- a/third_party/xla/xla/stream_executor/platform/BUILD +++ b/third_party/xla/xla/stream_executor/platform/BUILD @@ -1,7 +1,7 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:build_config.bzl", "tf_stream_executor_deps") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla/stream_executor:build_defs.bzl", "stream_executor_friends") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/stream_executor/platform/default/BUILD b/third_party/xla/xla/stream_executor/platform/default/BUILD index 8f201e94681..4e5e517d28d 100644 --- a/third_party/xla/xla/stream_executor/platform/default/BUILD +++ b/third_party/xla/xla/stream_executor/platform/default/BUILD @@ -1,5 +1,5 @@ -load("@local_tsl//tsl:tsl.bzl", "tsl_copts") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "tsl_copts") licenses(["notice"]) diff --git a/third_party/xla/xla/stream_executor/rocm/BUILD b/third_party/xla/xla/stream_executor/rocm/BUILD index 06f518195cc..01739e54728 100644 --- a/third_party/xla/xla/stream_executor/rocm/BUILD +++ b/third_party/xla/xla/stream_executor/rocm/BUILD @@ -19,7 +19,7 @@ load( "if_rocm_is_configured", "rocm_library", ) -load("@local_tsl//tsl:tsl.bzl", "internal_visibility", "tsl_copts") +load("//xla/tsl:tsl.bzl", "internal_visibility", "tsl_copts") load("@local_tsl//tsl/platform:build_config_root.bzl", "if_static") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") diff --git a/third_party/xla/xla/stream_executor/tpu/BUILD b/third_party/xla/xla/stream_executor/tpu/BUILD index 4f26d6c6b4f..df35fb08ffb 100644 --- a/third_party/xla/xla/stream_executor/tpu/BUILD +++ b/third_party/xla/xla/stream_executor/tpu/BUILD @@ -1,8 +1,8 @@ # Description: StreamExecutor Interface for TPUs -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tests/BUILD b/third_party/xla/xla/tests/BUILD index a914b894a93..6ec37032b77 100644 --- a/third_party/xla/xla/tests/BUILD +++ b/third_party/xla/xla/tests/BUILD @@ -5,8 +5,6 @@ load( "@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", ) -load("@local_tsl//tsl:tsl.bzl", "internal_visibility", "tsl_copts") -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load( "@local_tsl//tsl/platform:build_config_root.bzl", "tf_cuda_tests_tags", @@ -22,6 +20,8 @@ load( "if_gpu_is_configured", ) load("//xla/tests:build_defs.bzl", "generate_backend_suites", "generate_backend_test_macros", "xla_test", "xla_test_library") +load("//xla/tsl:tsl.bzl", "internal_visibility", "tsl_copts") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tools/BUILD b/third_party/xla/xla/tools/BUILD index c6f23b03cbb..a244749dacb 100644 --- a/third_party/xla/xla/tools/BUILD +++ b/third_party/xla/xla/tools/BUILD @@ -3,13 +3,6 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured") -load( - "@local_tsl//tsl:tsl.bzl", - "if_cuda_or_rocm", - "if_google", - "tsl_gpu_library", -) -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load( "@local_tsl//tsl/platform:build_config.bzl", "tf_proto_library", @@ -27,6 +20,13 @@ load( ) load("//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured") load("//xla/tests:build_defs.bzl", "xla_test") +load( + "//xla/tsl:tsl.bzl", + "if_cuda_or_rocm", + "if_google", + "tsl_gpu_library", +) +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tools/hlo_opt/BUILD b/third_party/xla/xla/tools/hlo_opt/BUILD index 1487bc0a484..1cbfbf1a363 100644 --- a/third_party/xla/xla/tools/hlo_opt/BUILD +++ b/third_party/xla/xla/tools/hlo_opt/BUILD @@ -2,7 +2,6 @@ load( "@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", ) -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load( "@local_tsl//tsl/platform:build_config_root.bzl", "tf_cuda_tests_tags", @@ -18,6 +17,7 @@ load( "//xla/stream_executor:build_defs.bzl", "if_gpu_is_configured", ) +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tools/multihost_hlo_runner/BUILD b/third_party/xla/xla/tools/multihost_hlo_runner/BUILD index 1a2ac425ed1..ae20683fca7 100644 --- a/third_party/xla/xla/tools/multihost_hlo_runner/BUILD +++ b/third_party/xla/xla/tools/multihost_hlo_runner/BUILD @@ -1,10 +1,10 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm") -load("@local_tsl//tsl:tsl.bzl", "if_cuda_or_rocm") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_binary") load("//xla/tests:build_defs.bzl", "xla_test") +load("//xla/tsl:tsl.bzl", "if_cuda_or_rocm") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/translate/BUILD b/third_party/xla/xla/translate/BUILD index 49ec44a922c..49d77a762f1 100644 --- a/third_party/xla/xla/translate/BUILD +++ b/third_party/xla/xla/translate/BUILD @@ -1,6 +1,6 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("//xla:xla.bzl", "xla_cc_binary") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/translate/hlo_to_mhlo/BUILD b/third_party/xla/xla/translate/hlo_to_mhlo/BUILD index ad5ad86b6b3..d3f5a0b7fd4 100644 --- a/third_party/xla/xla/translate/hlo_to_mhlo/BUILD +++ b/third_party/xla/xla/translate/hlo_to_mhlo/BUILD @@ -1,6 +1,6 @@ -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/translate/mhlo_to_hlo/BUILD b/third_party/xla/xla/translate/mhlo_to_hlo/BUILD index cb94fd2ce96..9c91d384abb 100644 --- a/third_party/xla/xla/translate/mhlo_to_hlo/BUILD +++ b/third_party/xla/xla/translate/mhlo_to_hlo/BUILD @@ -1,9 +1,9 @@ load("@bazel_skylib//rules:build_test.bzl", "build_test") load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library") -load("@local_tsl//tsl:tsl.bzl", "internal_visibility") -load("@local_tsl//tsl:tsl.default.bzl", "get_compatible_with_portable") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_binary", "cc_library") load("//xla:xla.bzl", "xla_cc_test") +load("//xla/tsl:tsl.bzl", "internal_visibility") +load("//xla/tsl:tsl.default.bzl", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/translate/mhlo_to_hlo/tests/BUILD b/third_party/xla/xla/translate/mhlo_to_hlo/tests/BUILD index 140d5bd9093..dbeb09eeb3f 100644 --- a/third_party/xla/xla/translate/mhlo_to_hlo/tests/BUILD +++ b/third_party/xla/xla/translate/mhlo_to_hlo/tests/BUILD @@ -1,5 +1,5 @@ -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("//xla:lit.bzl", "enforce_glob", "lit_test_suite") +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/third_party/tsl/tsl/BUILD b/third_party/xla/xla/tsl/BUILD similarity index 97% rename from third_party/xla/third_party/tsl/tsl/BUILD rename to third_party/xla/xla/tsl/BUILD index fbd87cb54a5..8a7cb42086d 100644 --- a/third_party/xla/third_party/tsl/tsl/BUILD +++ b/third_party/xla/xla/tsl/BUILD @@ -519,8 +519,11 @@ package_group( "//third_party/py/cloud_ml_autoflow/...", "//third_party/py/envlogger/...", "//third_party/yggdrasil_decision_forests/...", - "//tsl/...", - ], + ] + if_google([ + # Needed in OSS, where bazel won't allow a package group to refer to an + # external repo. + "@local_tsl//tsl/...", + ]), ) bzl_library( @@ -529,13 +532,13 @@ bzl_library( visibility = ["//visibility:public"], deps = [ "//third_party/compute_library:build_defs_bzl", - "//third_party/mkl_dnn:build_defs_bzl", - "//tsl/platform:rules_cc_bzl", + "//xla/tsl/mkl:build_defs_bzl", "@bazel_skylib//lib:new_sets", "@local_config_cuda//cuda:build_defs_bzl", "@local_config_rocm//rocm:build_defs_bzl", "@local_config_tensorrt//:build_defs_bzl", - "@local_xla//xla/tsl/mkl:build_defs_bzl", + "@local_tsl//third_party/mkl_dnn:build_defs_bzl", + "@local_tsl//tsl/platform:rules_cc_bzl", ], ) diff --git a/third_party/xla/xla/tsl/c/BUILD b/third_party/xla/xla/tsl/c/BUILD index ea17d7b3607..17dca06dbcc 100644 --- a/third_party/xla/xla/tsl/c/BUILD +++ b/third_party/xla/xla/tsl/c/BUILD @@ -1,12 +1,12 @@ # Description: # C API for TensorFlow, for use by client language bindings. -load("@local_tsl//tsl:tsl.bzl", "internal_visibility", "tsl_copts", "tsl_gpu_library") - -# buildifier: disable=same-origin-load -load("@local_tsl//tsl:tsl.default.bzl", "filegroup") load("@local_tsl//tsl/platform:build_config.bzl", "tsl_cc_test") load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library") +load("//xla/tsl:tsl.bzl", "internal_visibility", "tsl_copts", "tsl_gpu_library") + +# buildifier: disable=same-origin-load +load("//xla/tsl:tsl.default.bzl", "filegroup") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], diff --git a/third_party/xla/xla/tsl/cuda/BUILD.bazel b/third_party/xla/xla/tsl/cuda/BUILD.bazel index 4c26dbaadfc..6f0e9aefab7 100644 --- a/third_party/xla/xla/tsl/cuda/BUILD.bazel +++ b/third_party/xla/xla/tsl/cuda/BUILD.bazel @@ -101,14 +101,14 @@ cc_library( name = "cudart", # buildifier: disable=duplicated-name srcs = select({ # include dynamic loading implementation only when if_cuda_is_configured and build dynamically - "@local_tsl//tsl:is_cuda_enabled_and_oss": [ + "@local_xla//xla/tsl:is_cuda_enabled_and_oss": [ "cudart.tramp.S", "cudart_stub.cc", ], "//conditions:default": [], }), linkopts = select({ - "@local_tsl//tsl:is_cuda_enabled_and_oss": cuda_rpath_flags("nvidia/cuda_runtime/lib"), + "@local_xla//xla/tsl:is_cuda_enabled_and_oss": cuda_rpath_flags("nvidia/cuda_runtime/lib"), "//conditions:default": [], }), local_defines = [ @@ -117,7 +117,7 @@ cc_library( textual_hdrs = ["cudart.inc"], visibility = ["//visibility:public"], deps = select({ - "@local_tsl//tsl:is_cuda_enabled_and_oss": [ + "@local_xla//xla/tsl:is_cuda_enabled_and_oss": [ ":cuda", "@com_google_absl//absl/container:flat_hash_set", "@local_config_cuda//cuda:cuda_headers", diff --git a/third_party/xla/xla/tsl/cuda/stub.bzl b/third_party/xla/xla/tsl/cuda/stub.bzl index 1aaa52746d6..23c980766c8 100644 --- a/third_party/xla/xla/tsl/cuda/stub.bzl +++ b/third_party/xla/xla/tsl/cuda/stub.bzl @@ -19,9 +19,9 @@ def cuda_stub(name, srcs): ], tags = ["gpu"], cmd = select({ - "@local_tsl//tsl:linux_aarch64": "$(location //third_party/implib_so:make_stub) $< --outdir $(RULEDIR) --target aarch64", - "@local_tsl//tsl:linux_x86_64": "$(location //third_party/implib_so:make_stub) $< --outdir $(RULEDIR) --target x86_64", - "@local_tsl//tsl:linux_ppc64le": "$(location //third_party/implib_so:make_stub) $< --outdir $(RULEDIR) --target powerpc64le", + "@local_xla//xla/tsl:linux_aarch64": "$(location //third_party/implib_so:make_stub) $< --outdir $(RULEDIR) --target aarch64", + "@local_xla//xla/tsl:linux_x86_64": "$(location //third_party/implib_so:make_stub) $< --outdir $(RULEDIR) --target x86_64", + "@local_xla//xla/tsl:linux_ppc64le": "$(location //third_party/implib_so:make_stub) $< --outdir $(RULEDIR) --target powerpc64le", "//conditions:default": "NOT_IMPLEMENTED_FOR_THIS_PLATFORM_OR_ARCHITECTURE", }), ) diff --git a/third_party/xla/xla/tsl/mkl/BUILD b/third_party/xla/xla/tsl/mkl/BUILD index 7b372ddc4b8..ece39ea3044 100644 --- a/third_party/xla/xla/tsl/mkl/BUILD +++ b/third_party/xla/xla/tsl/mkl/BUILD @@ -1,6 +1,6 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load( - "@local_tsl//tsl:tsl.bzl", + "@local_xla//xla/tsl:tsl.bzl", "clean_dep", ) @@ -126,13 +126,13 @@ cc_library( }), visibility = ["//visibility:public"], deps = select({ - clean_dep("@local_tsl//tsl:linux_x86_64"): [ + clean_dep("@local_xla//xla/tsl:linux_x86_64"): [ ":mkl_libs_linux", ], - clean_dep("@local_tsl//tsl:macos"): [ + clean_dep("@local_xla//xla/tsl:macos"): [ ":mkl_libs_darwin", ], - clean_dep("@local_tsl//tsl:windows"): [ + clean_dep("@local_xla//xla/tsl:windows"): [ ":mkl_libs_windows", ], "//conditions:default": [], diff --git a/third_party/xla/xla/tsl/mkl/build_defs.bzl b/third_party/xla/xla/tsl/mkl/build_defs.bzl index 53c0fb893d4..e219a5c9148 100644 --- a/third_party/xla/xla/tsl/mkl/build_defs.bzl +++ b/third_party/xla/xla/tsl/mkl/build_defs.bzl @@ -33,8 +33,8 @@ def if_mkl(if_true, if_false = []): """ return select({ "@local_xla//xla/tsl/mkl:build_with_mkl_aarch64": if_true, - "@local_tsl//tsl:linux_x86_64": if_true, - "@local_tsl//tsl:windows": if_true, + "@local_xla//xla/tsl:linux_x86_64": if_true, + "@local_xla//xla/tsl:windows": if_true, "//conditions:default": if_false, }) @@ -102,8 +102,8 @@ def mkl_deps(): """ return select({ "@local_xla//xla/tsl/mkl:build_with_mkl_aarch64": ["@mkl_dnn_acl_compatible//:mkl_dnn_acl"], - "@local_tsl//tsl:linux_x86_64": ["@onednn//:mkl_dnn"], - "@local_tsl//tsl:windows": ["@onednn//:mkl_dnn"], + "@local_xla//xla/tsl:linux_x86_64": ["@onednn//:mkl_dnn"], + "@local_xla//xla/tsl:windows": ["@onednn//:mkl_dnn"], "//conditions:default": [], }) @@ -116,8 +116,8 @@ def onednn_v3_define(): """ return select({ "@local_xla//xla/tsl/mkl:build_with_mkl_aarch64": ["-DENABLE_ONEDNN_V3"], - "@local_tsl//tsl:linux_x86_64": ["-DENABLE_ONEDNN_V3"], - "@local_tsl//tsl:windows": ["-DENABLE_ONEDNN_V3"], + "@local_xla//xla/tsl:linux_x86_64": ["-DENABLE_ONEDNN_V3"], + "@local_xla//xla/tsl:windows": ["-DENABLE_ONEDNN_V3"], "//conditions:default": [], }) diff --git a/third_party/xla/third_party/tsl/tsl/tsl.bzl b/third_party/xla/xla/tsl/tsl.bzl similarity index 90% rename from third_party/xla/third_party/tsl/tsl/tsl.bzl rename to third_party/xla/xla/tsl/tsl.bzl index 5b9ba7a1382..0e9e3453187 100644 --- a/third_party/xla/third_party/tsl/tsl/tsl.bzl +++ b/third_party/xla/xla/tsl/tsl.bzl @@ -6,7 +6,7 @@ load( "if_cuda", ) load( - "@local_xla//xla/tsl/mkl:build_defs.bzl", + "//xla/tsl/mkl:build_defs.bzl", "if_enable_mkl", "if_mkl", "onednn_v3_define", @@ -16,7 +16,7 @@ load( "if_enable_acl", ) load( - "//third_party/mkl_dnn:build_defs.bzl", + "@local_tsl//third_party/mkl_dnn:build_defs.bzl", "if_mkldnn_aarch64_acl", "if_mkldnn_aarch64_acl_openmp", "if_mkldnn_openmp", @@ -39,7 +39,7 @@ load( # Internally this loads a macro, but in OSS this is a function # buildifier: disable=out-of-order-load -def register_extension_info(**kwargs): +def register_extension_info(**_kwargs): pass two_gpu_tags = ["requires-gpu-nvidia:2", "notap", "manual", "no_pip"] @@ -49,11 +49,23 @@ def clean_dep(target): Use this function when referring to targets in the TSL repository from macros that may be called from external repositories. + + Args: + target: the target to produce a canonicalized label for. + Returns: + The canonical label of the target. """ # A repo-relative label is resolved relative to the file in which the # Label() call appears, e.g. @local_tsl or tsl. - return str(Label(target)) + # TODO(ddunleavy): update this during and after go/moving-tsl-into-xla-lsc + label = Label(target) + not_yet_moved = ["concurrency", "distributed_runtime", "framework", "lib", "platform", "profiler", "protobuf"] + + if any([label.package.startswith("tsl/" + dirname) for dirname in not_yet_moved]): + return "@local_tsl//" + label.package + ":" + label.name + else: + return str(label) def if_cuda_or_rocm(if_true, if_false = []): """Shorthand for select()'ing whether to build for either CUDA or ROCm. @@ -91,6 +103,7 @@ def if_oss(oss_value, google_value = []): Specifically, it does not return a `select`, and can be used to e.g. compute elements of list attributes. """ + _ = (google_value, oss_value) # buildifier: disable=unused-variable return oss_value # copybara:comment_replace return google_value def if_google(google_value, oss_value = []): @@ -99,6 +112,7 @@ def if_google(google_value, oss_value = []): Specifically, it does not return a `select`, and can be used to e.g. compute elements of list attributes. """ + _ = (google_value, oss_value) # buildifier: disable=unused-variable return oss_value # copybara:comment_replace return google_value def internal_visibility(internal_targets): @@ -113,7 +127,7 @@ def internal_visibility(internal_targets): def if_tsl_link_protobuf(if_true, if_false = []): return select({ "//conditions:default": if_true, - clean_dep("//tsl:tsl_protobuf_header_only"): if_false, + clean_dep("//xla/tsl:tsl_protobuf_header_only"): if_false, }) def if_libtpu(if_true, if_false = []): @@ -122,32 +136,32 @@ def if_libtpu(if_true, if_false = []): # copybara:uncomment_begin(different config setting in OSS) # "//tools/cc_target_os:gce": if_true, # copybara:uncomment_end_and_comment_begin - clean_dep("//tsl:with_tpu_support"): if_true, + clean_dep("//xla/tsl:with_tpu_support"): if_true, # copybara:comment_end "//conditions:default": if_false, }) def if_macos(a, otherwise = []): return select({ - clean_dep("//tsl:macos"): a, + clean_dep("//xla/tsl:macos"): a, "//conditions:default": otherwise, }) def if_windows(a, otherwise = []): return select({ - clean_dep("//tsl:windows"): a, + clean_dep("//xla/tsl:windows"): a, "//conditions:default": otherwise, }) def if_not_windows(a): return select({ - clean_dep("//tsl:windows"): [], + clean_dep("//xla/tsl:windows"): [], "//conditions:default": a, }) def if_not_fuchsia(a): return select({ - clean_dep("//tsl:fuchsia"): [], + clean_dep("//xla/tsl:fuchsia"): [], "//conditions:default": a, }) @@ -159,37 +173,37 @@ def if_nvcc(a): def if_xla_available(if_true, if_false = []): return select({ - clean_dep("//tsl:with_xla_support"): if_true, + clean_dep("//xla/tsl:with_xla_support"): if_true, "//conditions:default": if_false, }) def if_android_arm(a): return select({ - clean_dep("//tsl:android_arm"): a, + clean_dep("//xla/tsl:android_arm"): a, "//conditions:default": [], }) def if_not_android(a): return select({ - clean_dep("//tsl:android"): [], + clean_dep("//xla/tsl:android"): [], "//conditions:default": a, }) def if_linux_x86_64(a): return select({ - clean_dep("//tsl:linux_x86_64"): a, + clean_dep("//xla/tsl:linux_x86_64"): a, "//conditions:default": [], }) def if_ios_x86_64(a): return select({ - clean_dep("//tsl:ios_x86_64"): a, + clean_dep("//xla/tsl:ios_x86_64"): a, "//conditions:default": [], }) def if_no_default_logger(a): return select({ - clean_dep("//tsl:no_default_logger"): a, + clean_dep("//xla/tsl:no_default_logger"): a, "//conditions:default": [], }) @@ -197,16 +211,16 @@ def if_no_default_logger(a): # Combine with 'if_gpu_is_configured' (XLA) or 'if_cuda_or_rocm' (otherwise). def if_nccl(if_true, if_false = []): return select({ - clean_dep("//tsl:no_nccl_support"): if_false, - clean_dep("//tsl:windows"): if_false, - clean_dep("//tsl:arm"): if_false, + clean_dep("//xla/tsl:no_nccl_support"): if_false, + clean_dep("//xla/tsl:windows"): if_false, + clean_dep("//xla/tsl:arm"): if_false, "//conditions:default": if_true, }) def if_with_tpu_support(if_true, if_false = []): """Shorthand for select()ing whether to build API support for TPUs when building TSL""" return select({ - clean_dep("//tsl:with_tpu_support"): if_true, + clean_dep("//xla/tsl:with_tpu_support"): if_true, "//conditions:default": if_false, }) @@ -296,16 +310,16 @@ def tsl_copts( if_ios_x86_64(["-msse4.1"]) + if_no_default_logger(["-DNO_DEFAULT_LOGGER"]) + select({ - clean_dep("//tsl:framework_shared_object"): [], + clean_dep("//xla/tsl:framework_shared_object"): [], "//conditions:default": ["-DTENSORFLOW_MONOLITHIC_BUILD"], }) + select({ - clean_dep("//tsl:android"): android_copts, - clean_dep("//tsl:emscripten"): [], - clean_dep("//tsl:macos"): [], - clean_dep("//tsl:windows"): get_win_copts(is_external), - clean_dep("//tsl:ios"): [], - clean_dep("//tsl:no_lgpl_deps"): ["-D__TENSORFLOW_NO_LGPL_DEPS__", "-pthread"], + clean_dep("//xla/tsl:android"): android_copts, + clean_dep("//xla/tsl:emscripten"): [], + clean_dep("//xla/tsl:macos"): [], + clean_dep("//xla/tsl:windows"): get_win_copts(is_external), + clean_dep("//xla/tsl:ios"): [], + clean_dep("//xla/tsl:no_lgpl_deps"): ["-D__TENSORFLOW_NO_LGPL_DEPS__", "-pthread"], "//conditions:default": ["-pthread"], }) ) @@ -313,11 +327,11 @@ def tsl_copts( def tf_openmp_copts(): # We assume when compiling on Linux gcc/clang will be used and MSVC on Windows return select({ - clean_dep("@local_xla//xla/tsl/mkl:build_with_mkl_lnx_openmp"): ["-fopenmp"], + clean_dep("//xla/tsl/mkl:build_with_mkl_lnx_openmp"): ["-fopenmp"], # copybara:uncomment_begin - # "@local_xla//xla/tsl/mkl:build_with_mkl_windows_openmp": ["/openmp"], + # "//xla/tsl/mkl:build_with_mkl_windows_openmp": ["/openmp"], # copybara:uncomment_end_and_comment_begin - clean_dep("@local_xla//xla/tsl/mkl:build_with_mkl_windows_openmp"): ["/openmp:llvm"], + clean_dep("//xla/tsl/mkl:build_with_mkl_windows_openmp"): ["/openmp:llvm"], # copybara:comment_end "//conditions:default": [], }) @@ -352,7 +366,7 @@ def tsl_gpu_library(deps = None, cuda_deps = None, copts = tsl_copts(), **kwargs kwargs.pop("default_copts", None) cc_library( deps = deps + if_cuda([ - clean_dep("@local_xla//xla/tsl/cuda:cudart"), + clean_dep("//xla/tsl/cuda:cudart"), "@local_config_cuda//cuda:cuda_headers", ]) + if_rocm_is_configured([ "@local_config_rocm//rocm:rocm_headers", @@ -456,7 +470,7 @@ def if_not_mobile_or_arm_or_lgpl_restricted(a): }) def tsl_grpc_cc_dependencies(): - return [clean_dep("//tsl:grpc++")] + return [clean_dep("//xla/tsl:grpc++")] # Bazel rule for collecting the header files that a target depends on. def _transitive_hdrs_impl(ctx): @@ -642,7 +656,7 @@ def tsl_pybind_extension_opensource( "-fno-strict-aliasing", "-fexceptions", ] + select({ - clean_dep("//tsl:windows"): [], + clean_dep("//xla/tsl:windows"): [], "//conditions:default": [ "-fvisibility=hidden", ], @@ -668,13 +682,13 @@ def tsl_pybind_extension_opensource( shared_lib_name = so_file, testonly = testonly, user_link_flags = linkopts + select({ - clean_dep("//tsl:macos"): [ + clean_dep("//xla/tsl:macos"): [ # TODO: the -w suppresses a wall of harmless warnings about hidden typeinfo symbols # not being exported. There should be a better way to deal with this. "-Wl,-w", "-Wl,-exported_symbols_list,$(location %s)" % exported_symbols_file, ], - clean_dep("//tsl:windows"): [], + clean_dep("//xla/tsl:windows"): [], "//conditions:default": [ "-Wl,--version-script", "$(location %s)" % version_script_file, @@ -701,19 +715,19 @@ def tsl_pybind_extension_opensource( "-fno-strict-aliasing", "-fexceptions", ] + select({ - clean_dep("//tsl:windows"): [], + clean_dep("//xla/tsl:windows"): [], "//conditions:default": [ "-fvisibility=hidden", ], }), linkopts = linkopts + select({ - clean_dep("//tsl:macos"): [ + clean_dep("//xla/tsl:macos"): [ # TODO: the -w suppresses a wall of harmless warnings about hidden typeinfo symbols # not being exported. There should be a better way to deal with this. "-Wl,-w", "-Wl,-exported_symbols_list,$(location %s)" % exported_symbols_file, ], - clean_dep("//tsl:windows"): [], + clean_dep("//xla/tsl:windows"): [], "//conditions:default": [ "-Wl,--version-script", "$(location %s)" % version_script_file, @@ -757,7 +771,7 @@ def tsl_pybind_extension_opensource( native.py_library( name = name, data = select({ - clean_dep("//tsl:windows"): [pyd_file], + clean_dep("//xla/tsl:windows"): [pyd_file], "//conditions:default": [so_file], }) + pytype_srcs, deps = pytype_deps, diff --git a/third_party/xla/third_party/tsl/tsl/tsl.default.bzl b/third_party/xla/xla/tsl/tsl.default.bzl similarity index 97% rename from third_party/xla/third_party/tsl/tsl/tsl.default.bzl rename to third_party/xla/xla/tsl/tsl.default.bzl index 91293924572..578100d2ee8 100644 --- a/third_party/xla/third_party/tsl/tsl/tsl.default.bzl +++ b/third_party/xla/xla/tsl/tsl.default.bzl @@ -1,7 +1,7 @@ """Default (OSS) build versions of TSL general-purpose build extensions.""" load( - "//tsl:tsl.bzl", + "//xla/tsl:tsl.bzl", _filegroup = "filegroup", _get_compatible_with_libtpu_portable = "get_compatible_with_libtpu_portable", _get_compatible_with_portable = "get_compatible_with_portable", diff --git a/third_party/xla/xla/tsl/util/BUILD b/third_party/xla/xla/tsl/util/BUILD index c96aa52c81f..fd0d1dc9412 100644 --- a/third_party/xla/xla/tsl/util/BUILD +++ b/third_party/xla/xla/tsl/util/BUILD @@ -4,13 +4,6 @@ # The libraries in this package are not allowed to have ANY dependencies # to other TF components outside of TSL. -load( - "@local_tsl//tsl:tsl.bzl", - "check_deps", - "internal_visibility", - "tsl_copts", -) -load("@local_tsl//tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") load( "@local_tsl//tsl/platform:build_config.bzl", "tsl_cc_test", @@ -23,6 +16,13 @@ load( "@local_tsl//tsl/platform:rules_cc.bzl", "cc_library", ) +load( + "//xla/tsl:tsl.bzl", + "check_deps", + "internal_visibility", + "tsl_copts", +) +load("//xla/tsl:tsl.default.bzl", "filegroup", "get_compatible_with_portable") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], @@ -242,7 +242,7 @@ cc_library( ], copts = tsl_copts(), visibility = internal_visibility([ - "@local_tsl//tsl:internal", + "//xla/tsl:internal", ]), ) diff --git a/third_party/xla/xla/xla.bzl b/third_party/xla/xla/xla.bzl index 71b67f8e74c..bf8d047dc37 100644 --- a/third_party/xla/xla/xla.bzl +++ b/third_party/xla/xla/xla.bzl @@ -4,10 +4,6 @@ load( "@local_config_rocm//rocm:build_defs.bzl", "if_rocm_is_configured", ) -load( - "@local_tsl//tsl:tsl.bzl", - "tsl_copts", -) load( "@local_tsl//tsl/platform:build_config_root.bzl", "if_static", @@ -17,6 +13,10 @@ load( "@local_tsl//tsl/platform/default:cuda_build_defs.bzl", "if_cuda_is_configured", ) +load( + "//xla/tsl:tsl.bzl", + "tsl_copts", +) def xla_py_proto_library(**_kwargs): # Note: we don't currently define a proto library target for Python in OSS. diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD index b8ca17d13b3..bab615b54df 100644 --- a/third_party/zlib.BUILD +++ b/third_party/zlib.BUILD @@ -33,7 +33,7 @@ cc_library( ], hdrs = ["zlib.h"], copts = select({ - "@local_tsl//tsl:windows": [], + "@local_xla//xla/tsl:windows": [], "//conditions:default": [ "-Wno-shift-negative-value", "-DZ_HAVE_UNISTD_H",