Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move TSL's third_party to XLA, update users #23142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ load(":workspace0.bzl", "xla_workspace0")
xla_workspace0()

load(
"@tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
"//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
"cuda_json_init_repository",
)

Expand All @@ -66,7 +66,7 @@ load(
"CUDNN_REDISTRIBUTIONS",
)
load(
"@tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
"//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
"cuda_redist_init_repositories",
"cudnn_redist_init_repository",
)
Expand All @@ -80,21 +80,21 @@ cudnn_redist_init_repository(
)

load(
"@tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
"//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
"cuda_configure",
)

cuda_configure(name = "local_config_cuda")

load(
"@tsl//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
"//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
"nccl_redist_init_repository",
)

nccl_redist_init_repository()

load(
"@tsl//third_party/nccl/hermetic:nccl_configure.bzl",
"//third_party/nccl/hermetic:nccl_configure.bzl",
"nccl_configure",
)

Expand Down
138 changes: 138 additions & 0 deletions opensource_only.files
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,170 @@ compiler/xla/tsl/package_groups.bzl:
compiler/xla/tsl/profiler/BUILD:
third_party/BUILD:
third_party/__init__:.py
third_party/absl/com_google_absl.BUILD:
third_party/clang_toolchain/BUILD:
third_party/clang_toolchain/cc_configure_clang.bzl:
third_party/clang_toolchain/download_clang.bzl:
third_party/compute_library/BUILD:
third_party/compute_library/build_defs.bzl:
third_party/curl.BUILD:
third_party/cython.BUILD:
third_party/ducc/BUILD:
third_party/ducc/ducc0_custom_lowlevel_threading.h:
third_party/ducc/fft.cc:
third_party/ducc/fft.h:
third_party/ducc/threading.cc:
third_party/ducc/threading.h:
third_party/eigen3/BUILD:
third_party/eigen3/LICENSE:
third_party/eigen3/eigen_archive.BUILD:
third_party/git/BUILD.tpl:
third_party/git/BUILD:
third_party/git/git_configure.bzl:
third_party/gpus/BUILD:
third_party/gpus/compiler_common_tools.bzl:
third_party/gpus/crosstool/BUILD.rocm.tpl:
third_party/gpus/crosstool/BUILD.sycl.tpl:
third_party/gpus/crosstool/BUILD.tpl:
third_party/gpus/crosstool/BUILD:
third_party/gpus/crosstool/LICENSE:
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl:
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_rocm.tpl:
third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_sycl.tpl:
third_party/gpus/crosstool/sycl_cc_toolchain_config.bzl.tpl:
third_party/gpus/crosstool/windows/msvc_wrapper_for_nvcc.py.tpl:
third_party/gpus/cuda/BUILD.tpl:
third_party/gpus/cuda/BUILD.windows.tpl:
third_party/gpus/cuda/BUILD:
third_party/gpus/cuda/LICENSE:
third_party/gpus/cuda/build_defs.bzl.tpl:
third_party/gpus/cuda/cuda_config.h.tpl:
third_party/gpus/cuda/cuda_config.py.tpl:
third_party/gpus/cuda/hermetic/BUILD.tpl:
third_party/gpus/cuda/hermetic/BUILD:
third_party/gpus/cuda/hermetic/cuda_cccl.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_configure.bzl:
third_party/gpus/cuda/hermetic/cuda_cublas.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cudart.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cudnn.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cudnn9.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cufft.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cupti.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_curand.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cusolver.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_cusparse.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_json_init_repository.bzl:
third_party/gpus/cuda/hermetic/cuda_nvcc.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_nvjitlink.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_nvml.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_nvprune.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_nvrtc.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_nvtx.BUILD.tpl:
third_party/gpus/cuda/hermetic/cuda_redist_init_repositories.bzl:
third_party/gpus/cuda_configure.bzl:
third_party/gpus/find_cuda_config:.py
third_party/gpus/rocm/BUILD.tpl:
third_party/gpus/rocm/BUILD:
third_party/gpus/rocm/build_defs.bzl.tpl:
third_party/gpus/rocm/rocm_config.h.tpl:
third_party/gpus/rocm_configure.bzl:
third_party/gpus/sycl/BUILD.tpl:
third_party/gpus/sycl/BUILD:
third_party/gpus/sycl/build_defs.bzl.tpl:
third_party/gpus/sycl_configure.bzl:
third_party/grpc/BUILD:
third_party/implib_so/BUILD:
third_party/implib_so/get_symbols.py:
third_party/implib_so/make_stub.py:
third_party/llvm_openmp/BUILD:
third_party/llvm_openmp/cmake_vars.bzl:
third_party/llvm_openmp/expand_cmake_vars:.py
third_party/llvm_openmp/openmp.bzl:
third_party/mkl/BUILD:
third_party/mkl_dnn/LICENSE:
third_party/mkl_dnn/mkldnn_acl.BUILD:
third_party/mkl_dnn/mkldnn_v1.BUILD:
third_party/nccl/BUILD:
third_party/nccl/LICENSE:
third_party/nccl/archive.BUILD:
third_party/nccl/archive.patch:
third_party/nccl/build_defs.bzl.tpl:
third_party/nccl/generated_names.bzl.tpl:
third_party/nccl/hermetic/BUILD:
third_party/nccl/hermetic/cuda_nccl.BUILD.tpl:
third_party/nccl/hermetic/nccl_configure.bzl:
third_party/nccl/nccl_configure.bzl:
third_party/nccl/system.BUILD.tpl:
third_party/nvshmem/BUILD:
third_party/nvshmem/nvshmem.BUILD:
third_party/nvshmem/workspace.bzl:
third_party/nvtx/BUILD:
third_party/nvtx/LICENSE:
third_party/ortools/BUILD:
third_party/ortools/glpk.BUILD:
third_party/ortools/ortools.patch:
third_party/protobuf/BUILD:
third_party/py/BUILD.tpl:
third_party/py/BUILD:
third_party/py/manylinux_compliance_test.py:
third_party/py/ml_dtypes/BUILD:
third_party/py/numpy/BUILD:
third_party/py/py_import.bzl:
third_party/py/py_manylinux_compliance_test.bzl:
third_party/py/python_configure.bzl:
third_party/py/python_init_pip.bzl:
third_party/py/python_init_repositories.bzl:
third_party/py/python_init_rules.bzl:
third_party/py/python_init_toolchains.bzl:
third_party/py/python_repo.bzl:
third_party/py/python_wheel.bzl:
third_party/pybind11.BUILD:
third_party/pybind11_bazel/BUILD:
third_party/python_runtime/BUILD:
third_party/remote_config/BUILD.tpl:
third_party/remote_config/BUILD:
third_party/remote_config/common.bzl:
third_party/remote_config/remote_platform_configure.bzl:
third_party/repo.bzl:
third_party/six.BUILD:
third_party/snappy.BUILD:
third_party/spirv_llvm_translator/spirv_llvm_translator.BUILD:
third_party/stablehlo/BUILD:
third_party/systemlibs/BUILD.tpl:
third_party/systemlibs/BUILD:
third_party/systemlibs/absl_py.BUILD:
third_party/systemlibs/absl_py.absl.flags.BUILD:
third_party/systemlibs/absl_py.absl.logging.BUILD:
third_party/systemlibs/absl_py.absl.testing.BUILD:
third_party/systemlibs/boringssl.BUILD:
third_party/systemlibs/build_defs.bzl.tpl:
third_party/systemlibs/curl.BUILD:
third_party/systemlibs/cython.BUILD:
third_party/systemlibs/gif.BUILD:
third_party/systemlibs/google_cloud_cpp.BUILD:
third_party/systemlibs/google_cloud_cpp.google.cloud.bigtable.BUILD:
third_party/systemlibs/grpc.BUILD:
third_party/systemlibs/jsoncpp.BUILD:
third_party/systemlibs/lmdb.BUILD:
third_party/systemlibs/png.BUILD:
third_party/systemlibs/protobuf.BUILD:
third_party/systemlibs/protobuf.bzl:
third_party/systemlibs/re2.BUILD:
third_party/systemlibs/six.BUILD:
third_party/systemlibs/snappy.BUILD:
third_party/systemlibs/sqlite.BUILD:
third_party/systemlibs/syslibs_configure.bzl:
third_party/systemlibs/zlib.BUILD:
third_party/tensorrt/BUILD.tpl:
third_party/tensorrt/BUILD:
third_party/tensorrt/LICENSE:
third_party/tensorrt/build_defs.bzl.tpl:
third_party/tensorrt/plugin/BUILD:
third_party/tensorrt/tensorrt/include/tensorrt_config.h.tpl:
third_party/tensorrt/tensorrt/tensorrt_config.py.tpl:
third_party/tensorrt/tensorrt_configure.bzl:
third_party/tensorrt/workspace.bzl:
third_party/zlib.BUILD:
tools/def_file_filter/BUILD.tpl:
tools/def_file_filter/BUILD:
tools/def_file_filter/def_file_filter.py.tpl:
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions third_party/compute_library/build_defs.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def if_enable_acl(if_true, if_false = []):
return select({
"@tsl//third_party/compute_library:build_with_acl": if_true,
"@xla//third_party/compute_library:build_with_acl": if_true,
"//conditions:default": if_false,
})

