Skip to content

Commit 53cd52c

Browse files
Matt-Hurdcopybara-github
authored andcommitted
Hermetic CUDA was moved from XLA to rules_ml_toolchain open sourced repository. The current Hermetic CUDA directory will be removed from XLA soon.
PiperOrigin-RevId: 797072415
1 parent 8e5e89e commit 53cd52c

File tree

2 files changed

+16
-27
lines changed

2 files changed

+16
-27
lines changed

.bazelrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ build --cxxopt=-std=c++17
55
build --host_cxxopt=-std=c++17
66
build --noenable_bzlmod
77

8-
# Disable Hermetic CC toolchains
9-
build --@rules_ml_toolchain//common:enable_hermetic_cc=False
10-
build --repo_env USE_HERMETIC_CC_TOOLCHAIN=0
11-
128
build:macos --apple_platform_type=macos
139
build:macos --copt=-DGRPC_BAZEL_BUILD
1410

WORKSPACE

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,6 @@ load("@xla//:workspace3.bzl", "xla_workspace3")
5050

5151
xla_workspace3()
5252

53-
# Toolchains for ML projects
54-
# Details: https://github.com/google-ml-infra/rules_ml_toolchain
55-
http_archive(
56-
name = "rules_ml_toolchain",
57-
sha256 = "9dbee8f24cc1b430bf9c2a6661ab70cbca89979322ddc7742305a05ff637ab6b",
58-
strip_prefix = "rules_ml_toolchain-545c80f1026d526ea9c7aaa410bf0b52c9a82e74",
59-
urls = [
60-
"https://github.com/google-ml-infra/rules_ml_toolchain/archive/545c80f1026d526ea9c7aaa410bf0b52c9a82e74.tar.gz",
61-
],
62-
)
63-
64-
load(
65-
"@rules_ml_toolchain//cc/deps:cc_toolchain_deps.bzl",
66-
"cc_toolchain_deps",
67-
)
68-
69-
cc_toolchain_deps()
70-
7153
load("@xla//third_party/py:python_init_rules.bzl", "python_init_rules")
7254

7355
python_init_rules()
@@ -133,7 +115,18 @@ load(
133115
python_wheel_version_suffix_repository(name = "tf_wheel_version_suffix")
134116

135117
load(
136-
"@rules_ml_toolchain//gpu/cuda:cuda_json_init_repository.bzl",
118+
"@rules_ml_toolchain//cc_toolchain/deps:cc_toolchain_deps.bzl",
119+
"cc_toolchain_deps",
120+
)
121+
122+
cc_toolchain_deps()
123+
124+
register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64")
125+
126+
register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64_cuda")
127+
128+
load(
129+
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
137130
"cuda_json_init_repository",
138131
)
139132

@@ -145,7 +138,7 @@ load(
145138
"CUDNN_REDISTRIBUTIONS",
146139
)
147140
load(
148-
"@rules_ml_toolchain//gpu/cuda:cuda_redist_init_repositories.bzl",
141+
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
149142
"cuda_redist_init_repositories",
150143
"cudnn_redist_init_repository",
151144
)
@@ -159,21 +152,21 @@ cudnn_redist_init_repository(
159152
)
160153

161154
load(
162-
"@rules_ml_toolchain//gpu/cuda:cuda_configure.bzl",
155+
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
163156
"cuda_configure",
164157
)
165158

166159
cuda_configure(name = "local_config_cuda")
167160

168161
load(
169-
"@rules_ml_toolchain//gpu/nccl:nccl_redist_init_repository.bzl",
162+
"@xla//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
170163
"nccl_redist_init_repository",
171164
)
172165

173166
nccl_redist_init_repository()
174167

175168
load(
176-
"@rules_ml_toolchain//gpu/nccl:nccl_configure.bzl",
169+
"@xla//third_party/nccl/hermetic:nccl_configure.bzl",
177170
"nccl_configure",
178171
)
179172

0 commit comments

Comments
 (0)