@@ -40,7 +40,15 @@ build --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir.
4040# Later Bazel flag values override earlier values; if CUDA/ROCM/TPU are enabled,
4141# these values are overridden.
4242build --@xla//xla/python:enable_gpu=false
43-
43+ # Disable clang extention that rejects type definitions within offsetof.
44+ # This was added in clang-16 by https://reviews.llvm.org/D133574.
45+ # Can be removed once upb is updated, since a type definition is used within
46+ # offset of in the current version of ubp.
47+ # See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183.
48+ build:windows --copt=-Wno-gnu-offsetof-extensions
49+ build:linux --copt=-Wno-gnu-offsetof-extensions
50+ # Disable clang extention that rejects unknown arguments.
51+ build --copt=-Qunused-arguments
4452###########################################################################
4553
4654build:posix --copt=-fvisibility=hidden
@@ -92,6 +100,10 @@ build:cuda_plugin --define=xla_python_enable_gpu=false
92100# The list of CUDA pip packages that JAX depends on are present in setup.py.
93101build:cuda --linkopt=-Wl,--disable-new-dtags
94102
103+ build:cuda_clang --@local_config_cuda//:cuda_compiler=clang
104+ build:cuda_clang --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang"
105+ build:cuda_clang --action_env=TF_CUDA_CLANG="1"
106+
95107build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
96108build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true
97109build:rocm --@xla//xla/python:enable_gpu=true
@@ -171,6 +183,7 @@ build:rbe_linux --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.1
171183build:rbe_linux --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.1:jdk8
172184build:rbe_linux --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
173185build:rbe_linux --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
186+ build:rbe_linux --config=cuda_clang
174187
175188# Non-rbe settings we should include because we do not run configure
176189build:rbe_linux --config=avx_linux
@@ -182,20 +195,20 @@ build:rbe_linux --host_linkopt=-lm
182195# Use the GPU toolchain until the CPU one is ready.
183196# https://github.com/bazelbuild/bazel/issues/13623
184197build:rbe_cpu_linux_base --config=rbe_linux
185- build:rbe_cpu_linux_base --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
186- build:rbe_cpu_linux_base --crosstool_top="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
187- build:rbe_cpu_linux_base --extra_toolchains="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64"
188- build:rbe_cpu_linux_base --extra_execution_platforms="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
189- build:rbe_cpu_linux_base --host_platform="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
190- build:rbe_cpu_linux_base --platforms="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
191-
192- build:rbe_cpu_linux_py39 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.9"
198+ build:rbe_cpu_linux_base --host_crosstool_top="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
199+ build:rbe_cpu_linux_base --crosstool_top="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
200+ build:rbe_cpu_linux_base --extra_toolchains="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64"
201+ build:rbe_cpu_linux_base --extra_execution_platforms="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
202+ build:rbe_cpu_linux_base --host_platform="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
203+ build:rbe_cpu_linux_base --platforms="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
204+
205+ build:rbe_cpu_linux_py39 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.9"
193206build:rbe_cpu_linux_py39 --python_path="/usr/local/bin/python3.9"
194- build:rbe_cpu_linux_py310 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.10"
207+ build:rbe_cpu_linux_py310 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.10"
195208build:rbe_cpu_linux_py310 --python_path="/usr/local/bin/python3.10"
196- build:rbe_cpu_linux_py311 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.11"
209+ build:rbe_cpu_linux_py311 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.11"
197210build:rbe_cpu_linux_py311 --python_path="/usr/local/bin/python3.11"
198- build:rbe_cpu_linux_py312 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.12"
211+ build:rbe_cpu_linux_py312 --config=rbe_cpu_linux_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.12"
199212build:rbe_cpu_linux_py312 --python_path="/usr/local/bin/python3.12"
200213
201214build:rbe_linux_cuda_base --config=rbe_linux
@@ -208,22 +221,21 @@ build:rbe_linux_cuda11.8_nvcc_base --action_env=TF_CUDNN_VERSION=8
208221build:rbe_linux_cuda11.8_nvcc_base --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-11.8"
209222build:rbe_linux_cuda11.8_nvcc_base --action_env=LD_LIBRARY_PATH="/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/tensorrt/lib"
210223build:rbe_linux_cuda11.8_nvcc_base --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc"
211- build:rbe_linux_cuda11.8_nvcc_base --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain"
212- build:rbe_linux_cuda11.8_nvcc_base --crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain"
213- build:rbe_linux_cuda11.8_nvcc_base --extra_toolchains="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain-linux-x86_64"
214- build:rbe_linux_cuda11.8_nvcc_base --extra_execution_platforms="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform"
215- build:rbe_linux_cuda11.8_nvcc_base --host_platform="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform"
216- build:rbe_linux_cuda11.8_nvcc_base --platforms="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform"
217- build:rbe_linux_cuda11.8_nvcc_base --repo_env=TF_CUDA_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda"
218- build:rbe_linux_cuda11.8_nvcc_base --repo_env=TF_TENSORRT_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_tensorrt"
219- build:rbe_linux_cuda11.8_nvcc_base --repo_env=TF_NCCL_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_nccl"
220- build:rbe_linux_cuda11.8_nvcc_py3.9 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_python3.9"
224+ build:rbe_linux_cuda11.8_nvcc_base --host_crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain"
225+ build:rbe_linux_cuda11.8_nvcc_base --crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain"
226+ build:rbe_linux_cuda11.8_nvcc_base --extra_toolchains="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain-linux-x86_64"
227+ build:rbe_linux_cuda11.8_nvcc_base --extra_execution_platforms="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform"
228+ build:rbe_linux_cuda11.8_nvcc_base --host_platform="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform"
229+ build:rbe_linux_cuda11.8_nvcc_base --platforms="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform"
230+ build:rbe_linux_cuda11.8_nvcc_base --repo_env=TF_CUDA_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda"
231+ build:rbe_linux_cuda11.8_nvcc_base --repo_env=TF_NCCL_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_nccl"
232+ build:rbe_linux_cuda11.8_nvcc_py3.9 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_python3.9"
221233build:rbe_linux_cuda11.8_nvcc_py3.9 --python_path="/usr/local/bin/python3.9"
222- build:rbe_linux_cuda11.8_nvcc_py3.10 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda11.8-cudnn8.6-tensorrt8.4_config_python3.10"
234+ build:rbe_linux_cuda11.8_nvcc_py3.10 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda11.8-cudnn8.6-tensorrt8.4_config_python3.10"
223235build:rbe_linux_cuda11.8_nvcc_py3.10 --python_path="/usr/local/bin/python3.10"
224- build:rbe_linux_cuda11.8_nvcc_py3.11 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda11.8-cudnn8.6-tensorrt8.4_config_python3.11"
236+ build:rbe_linux_cuda11.8_nvcc_py3.11 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda11.8-cudnn8.6-tensorrt8.4_config_python3.11"
225237build:rbe_linux_cuda11.8_nvcc_py3.11 --python_path="/usr/local/bin/python3.11"
226- build:rbe_linux_cuda11.8_nvcc_py3.12 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda11.8-cudnn8.6-tensorrt8.4_config_python3.12"
238+ build:rbe_linux_cuda11.8_nvcc_py3.12 --config=rbe_linux_cuda11.8_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda11.8-cudnn8.6-tensorrt8.4_config_python3.12"
227239build:rbe_linux_cuda11.8_nvcc_py3.12 --python_path="/usr/local/bin/python3.12"
228240
229241build:rbe_linux_cuda12.2_nvcc_base --config=rbe_linux_cuda_base
@@ -232,21 +244,21 @@ build:rbe_linux_cuda12.2_nvcc_base --action_env=TF_CUDNN_VERSION=8
232244build:rbe_linux_cuda12.2_nvcc_base --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-12"
233245build:rbe_linux_cuda12.2_nvcc_base --action_env=LD_LIBRARY_PATH="/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/tensorrt/lib"
234246build:rbe_linux_cuda12.2_nvcc_base --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc"
235- build:rbe_linux_cuda12.2_nvcc_base --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
236- build:rbe_linux_cuda12.2_nvcc_base --crosstool_top="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
237- build:rbe_linux_cuda12.2_nvcc_base --extra_toolchains="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64"
238- build:rbe_linux_cuda12.2_nvcc_base --extra_execution_platforms="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
239- build:rbe_linux_cuda12.2_nvcc_base --host_platform="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
240- build:rbe_linux_cuda12.2_nvcc_base --platforms="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
241- build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_CUDA_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_cuda"
242- build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_NCCL_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_nccl"
243- build:rbe_linux_cuda12.2_nvcc_py3.9 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.9"
247+ build:rbe_linux_cuda12.2_nvcc_base --host_crosstool_top="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
248+ build:rbe_linux_cuda12.2_nvcc_base --crosstool_top="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain"
249+ build:rbe_linux_cuda12.2_nvcc_base --extra_toolchains="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64"
250+ build:rbe_linux_cuda12.2_nvcc_base --extra_execution_platforms="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
251+ build:rbe_linux_cuda12.2_nvcc_base --host_platform="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
252+ build:rbe_linux_cuda12.2_nvcc_base --platforms="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_platform//:platform"
253+ build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_CUDA_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_cuda"
254+ build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_NCCL_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_nccl"
255+ build:rbe_linux_cuda12.2_nvcc_py3.9 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.9"
244256build:rbe_linux_cuda12.2_nvcc_py3.9 --python_path="/usr/local/bin/python3.9"
245- build:rbe_linux_cuda12.2_nvcc_py3.10 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.10"
257+ build:rbe_linux_cuda12.2_nvcc_py3.10 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.10"
246258build:rbe_linux_cuda12.2_nvcc_py3.10 --python_path="/usr/local/bin/python3.10"
247- build:rbe_linux_cuda12.2_nvcc_py3.11 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.11"
259+ build:rbe_linux_cuda12.2_nvcc_py3.11 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.11"
248260build:rbe_linux_cuda12.2_nvcc_py3.11 --python_path="/usr/local/bin/python3.11"
249- build:rbe_linux_cuda12.2_nvcc_py3.12 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014 -cuda12.2-cudnn8.9_config_python3.12"
261+ build:rbe_linux_cuda12.2_nvcc_py3.12 --config=rbe_linux_cuda12.2_nvcc_base --repo_env=TF_PYTHON_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014 -cuda12.2-cudnn8.9_config_python3.12"
250262build:rbe_linux_cuda12.2_nvcc_py3.12 --python_path="/usr/local/bin/python3.12"
251263
252264# These you may need to change for your own GCP project.
0 commit comments