Skip to content

Commit 951490f

Browse files
authored
Try fixing workspace (#1485)
* Try fixing workspace * fix
1 parent f05211d commit 951490f

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

deps/ReactantExtra/.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ build --announce_rc
22

33
# TODO: Migrate for https://github.com/bazelbuild/bazel/issues/7260
44
common --noincompatible_enable_cc_toolchain_resolution
5+
common --repo_env USE_HERMETIC_CC_TOOLCHAIN=0
56
common --experimental_repo_remote_exec
67
common --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
78
common --cxxopt=-w --host_cxxopt=-w
89
common --define=grpc_no_ares=true
910
common --noenable_bzlmod
1011

12+
1113
build --repo_env=USE_PYWRAP_RULES=True
1214
build --copt=-DGRPC_BAZEL_BUILD
1315
build --host_copt=-DGRPC_BAZEL_BUILD
@@ -27,6 +29,7 @@ build:cuda --repo_env TF_NVCC_CLANG=1
2729
build:cuda --repo_env TF_NCCL_USE_STUB=1
2830
build:cuda --repo_env=HERMETIC_CUDA_VERSION="12.8.1"
2931
build:cuda --repo_env=HERMETIC_CUDNN_VERSION="9.8.0"
32+
build:cuda --repo_env=HERMETIC_NVSHMEM_VERSION="3.2.5"
3033
# "sm" means we emit only cubin, which is forward compatible within a GPU generation.
3134
# "compute" means we emit both cubin and PTX, which is larger but also forward compatible to future GPU generations.
3235
build:cuda --repo_env HERMETIC_CUDA_COMPUTE_CAPABILITIES="sm_60,sm_70,sm_80,compute_90"
@@ -35,6 +38,8 @@ build:cuda --@local_config_cuda//:enable_cuda
3538
# Default hermetic CUDA and CUDNN versions.
3639
build:cuda --@local_config_cuda//cuda:include_cuda_libs=true
3740
build:cuda --@local_config_cuda//:cuda_compiler=nvcc
41+
# build:cuda --@local_config_nvshmem//:override_include_nvshmem_libs=true
42+
# build:cuda --@local_config_nvshmem//cuda:include_nvshmem_libs=true
3843

3944
build:rocm --repo_env TF_NEED_ROCM=1
4045
build:rocm --define=using_rocm=true

deps/ReactantExtra/BUILD

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@llvm-project//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
22
load("@local_config_rocm//rocm:build_defs.bzl", "if_rocm")
3+
load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda")
34
load("@xla//tools/toolchains/cross_compile/cc:cc_toolchain_config.bzl", "cc_toolchain_config")
45

56
# load("//toolchain:yggdrasil.bzl", "ygg_cc_toolchain")
@@ -793,12 +794,7 @@ cc_library(
793794
"-Werror=return-type",
794795
"-Werror=unused-result",
795796
"-Wno-error=stringop-truncation",
796-
] + select({
797-
"@xla//xla/tsl:is_cuda_enabled_and_oss": [
798-
"-DREACTANT_CUDA=1",
799-
],
800-
"//conditions:default": [],
801-
}),
797+
] + if_cuda(["-DREACTANT_CUDA=1"]),
802798
linkopts = select({
803799
"//conditions:default": [],
804800
"@bazel_tools//src/conditions:darwin": [
@@ -1048,8 +1044,7 @@ cc_library(
10481044
"@xla//xla/tsl/platform:errors",
10491045
"@xla//xla/service:hlo_proto_cc_impl",
10501046
"@com_google_absl//absl/status:statusor",
1051-
] + select({
1052-
"@xla//xla/tsl:is_cuda_enabled_and_oss": [
1047+
] + if_cuda([
10531048
"@jax//jaxlib/cuda:cuda_gpu_kernels",
10541049
"@xla//xla/backends/profiler:profiler_backends",
10551050
"@xla//xla/backends/profiler/gpu:device_tracer",
@@ -1061,10 +1056,7 @@ cc_library(
10611056
"@xla//xla/stream_executor:cuda_platform",
10621057
"@xla//xla/stream_executor:kernel",
10631058
"@xla//xla/stream_executor/cuda:all_runtime",
1064-
],
1065-
"//conditions:default": [
1066-
],
1067-
}) + if_rocm([
1059+
]) + if_rocm([
10681060
"@xla//xla/stream_executor:rocm_platform",
10691061
"@xla//xla/service/gpu:amdgpu_compiler",
10701062
"@xla//xla/backends/profiler/gpu:device_tracer",

deps/ReactantExtra/WORKSPACE

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ http_archive(
1111
urls = ["https://github.com/wsmoses/nsync/archive/{commit}.tar.gz".format(commit = NSYNC_COMMIT)],
1212
)
1313

14-
ENZYMEXLA_COMMIT = "05b4c93ab2f581eae42f44599a1993311ad72c63"
14+
ENZYMEXLA_COMMIT = "fec4f6a25c046ff6acc29161656745fefa2fccda"
1515

1616
ENZYMEXLA_SHA256 = ""
1717

@@ -286,19 +286,36 @@ load("@jax//third_party/flatbuffers:workspace.bzl", flatbuffers = "repo")
286286
flatbuffers()
287287

288288
load(
289-
"@xla//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
289+
"@rules_ml_toolchain//cc_toolchain/deps:cc_toolchain_deps.bzl",
290+
"cc_toolchain_deps",
291+
)
292+
293+
cc_toolchain_deps()
294+
295+
register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64")
296+
297+
register_toolchains("@rules_ml_toolchain//cc_toolchain:lx64_lx64_cuda")
298+
299+
load(
300+
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
290301
"cuda_json_init_repository",
291302
)
292303

293304
cuda_json_init_repository()
294305

306+
load(
307+
"@cuda_redist_json//:distributions.bzl",
308+
"CUDA_REDISTRIBUTIONS",
309+
"CUDNN_REDISTRIBUTIONS",
310+
)
311+
295312
load(
296313
"@cuda_redist_json//:distributions.bzl",
297314
"CUDA_REDISTRIBUTIONS",
298315
"CUDNN_REDISTRIBUTIONS",
299316
)
300317
load(
301-
"@xla//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
318+
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
302319
"cuda_redist_init_repositories",
303320
"cudnn_redist_init_repository",
304321
)
@@ -312,28 +329,28 @@ cudnn_redist_init_repository(
312329
)
313330

314331
load(
315-
"@xla//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
332+
"@rules_ml_toolchain//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
316333
"cuda_configure",
317334
)
318335

319336
cuda_configure(name = "local_config_cuda")
320337

321338
load(
322-
"@xla//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
339+
"@rules_ml_toolchain//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
323340
"nccl_redist_init_repository",
324341
)
325342

326343
nccl_redist_init_repository()
327344

328345
load(
329-
"@xla//third_party/nccl/hermetic:nccl_configure.bzl",
346+
"@rules_ml_toolchain//third_party/nccl/hermetic:nccl_configure.bzl",
330347
"nccl_configure",
331348
)
332349

333350
nccl_configure(name = "local_config_nccl")
334351

335352
load(
336-
"@xla//third_party/nvshmem/hermetic:nvshmem_json_init_repository.bzl",
353+
"@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_json_init_repository.bzl",
337354
"nvshmem_json_init_repository",
338355
)
339356

@@ -344,17 +361,10 @@ load(
344361
"NVSHMEM_REDISTRIBUTIONS",
345362
)
346363
load(
347-
"@xla//third_party/nvshmem/hermetic:nvshmem_redist_init_repository.bzl",
364+
"@rules_ml_toolchain//third_party/nvshmem/hermetic:nvshmem_redist_init_repository.bzl",
348365
"nvshmem_redist_init_repository",
349366
)
350367

351368
nvshmem_redist_init_repository(
352369
nvshmem_redistributions = NVSHMEM_REDISTRIBUTIONS,
353370
)
354-
355-
load(
356-
"@xla//third_party/nvshmem/hermetic:nvshmem_configure.bzl",
357-
"nvshmem_configure",
358-
)
359-
360-
nvshmem_configure(name = "local_config_nvshmem")

0 commit comments

Comments
 (0)