From 9b1a656c1ef1f93f9e93eccb662de9bebe66b51a Mon Sep 17 00:00:00 2001 From: jax authors Date: Mon, 23 Oct 2023 12:13:17 -0700 Subject: [PATCH] Reverts 84c516974ab2b37169938d2d48a6c29a63c62c21 PiperOrigin-RevId: 575891656 --- .bazelrc | 86 ++++++++++++++++++++++++++++++---------------------- CHANGELOG.md | 3 ++ 2 files changed, 52 insertions(+), 37 deletions(-) diff --git a/.bazelrc b/.bazelrc index b1f1d44c6221..c14622b2375b 100644 --- a/.bazelrc +++ b/.bazelrc @@ -40,7 +40,15 @@ build --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir. # Later Bazel flag values override earlier values; if CUDA/ROCM/TPU are enabled, # these values are overridden. build --@xla//xla/python:enable_gpu=false - +# Disable clang extention that rejects type definitions within offsetof. +# This was added in clang-16 by https://reviews.llvm.org/D133574. +# Can be removed once upb is updated, since a type definition is used within +# offset of in the current version of ubp. +# See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183. +build:windows --copt=-Wno-gnu-offsetof-extensions +build:linux --copt=-Wno-gnu-offsetof-extensions +# Disable clang extention that rejects unknown arguments. +build --copt=-Qunused-arguments ########################################################################### build:posix --copt=-fvisibility=hidden @@ -92,6 +100,10 @@ build:cuda_plugin --define=xla_python_enable_gpu=false # The list of CUDA pip packages that JAX depends on are present in setup.py. build:cuda --linkopt=-Wl,--disable-new-dtags +build:cuda_clang --@local_config_cuda//:cuda_compiler=clang +build:cuda_clang --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang" +build:cuda_clang --action_env=TF_CUDA_CLANG="1" + build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true build:rocm --@xla//xla/python:enable_gpu=true @@ -171,6 +183,7 @@ build:rbe_linux --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.1 build:rbe_linux --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.1:jdk8 build:rbe_linux --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 build:rbe_linux --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8 +build:rbe_linux --config=cuda_clang # Non-rbe settings we should include because we do not run configure build:rbe_linux --config=avx_linux @@ -182,20 +195,20 @@ build:rbe_linux --host_linkopt=-lm # Use the GPU toolchain until the CPU one is ready. # https://github.com/bazelbuild/bazel/issues/13623 build:rbe_cpu_linux_base --config=rbe_linux -build:rbe_cpu_linux_base --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" -build:rbe_cpu_linux_base --crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" -build:rbe_cpu_linux_base --extra_toolchains="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64" -build:rbe_cpu_linux_base --extra_execution_platforms="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" -build:rbe_cpu_linux_base --host_platform="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" -build:rbe_cpu_linux_base --platforms="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" - -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" +build:rbe_cpu_linux_base --host_crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" +build:rbe_cpu_linux_base --crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" +build:rbe_cpu_linux_base --extra_toolchains="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64" +build:rbe_cpu_linux_base --extra_execution_platforms="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" +build:rbe_cpu_linux_base --host_platform="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" +build:rbe_cpu_linux_base --platforms="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" + +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" build:rbe_cpu_linux_py39 --python_path="/usr/local/bin/python3.9" -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" +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" build:rbe_cpu_linux_py310 --python_path="/usr/local/bin/python3.10" -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" +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" build:rbe_cpu_linux_py311 --python_path="/usr/local/bin/python3.11" -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" +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" build:rbe_cpu_linux_py312 --python_path="/usr/local/bin/python3.12" build:rbe_linux_cuda_base --config=rbe_linux @@ -208,22 +221,21 @@ build:rbe_linux_cuda11.8_nvcc_base --action_env=TF_CUDNN_VERSION=8 build:rbe_linux_cuda11.8_nvcc_base --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-11.8" build: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" build:rbe_linux_cuda11.8_nvcc_base --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" -build:rbe_linux_cuda11.8_nvcc_base --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain" -build:rbe_linux_cuda11.8_nvcc_base --crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain" -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" -build:rbe_linux_cuda11.8_nvcc_base --extra_execution_platforms="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform" -build:rbe_linux_cuda11.8_nvcc_base --host_platform="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform" -build:rbe_linux_cuda11.8_nvcc_base --platforms="@ubuntu20.04-gcc9_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform" -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" -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" -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" -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" +build:rbe_linux_cuda11.8_nvcc_base --host_crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain" +build:rbe_linux_cuda11.8_nvcc_base --crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_cuda//crosstool:toolchain" +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" +build:rbe_linux_cuda11.8_nvcc_base --extra_execution_platforms="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform" +build:rbe_linux_cuda11.8_nvcc_base --host_platform="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform" +build:rbe_linux_cuda11.8_nvcc_base --platforms="@ubuntu20.04-clang_manylinux2014-cuda11.8-cudnn8.6-tensorrt8.4_config_platform//:platform" +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" +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" +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" build:rbe_linux_cuda11.8_nvcc_py3.9 --python_path="/usr/local/bin/python3.9" -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" +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" build:rbe_linux_cuda11.8_nvcc_py3.10 --python_path="/usr/local/bin/python3.10" -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" +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" build:rbe_linux_cuda11.8_nvcc_py3.11 --python_path="/usr/local/bin/python3.11" -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" +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" build:rbe_linux_cuda11.8_nvcc_py3.12 --python_path="/usr/local/bin/python3.12" build: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 build:rbe_linux_cuda12.2_nvcc_base --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-12" build: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" build:rbe_linux_cuda12.2_nvcc_base --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" -build:rbe_linux_cuda12.2_nvcc_base --host_crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" -build:rbe_linux_cuda12.2_nvcc_base --crosstool_top="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" -build:rbe_linux_cuda12.2_nvcc_base --extra_toolchains="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64" -build:rbe_linux_cuda12.2_nvcc_base --extra_execution_platforms="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" -build:rbe_linux_cuda12.2_nvcc_base --host_platform="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" -build:rbe_linux_cuda12.2_nvcc_base --platforms="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" -build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_CUDA_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_cuda" -build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_NCCL_CONFIG_REPO="@ubuntu20.04-gcc9_manylinux2014-cuda12.2-cudnn8.9_config_nccl" -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" +build:rbe_linux_cuda12.2_nvcc_base --host_crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" +build:rbe_linux_cuda12.2_nvcc_base --crosstool_top="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain" +build:rbe_linux_cuda12.2_nvcc_base --extra_toolchains="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda//crosstool:toolchain-linux-x86_64" +build:rbe_linux_cuda12.2_nvcc_base --extra_execution_platforms="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" +build:rbe_linux_cuda12.2_nvcc_base --host_platform="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" +build:rbe_linux_cuda12.2_nvcc_base --platforms="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_platform//:platform" +build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_CUDA_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_cuda" +build:rbe_linux_cuda12.2_nvcc_base --repo_env=TF_NCCL_CONFIG_REPO="@ubuntu20.04-clang_manylinux2014-cuda12.2-cudnn8.9_config_nccl" +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" build:rbe_linux_cuda12.2_nvcc_py3.9 --python_path="/usr/local/bin/python3.9" -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" +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" build:rbe_linux_cuda12.2_nvcc_py3.10 --python_path="/usr/local/bin/python3.10" -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" +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" build:rbe_linux_cuda12.2_nvcc_py3.11 --python_path="/usr/local/bin/python3.11" -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" +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" build:rbe_linux_cuda12.2_nvcc_py3.12 --python_path="/usr/local/bin/python3.12" # These you may need to change for your own GCP project. diff --git a/CHANGELOG.md b/CHANGELOG.md index 529e7f7a2a74..fd50d67b66b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ Remember to align the itemized text with the first line of an item within a list # jaxlib 0.4.20 +* Changes + * Released wheels are built now with clang instead of gcc. + # jax 0.4.19 (Oct 19, 2023) * New Features