Expand All @@ -15,6 +15,6 @@ def acl_deps():
inclusion in the deps attribute of rules.
"""
return select({
"@tsl//third_party/compute_library:build_with_acl": ["@compute_library//:arm_compute"],
"@xla//third_party/compute_library:build_with_acl": ["@compute_library//:arm_compute"],
"//conditions:default": [],
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ def _create_local_cuda_repository(repository_ctx):
],
))

check_cuda_libs_script = repository_ctx.path(Label("@tsl//third_party/gpus:check_cuda_libs.py"))
check_cuda_libs_script = repository_ctx.path(Label("@xla//third_party/gpus:check_cuda_libs.py"))
cuda_libs = _find_libs(repository_ctx, check_cuda_libs_script, cuda_config)
cuda_lib_srcs = []
cuda_lib_outs = []
Expand Down Expand Up @@ -1386,7 +1386,7 @@ remote_cuda_configure = repository_rule(
attrs = {
"environ": attr.string_dict(),
"_find_cuda_config": attr.label(
default = Label("@tsl//third_party/gpus:find_cuda_config.py"),
default = Label("@xla//third_party/gpus:find_cuda_config.py"),
),
},
)
Expand All @@ -1396,7 +1396,7 @@ cuda_configure = repository_rule(
environ = _ENVIRONS + [_TF_CUDA_CONFIG_REPO],
attrs = {
"_find_cuda_config": attr.label(
default = Label("@tsl//third_party/gpus:find_cuda_config.py"),
default = Label("@xla//third_party/gpus:find_cuda_config.py"),
),
},
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
load(
"@tsl//third_party/gpus/rocm:rocm_redist_ubuntu_20_04.bzl",
"@xla//third_party/gpus/rocm:rocm_redist_ubuntu_20_04.bzl",
"rocm_redist_ubuntu_20_04",
)
load(
"@tsl//third_party/gpus/rocm:rocm_redist_ubuntu_22_04.bzl",
"@xla//third_party/gpus/rocm:rocm_redist_ubuntu_22_04.bzl",
"rocm_redist_ubuntu_22_04",
)
load(
"@tsl//third_party/gpus/rocm:rocm_redist_ubuntu_24_04.bzl",
"@xla//third_party/gpus/rocm:rocm_redist_ubuntu_24_04.bzl",
"rocm_redist_ubuntu_24_04",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ remote_rocm_configure = repository_rule(
attrs = {
"environ": attr.string_dict(),
"_find_rocm_config": attr.label(
default = Label("@tsl//third_party/gpus:find_rocm_config.py"),
default = Label("@xla//third_party/gpus:find_rocm_config.py"),
),
},
)
Expand All @@ -887,7 +887,7 @@ rocm_configure = repository_rule(
environ = _ENVIRONS + [_TF_ROCM_CONFIG_REPO],
attrs = {
"_find_rocm_config": attr.label(
default = Label("@tsl//third_party/gpus:find_rocm_config.py"),
default = Label("@xla//third_party/gpus:find_rocm_config.py"),
),
},
)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ expand_template(
name = "move_static_components_h",
out = "hwloc/static-components.h",
substitutions = {"&hwloc_linuxio_component": "//&hwloc_linuxio_component"},
template = "@tsl//third_party/hwloc:static-components.h",
template = "@xla//third_party/hwloc:static-components.h",
)

cc_library(
Expand Down
2 changes: 1 addition & 1 deletion third_party/implib_so/get_symbols.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Given a .so file, lists symbols that should be included in a stub.

Example usage:
$ bazel run -c opt @tsl//third_party/implib_so:get_symbols
$ bazel run -c opt @xla//third_party/implib_so:get_symbols
/usr/local/cuda/lib64/libcudart.so > third_party/tsl/tsl/cuda/cudart.symbols
"""

