@@ -57,6 +57,16 @@ build:native_arch_posix --host_copt=-march=native
5757
5858build:mkl_open_source_only --define=tensorflow_mkldnn_contraction_kernel=1
5959
60+ build:clang --action_env=CC="/usr/lib/llvm-18/bin/clang"
61+ # Disable clang extention that rejects type definitions within offsetof.
62+ # This was added in clang-16 by https://reviews.llvm.org/D133574.
63+ # Can be removed once upb is updated, since a type definition is used within
64+ # offset of in the current version of ubp.
65+ # See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
66+ build:clang --copt=-Wno-gnu-offsetof-extensions
67+ # Disable clang extention that rejects unknown arguments.
68+ build:clang --copt=-Qunused-arguments
69+
6070build:cuda --repo_env TF_NEED_CUDA=1
6171build:cuda --repo_env TF_NCCL_USE_STUB=1
6272# "sm" means we emit only cubin, which is forward compatible within a GPU generation.
@@ -68,14 +78,6 @@ build:cuda --@xla//xla/python:jax_cuda_pip_rpaths=true
6878# Default hermetic CUDA and CUDNN versions.
6979build:cuda --repo_env=HERMETIC_CUDA_VERSION="12.3.2"
7080build:cuda --repo_env=HERMETIC_CUDNN_VERSION="9.1.1"
71- # This flag is needed to include CUDA libraries for bazel tests.
72- test:cuda --@local_config_cuda//cuda:include_cuda_libs=true
73-
74- # Requires MSVC and LLVM to be installed
75- build:win_clang --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
76- build:win_clang --extra_execution_platforms=//jax/tools/toolchains:x64_windows-clang-cl
77- build:win_clang --compiler=clang-cl
78-
7981# Force the linker to set RPATH, not RUNPATH. When resolving dynamic libraries,
8082# ld.so prefers in order: RPATH, LD_LIBRARY_PATH, RUNPATH. JAX sets RPATH to
8183# point to the $ORIGIN-relative location of the pip-installed NVIDIA CUDA
@@ -89,23 +91,18 @@ build:win_clang --compiler=clang-cl
8991# acceptable, because the workaround is "remove the nvidia-..." pip packages.
9092# The list of CUDA pip packages that JAX depends on are present in setup.py.
9193build:cuda --linkopt=-Wl,--disable-new-dtags
94+ build:cuda --@local_config_cuda//:cuda_compiler=clang
95+ build:cuda --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-18/bin/clang"
9296
93- build:cuda_clang --@local_config_cuda//:cuda_compiler=clang
94- build:cuda_clang --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-18/bin/clang"
95- # Disable clang extention that rejects type definitions within offsetof.
96- # This was added in clang-16 by https://reviews.llvm.org/D133574.
97- # Can be removed once upb is updated, since a type definition is used within
98- # offset of in the current version of ubp.
99- # See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
100- build:cuda_clang --copt=-Wno-gnu-offsetof-extensions
101- # Disable clang extention that rejects unknown arguments.
102- build:cuda_clang --copt=-Qunused-arguments
97+ # This flag is needed to include CUDA libraries for bazel tests.
98+ test:cuda --@local_config_cuda//cuda:include_cuda_libs=true
10399
104- # Build with nvcc for CUDA and clang for host
105- build:nvcc_clang --config=cuda
106- build:nvcc_clang --config=cuda_clang
107- build:nvcc_clang --action_env=TF_NVCC_CLANG="1"
108- build:nvcc_clang --@local_config_cuda//:cuda_compiler=nvcc
100+ # Build with NVCC for CUDA
101+ build:cuda_nvcc --config=cuda
102+ build:cuda_nvcc --config=clang
103+ build:cuda_nvcc --@local_config_cuda//:cuda_compiler=nvcc
104+ build:cuda_nvcc --action_env=TF_NVCC_CLANG="1"
105+ build:cuda_nvcc --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-18/bin/clang"
109106
110107build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
111108build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true
@@ -114,6 +111,11 @@ build:rocm --action_env TF_ROCM_AMDGPU_TARGETS="gfx900,gfx906,gfx908,gfx90a,gfx1
114111
115112build:nonccl --define=no_nccl_support=true
116113
114+ # Requires MSVC and LLVM to be installed
115+ build:win_clang --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
116+ build:win_clang --extra_execution_platforms=//jax/tools/toolchains:x64_windows-clang-cl
117+ build:win_clang --compiler=clang-cl
118+
117119# Windows has a relatively short command line limit, which JAX has begun to hit.
118120# See https://docs.bazel.build/versions/main/windows.html
119121build:windows --features=compiler_param_file
@@ -200,7 +202,7 @@ build:rbe_linux --host_linkopt=-lm
200202# Use the GPU toolchain until the CPU one is ready.
201203# https://github.com/bazelbuild/bazel/issues/13623
202204build:rbe_cpu_linux_base --config=rbe_linux
203- build:rbe_cpu_linux_base --config=cuda_clang
205+ build:rbe_cpu_linux_base --config=clang
204206build:rbe_cpu_linux_base --host_crosstool_top="@local_config_cuda//crosstool:toolchain"
205207build:rbe_cpu_linux_base --crosstool_top="@local_config_cuda//crosstool:toolchain"
206208build:rbe_cpu_linux_base --extra_toolchains="@local_config_cuda//crosstool:toolchain-linux-x86_64"
@@ -215,13 +217,15 @@ build:rbe_cpu_linux_py3.11 --config=rbe_cpu_linux_base
215217build:rbe_cpu_linux_py3.11 --repo_env HERMETIC_PYTHON_VERSION="3.11"
216218build:rbe_cpu_linux_py3.12 --config=rbe_cpu_linux_base
217219build:rbe_cpu_linux_py3.12 --repo_env HERMETIC_PYTHON_VERSION="3.12"
220+ build:rbe_cpu_linux_py3.13 --config=rbe_cpu_linux_base
221+ build:rbe_cpu_linux_py3.13 --repo_env HERMETIC_PYTHON_VERSION="3.13"
218222
219223build:rbe_linux_cuda_base --config=rbe_linux
220224build:rbe_linux_cuda_base --config=cuda
221225build:rbe_linux_cuda_base --repo_env=REMOTE_GPU_TESTING=1
222226
223227build:rbe_linux_cuda12.3_nvcc_base --config=rbe_linux_cuda_base
224- build:rbe_linux_cuda12.3_nvcc_base --config=nvcc_clang
228+ build:rbe_linux_cuda12.3_nvcc_base --config=cuda_nvcc
225229build:rbe_linux_cuda12.3_nvcc_base --repo_env=HERMETIC_CUDA_VERSION="12.3.2"
226230build:rbe_linux_cuda12.3_nvcc_base --repo_env=HERMETIC_CUDNN_VERSION="9.1.1"
227231build:rbe_linux_cuda12.3_nvcc_base --host_crosstool_top="@local_config_cuda//crosstool:toolchain"
@@ -237,6 +241,8 @@ build:rbe_linux_cuda12.3_nvcc_py3.11 --config=rbe_linux_cuda12.3_nvcc_base
237241build:rbe_linux_cuda12.3_nvcc_py3.11 --repo_env HERMETIC_PYTHON_VERSION="3.11"
238242build:rbe_linux_cuda12.3_nvcc_py3.12 --config=rbe_linux_cuda12.3_nvcc_base
239243build:rbe_linux_cuda12.3_nvcc_py3.12 --repo_env HERMETIC_PYTHON_VERSION="3.12"
244+ build:rbe_linux_cuda12.3_nvcc_py3.13 --config=rbe_linux_cuda12.3_nvcc_base
245+ build:rbe_linux_cuda12.3_nvcc_py3.13 --repo_env HERMETIC_PYTHON_VERSION="3.13"
240246
241247# These you may need to change for your own GCP project.
242248build:tensorflow_testing_rbe --project_id=tensorflow-testing
0 commit comments