diff --git a/.bazelrc b/.bazelrc index d7ae76f096431a..1a47809a8f9753 100644 --- a/.bazelrc +++ b/.bazelrc @@ -251,7 +251,7 @@ build:cuda_clang_official --action_env=TF_CUDA_VERSION="12" build:cuda_clang_official --action_env=TF_CUDNN_VERSION="8" build:cuda_clang_official --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-12.3" build:cuda_clang_official --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" -build:cuda_clang_official --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang" +build:cuda_clang_official --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-18/bin/clang" build:cuda_clang_official --action_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" build:cuda_clang_official --crosstool_top="@sigbuild-r2.17-clang_config_cuda//crosstool:toolchain" @@ -602,15 +602,12 @@ try-import %workspace%/.bazelrc.user # Build TensorFlow v2. test:release_base --test_size_filters=small,medium -# Ensure release_base is set on linux -build:release_linux_base --config=release_base - -# Target the AVX instruction set -build:release_linux_base --config=avx_linux - # Enable support for all targets build:release_base --config=cpu_cross +# Ensure release_base is set on linux +build:release_linux_base --config=release_base + # Disable clang extension 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 @@ -633,8 +630,8 @@ build:release_linux_base --action_env PYTHON_BIN_PATH="/usr/bin/python3" build:release_linux_base --action_env PYTHON_LIB_PATH="/usr/lib/tf_python" build:release_linux_base --python_path="/usr/bin/python3" # Set Clang as compiler. Use the actual path to clang installed in container. -build:release_cpu_linux_base --repo_env=CC="/usr/lib/llvm-17/bin/clang" -build:release_cpu_linux_base --repo_env=BAZEL_COMPILER="/usr/lib/llvm-17/bin/clang" +build:release_cpu_linux_base --repo_env=CC="/usr/lib/llvm-18/bin/clang" +build:release_cpu_linux_base --repo_env=BAZEL_COMPILER="/usr/lib/llvm-18/bin/clang" # Test-related settings below this point. test:release_linux_base --build_tests_only --keep_going --test_output=errors --verbose_failures=true test:release_linux_base --local_test_jobs=HOST_CPUS @@ -645,6 +642,8 @@ test:release_linux_base --test_summary=short # Use the Clang toolchain to compile build:release_cpu_linux --config=release_linux_base build:release_cpu_linux --crosstool_top="@sigbuild-r2.17-clang_config_cuda//crosstool:toolchain" +# Target the AVX instruction set +build:release_cpu_linux --config=avx_linux build:release_gpu_linux --config=release_cpu_linux # Set up compilation CUDA version and paths and use the CUDA Clang toolchain. diff --git a/ci/official/containers/linux_arm64/Dockerfile b/ci/official/containers/linux_arm64/Dockerfile index 5ddf6b02f46d60..f6118456926f77 100644 --- a/ci/official/containers/linux_arm64/Dockerfile +++ b/ci/official/containers/linux_arm64/Dockerfile @@ -1,5 +1,5 @@ ################################################################################ -FROM ubuntu:20.04 as builder +FROM ubuntu:22.04 as builder ################################################################################ # Install devtoolset build dependencies @@ -17,16 +17,10 @@ COPY builder.devtoolset/stringop_trunc.patch /stringop_trunc.patch RUN /build_devtoolset.sh devtoolset-10 /dt10 -# Build later version of patchelf that is not so buggy -COPY builder.patchelf/build_patchelf.sh /build_patchelf.sh -COPY apt.conf /etc/apt/ -RUN /build_patchelf.sh - ################################################################################ FROM nvidia/cuda:12.3.1-devel-ubuntu20.04 as devel ################################################################################ COPY --from=builder /dt10 /dt10 -COPY --from=builder /patchelf/patchelf_0.14.3-1_arm64.deb /patchelf/patchelf_0.14.3-1_arm64.deb # Install devtoolset devel dependencies COPY setup.sources.sh /setup.sources.sh @@ -49,7 +43,6 @@ RUN wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --trie RUN groupadd -g 1001 buildslave && useradd -m -u 1001 -g buildslave buildslave RUN mkdir -p /tf/venv RUN chown -R buildslave:buildslave /tf -RUN dpkg -i /patchelf/patchelf_0.14.3-1_arm64.deb # All lines past this point are reset when $CACHEBUSTER is set. We need this # for Python specifically because we install some nightly packages which are diff --git a/ci/official/containers/linux_arm64/apt.conf b/ci/official/containers/linux_arm64/apt.conf index ea7b56091e5fd3..67d9367bdefac4 100644 --- a/ci/official/containers/linux_arm64/apt.conf +++ b/ci/official/containers/linux_arm64/apt.conf @@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -APT::Default-Release "focal"; +APT::Default-Release "jammy"; diff --git a/ci/official/containers/linux_arm64/cuda.packages.txt b/ci/official/containers/linux_arm64/cuda.packages.txt index 657793f1825252..91268178785847 100644 --- a/ci/official/containers/linux_arm64/cuda.packages.txt +++ b/ci/official/containers/linux_arm64/cuda.packages.txt @@ -1,6 +1,8 @@ # CuDNN: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#ubuntu-network-installation libcudnn8=8.9.6.50-1+cuda12.2 libcudnn8-dev=8.9.6.50-1+cuda12.2 +libnvinfer-headers-dev=8.6.1.6-1+cuda12.0 +libnvinfer-headers-plugin-dev=8.6.1.6-1+cuda12.0 # This can be removed once NVIDIA publishes a cuda-12.3.2 Docker image. # For now it ensures that we install at least version 12.3.107 of PTXAS, diff --git a/ci/official/containers/linux_arm64/devel.packages.txt b/ci/official/containers/linux_arm64/devel.packages.txt index a8a9cb442c8b0b..61c7a97f1daf0f 100644 --- a/ci/official/containers/linux_arm64/devel.packages.txt +++ b/ci/official/containers/linux_arm64/devel.packages.txt @@ -3,10 +3,10 @@ autoconf automake build-essential ca-certificates -llvm-17 -clang-17 +llvm-18 +clang-18 clang-format-12 -lld-17 +lld-18 colordiff curl ffmpeg @@ -18,7 +18,7 @@ libcurl3-dev libcurl4-openssl-dev libfreetype6-dev libhdf5-serial-dev -libomp-17-dev +libomp-18-dev libssl-dev libtool libxml2-dev @@ -26,8 +26,8 @@ libxslt1-dev libzmq3-dev mlocate moreutils -openjdk-11-jdk -openjdk-11-jre-headless +openjdk-21-jdk +openjdk-21-jre-headless openssl patchelf pkg-config diff --git a/ci/official/containers/linux_arm64/setup.sources.sh b/ci/official/containers/linux_arm64/setup.sources.sh index ea8dc376f67065..c19c2dd4341614 100755 --- a/ci/official/containers/linux_arm64/setup.sources.sh +++ b/ci/official/containers/linux_arm64/setup.sources.sh @@ -36,10 +36,10 @@ apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key # Set up custom sources cat >/etc/apt/sources.list.d/custom.list <>/etc/apt/sources.list -apt-get update -apt-get -y build-dep patchelf/jammy -apt-get -b source patchelf/jammy +# Set up custom sources +cat >/etc/apt/sources.list.d/custom.list <