Expand Down
4 changes: 2 additions & 2 deletions third_party/llvm_openmp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(
"@tsl//third_party/llvm_openmp:cmake_vars.bzl",
"@xla//third_party/llvm_openmp:cmake_vars.bzl",
"cmake_var_string",
"expand_cmake_vars",
)
load(
"@tsl//third_party/llvm_openmp:openmp.bzl",
"@xla//third_party/llvm_openmp:openmp.bzl",
"dict_add",
"libiomp5_cc_binary",
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/llvm_openmp/cmake_vars.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def expand_cmake_vars(name, src, dst, cmake_vars):
cmake_vars: a string containing the CMake variables, as generated by
cmake_var_string.
"""
expand_cmake_vars_tool = "@tsl//third_party/llvm_openmp:expand_cmake_vars"
expand_cmake_vars_tool = "@xla//third_party/llvm_openmp:expand_cmake_vars"
native.genrule(
name = name,
srcs = [src],
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion third_party/nanobind/nanobind.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ cc_library(
),
deps = [
"@robin_map",
"@tsl//third_party/python_runtime:headers",
"@xla//third_party/python_runtime:headers",
],
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ remote_nccl_configure = repository_rule(
attrs = {
"environ": attr.string_dict(),
"_find_cuda_config": attr.label(
default = Label("@tsl//third_party/gpus:find_cuda_config.py"),
default = Label("@xla//third_party/gpus:find_cuda_config.py"),
),
},
)
Expand All @@ -204,7 +204,7 @@ nccl_configure = repository_rule(
environ = _ENVIRONS,
attrs = {
"_find_cuda_config": attr.label(
default = Label("@tsl//third_party/gpus:find_cuda_config.py"),
default = Label("@xla//third_party/gpus:find_cuda_config.py"),
),
},
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion third_party/py/ml_dtypes/ml_dtypes.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pybind_extension(
":intn",
":mxfloat",
"@eigen_archive//:eigen3",
"@tsl//third_party/py/numpy:headers",
"@xla//third_party/py/numpy:headers",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cc_library(
includes = ["include"],
strip_include_prefix = "include",
deps = [
"@tsl//third_party/python_runtime:headers",
"@xla//third_party/python_runtime:headers",
],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _remote_platform_configure_impl(repository_ctx):

repository_ctx.template(
"BUILD",
Label("@tsl//third_party/remote_config:BUILD.tpl"),
Label("@xla//third_party/remote_config:BUILD.tpl"),
{
"%{platform}": platform,
"%{exec_properties}": serialized_exec_properties,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ package(default_visibility = ["//visibility:public"])
cc_library(
name = "pybind11",
deps = [
"@tsl//third_party/python_runtime:headers",
"@xla//third_party/python_runtime:headers",
],
)
Loading
Loading