From 83fe8579541724a1a034ff38dbe4f57a4e90ace4 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 12 Aug 2024 15:11:06 -0700 Subject: [PATCH 01/14] [CI] Use CTK 12.4 --- tests/buildkite/conftest.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/buildkite/conftest.sh b/tests/buildkite/conftest.sh index a8d568a0d241..185b4a356d7e 100755 --- a/tests/buildkite/conftest.sh +++ b/tests/buildkite/conftest.sh @@ -22,10 +22,10 @@ function set_buildkite_env_vars_in_container { set -x -CUDA_VERSION=11.8.0 -NCCL_VERSION=2.16.5-1 -RAPIDS_VERSION=24.06 -DEV_RAPIDS_VERSION=24.08 +CUDA_VERSION=12.4.1 +NCCL_VERSION=2.22.3-1 +RAPIDS_VERSION=24.08 +DEV_RAPIDS_VERSION=24.10 SPARK_VERSION=3.5.1 JDK_VERSION=8 R_VERSION=4.3.2 From 791a949afa378c6294a0a60b87c1c3ad432f7cd5 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 12 Aug 2024 15:19:17 -0700 Subject: [PATCH 02/14] Replace cudatoolkit with cuda-version --- tests/ci_build/Dockerfile.gpu | 2 +- tests/ci_build/Dockerfile.gpu_dev_ver | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ci_build/Dockerfile.gpu b/tests/ci_build/Dockerfile.gpu index f2cfe2ef9051..1a1e29efeb25 100644 --- a/tests/ci_build/Dockerfile.gpu +++ b/tests/ci_build/Dockerfile.gpu @@ -23,7 +23,7 @@ ENV PATH=/opt/miniforge/bin:$PATH RUN \ export NCCL_SHORT_VER=$(echo "$NCCL_VERSION_ARG" | cut -d "-" -f 1) && \ mamba create -y -n gpu_test -c rapidsai -c conda-forge -c nvidia \ - python=3.10 cudf=$RAPIDS_VERSION_ARG* rmm=$RAPIDS_VERSION_ARG* cudatoolkit=$CUDA_VERSION_ARG \ + python=3.10 cudf=$RAPIDS_VERSION_ARG* rmm=$RAPIDS_VERSION_ARG* cuda-version=$CUDA_VERSION_ARG \ "nccl>=${NCCL_SHORT_VER}" \ dask \ dask-cuda=$RAPIDS_VERSION_ARG* dask-cudf=$RAPIDS_VERSION_ARG* cupy \ diff --git a/tests/ci_build/Dockerfile.gpu_dev_ver b/tests/ci_build/Dockerfile.gpu_dev_ver index edf1f0cf1905..ba26265db1a8 100644 --- a/tests/ci_build/Dockerfile.gpu_dev_ver +++ b/tests/ci_build/Dockerfile.gpu_dev_ver @@ -26,7 +26,7 @@ ENV PATH=/opt/miniforge/bin:$PATH RUN \ export NCCL_SHORT_VER=$(echo "$NCCL_VERSION_ARG" | cut -d "-" -f 1) && \ mamba create -y -n gpu_test -c rapidsai-nightly -c conda-forge -c nvidia \ - python=3.10 "cudf=$RAPIDS_VERSION_ARG.*" "rmm=$RAPIDS_VERSION_ARG.*" cudatoolkit=$CUDA_VERSION_ARG \ + python=3.10 "cudf=$RAPIDS_VERSION_ARG.*" "rmm=$RAPIDS_VERSION_ARG.*" cuda-version=$CUDA_VERSION_ARG \ "nccl>=${NCCL_SHORT_VER}" \ dask \ "dask-cuda=$RAPIDS_VERSION_ARG.*" "dask-cudf=$RAPIDS_VERSION_ARG.*" cupy \ From effa96c89c3b602d1a3d5c2dcd2861dfe1b9edd8 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 12 Aug 2024 16:01:24 -0700 Subject: [PATCH 03/14] Use short CUDA version for cuda-version Conda pkg --- tests/ci_build/Dockerfile.gpu | 3 ++- tests/ci_build/Dockerfile.gpu_dev_ver | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ci_build/Dockerfile.gpu b/tests/ci_build/Dockerfile.gpu index 1a1e29efeb25..f8338f6ffcf0 100644 --- a/tests/ci_build/Dockerfile.gpu +++ b/tests/ci_build/Dockerfile.gpu @@ -22,8 +22,9 @@ ENV PATH=/opt/miniforge/bin:$PATH # Create new Conda environment with cuDF, Dask, and cuPy RUN \ export NCCL_SHORT_VER=$(echo "$NCCL_VERSION_ARG" | cut -d "-" -f 1) && \ + export CUDA_SHORT_VER=$(echo "$CUDA_VERSION_ARG" | grep -o -E '[0-9]+\.[0-9]') && \ mamba create -y -n gpu_test -c rapidsai -c conda-forge -c nvidia \ - python=3.10 cudf=$RAPIDS_VERSION_ARG* rmm=$RAPIDS_VERSION_ARG* cuda-version=$CUDA_VERSION_ARG \ + python=3.10 cudf=$RAPIDS_VERSION_ARG* rmm=$RAPIDS_VERSION_ARG* cuda-version=$CUDA_SHORT_VER \ "nccl>=${NCCL_SHORT_VER}" \ dask \ dask-cuda=$RAPIDS_VERSION_ARG* dask-cudf=$RAPIDS_VERSION_ARG* cupy \ diff --git a/tests/ci_build/Dockerfile.gpu_dev_ver b/tests/ci_build/Dockerfile.gpu_dev_ver index ba26265db1a8..d23c5e83c2c7 100644 --- a/tests/ci_build/Dockerfile.gpu_dev_ver +++ b/tests/ci_build/Dockerfile.gpu_dev_ver @@ -25,8 +25,9 @@ ENV PATH=/opt/miniforge/bin:$PATH # Create new Conda environment with dev versions of cuDF, Dask, and cuPy RUN \ export NCCL_SHORT_VER=$(echo "$NCCL_VERSION_ARG" | cut -d "-" -f 1) && \ + export CUDA_SHORT_VER=$(echo "$CUDA_VERSION_ARG" | grep -o -E '[0-9]+\.[0-9]') && \ mamba create -y -n gpu_test -c rapidsai-nightly -c conda-forge -c nvidia \ - python=3.10 "cudf=$RAPIDS_VERSION_ARG.*" "rmm=$RAPIDS_VERSION_ARG.*" cuda-version=$CUDA_VERSION_ARG \ + python=3.10 "cudf=$RAPIDS_VERSION_ARG.*" "rmm=$RAPIDS_VERSION_ARG.*" cuda-version=$CUDA_SHORT_VER \ "nccl>=${NCCL_SHORT_VER}" \ dask \ "dask-cuda=$RAPIDS_VERSION_ARG.*" "dask-cudf=$RAPIDS_VERSION_ARG.*" cupy \ From a3bef702c4a053d5a12128229bd768f6a68cd3fd Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 12 Aug 2024 16:33:03 -0700 Subject: [PATCH 04/14] Upgrade gRPC to 1.65.4 --- tests/ci_build/Dockerfile.cpu | 2 +- tests/ci_build/Dockerfile.gpu_build_rockylinux8 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index c81697ff67c4..966cb62e609a 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -24,7 +24,7 @@ ENV GOSU_VERSION=1.10 ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ # Install gRPC -RUN git clone -b v1.49.1 https://github.com/grpc/grpc.git \ +RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 --shallow-submodules && \ pushd grpc && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ diff --git a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 index 5f8a5bfec2df..93a47501a25a 100644 --- a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 +++ b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 @@ -49,7 +49,7 @@ RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git - rm -rf rmm # Install gRPC -RUN git clone -b v1.49.1 https://github.com/grpc/grpc.git \ +RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 && \ pushd grpc && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ From e1e1fe5eea9c12031be3b642ae08ce0342c03ba8 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Tue, 13 Aug 2024 11:30:19 -0700 Subject: [PATCH 05/14] Use gRPC 1.62.2 --- tests/ci_build/Dockerfile.cpu | 2 +- tests/ci_build/Dockerfile.gpu_build_rockylinux8 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index 966cb62e609a..8cc4971a0888 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -24,7 +24,7 @@ ENV GOSU_VERSION=1.10 ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ # Install gRPC -RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ +RUN git clone -b v1.62.2 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 --shallow-submodules && \ pushd grpc && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ diff --git a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 index 93a47501a25a..dc09aba95a53 100644 --- a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 +++ b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 @@ -49,7 +49,7 @@ RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git - rm -rf rmm # Install gRPC -RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ +RUN git clone -b v1.62.2 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 && \ pushd grpc && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ From ee2799d3b43db4ad7d83816c9d3627b3b54d4ad3 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Tue, 13 Aug 2024 17:09:19 -0700 Subject: [PATCH 06/14] Use latest gRPC --- tests/ci_build/Dockerfile.cpu | 2 +- tests/ci_build/Dockerfile.gpu | 2 +- tests/ci_build/Dockerfile.gpu_build_rockylinux8 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index 8cc4971a0888..966cb62e609a 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -24,7 +24,7 @@ ENV GOSU_VERSION=1.10 ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ # Install gRPC -RUN git clone -b v1.62.2 https://github.com/grpc/grpc.git \ +RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 --shallow-submodules && \ pushd grpc && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ diff --git a/tests/ci_build/Dockerfile.gpu b/tests/ci_build/Dockerfile.gpu index f8338f6ffcf0..884fc924cba8 100644 --- a/tests/ci_build/Dockerfile.gpu +++ b/tests/ci_build/Dockerfile.gpu @@ -6,7 +6,7 @@ ARG NCCL_VERSION_ARG # Environment ENV DEBIAN_FRONTEND=noninteractive -SHELL ["/bin/bash", "-c"] # Use Bash as shell +SHELL ["/bin/bash", "-c"] # Install all basic requirements RUN \ diff --git a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 index dc09aba95a53..93a47501a25a 100644 --- a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 +++ b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 @@ -49,7 +49,7 @@ RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git - rm -rf rmm # Install gRPC -RUN git clone -b v1.62.2 https://github.com/grpc/grpc.git \ +RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 && \ pushd grpc && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ From f2c4ffb3d8abd0824644a8e37aa7a1dfce4f1f5f Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Tue, 13 Aug 2024 17:40:06 -0700 Subject: [PATCH 07/14] Patch Abseil --- tests/ci_build/Dockerfile.cpu | 5 +++++ tests/ci_build/Dockerfile.gpu_build_rockylinux8 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index 966cb62e609a..efd2edd2db56 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -24,9 +24,14 @@ ENV GOSU_VERSION=1.10 ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ # Install gRPC +# Patch Abseil to apply https://github.com/abseil/abseil-cpp/issues/1629 RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 --shallow-submodules && \ pushd grpc && \ + pushd third_party/abseil-cpp && \ + git fetch origin master && \ + git cherry-pick -n cfde5f74e276049727f9556f13473a59fe77d9eb && \ + popd && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ cmake --build build --target install && \ popd && \ diff --git a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 index 93a47501a25a..801f447cd80e 100644 --- a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 +++ b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 @@ -49,9 +49,14 @@ RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git - rm -rf rmm # Install gRPC +# Patch Abseil to apply https://github.com/abseil/abseil-cpp/issues/1629 RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ --recurse-submodules --depth 1 && \ pushd grpc && \ + pushd third_party/abseil-cpp && \ + git fetch origin master && \ + git cherry-pick -n cfde5f74e276049727f9556f13473a59fe77d9eb && \ + popd && \ cmake -S . -B build -GNinja -DCMAKE_INSTALL_PREFIX=/opt/grpc -DCMAKE_CXX_VISIBILITY_PRESET=hidden && \ cmake --build build --target install && \ popd && \ From 0ad01d0de639d9f7d0cbe58e8359db47b50f2759 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Tue, 13 Aug 2024 18:17:25 -0700 Subject: [PATCH 08/14] Fix bad object error --- tests/ci_build/Dockerfile.cpu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ci_build/Dockerfile.cpu b/tests/ci_build/Dockerfile.cpu index efd2edd2db56..22db93572207 100644 --- a/tests/ci_build/Dockerfile.cpu +++ b/tests/ci_build/Dockerfile.cpu @@ -2,7 +2,7 @@ FROM ubuntu:22.04 # Environment ENV DEBIAN_FRONTEND=noninteractive -SHELL ["/bin/bash", "-c"] # Use Bash as shell +SHELL ["/bin/bash", "-c"] # Install all basic requirements RUN \ @@ -26,7 +26,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ # Install gRPC # Patch Abseil to apply https://github.com/abseil/abseil-cpp/issues/1629 RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ - --recurse-submodules --depth 1 --shallow-submodules && \ + --recurse-submodules --depth 1 && \ pushd grpc && \ pushd third_party/abseil-cpp && \ git fetch origin master && \ From d650b9c2500015ee21f4d2523951854a1c09f7fe Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Tue, 13 Aug 2024 18:54:53 -0700 Subject: [PATCH 09/14] Use clang-tidy 18 --- .clang-tidy | 2 +- tests/ci_build/Dockerfile.clang_tidy | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index c01182eb4d88..1194b8b7c104 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -Checks: 'modernize-*,-modernize-use-nodiscard,-modernize-concat-nested-namespaces,-modernize-make-*,-modernize-use-auto,-modernize-raw-string-literal,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,google-*,-google-default-arguments,-clang-diagnostic-#pragma-messages,readability-identifier-naming' +Checks: 'modernize-*,-modernize-use-nodiscard,-modernize-concat-nested-namespaces,-modernize-make-*,-modernize-use-auto,-modernize-type-traits,-modernize-raw-string-literal,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,google-*,-google-default-arguments,-clang-diagnostic-#pragma-messages,readability-identifier-naming' CheckOptions: - { key: readability-identifier-naming.ClassCase, value: CamelCase } - { key: readability-identifier-naming.StructCase, value: CamelCase } diff --git a/tests/ci_build/Dockerfile.clang_tidy b/tests/ci_build/Dockerfile.clang_tidy index 941e2a852b92..088804784a96 100644 --- a/tests/ci_build/Dockerfile.clang_tidy +++ b/tests/ci_build/Dockerfile.clang_tidy @@ -11,13 +11,16 @@ RUN \ apt-get update && \ apt-get install -y wget git python3 python3-pip software-properties-common \ apt-transport-https ca-certificates gnupg-agent && \ - apt-get install -y llvm-15 clang-tidy-15 clang-15 libomp-15-dev && \ + apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" && \ + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \ + apt-get update && \ + apt-get install -y llvm-18 clang-tidy-18 clang-18 libomp-18-dev && \ apt-get install -y cmake # Set default clang-tidy version RUN \ - update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100 && \ - update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 + update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 100 && \ + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 RUN \ apt-get install libgtest-dev libgmock-dev -y From 2c3bb62cd005d35b41ef3b33b7b4dc80137f2187 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 14 Aug 2024 10:26:36 -0700 Subject: [PATCH 10/14] Use clang-tidy 19 --- tests/ci_build/Dockerfile.clang_tidy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ci_build/Dockerfile.clang_tidy b/tests/ci_build/Dockerfile.clang_tidy index 088804784a96..bbe30cc90cdb 100644 --- a/tests/ci_build/Dockerfile.clang_tidy +++ b/tests/ci_build/Dockerfile.clang_tidy @@ -11,16 +11,16 @@ RUN \ apt-get update && \ apt-get install -y wget git python3 python3-pip software-properties-common \ apt-transport-https ca-certificates gnupg-agent && \ - apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" && \ + apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" && \ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc && \ apt-get update && \ - apt-get install -y llvm-18 clang-tidy-18 clang-18 libomp-18-dev && \ + apt-get install -y llvm-19 clang-tidy-19 clang-19 libomp-19-dev && \ apt-get install -y cmake # Set default clang-tidy version RUN \ - update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-18 100 && \ - update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 + update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 100 && \ + update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 100 RUN \ apt-get install libgtest-dev libgmock-dev -y From 738533b0d7c9da6a23e29b3bd986fb6062cc485d Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 14 Aug 2024 13:49:06 -0700 Subject: [PATCH 11/14] Fix clang-tidy errors --- include/xgboost/collective/socket.h | 9 +++++++++ src/common/cuda_pinned_allocator.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/xgboost/collective/socket.h b/include/xgboost/collective/socket.h index bf5fffdaf155..2a4eb7315b12 100644 --- a/include/xgboost/collective/socket.h +++ b/include/xgboost/collective/socket.h @@ -58,6 +58,13 @@ using ssize_t = int; #define HOST_NAME_MAX 256 // macos #endif +// Disable BlockInCriticalSection check from clang-tidy +// Clang-tidy generates a false positive warning because +// it erroreously assumes that all recv() calls are blocking. +// Here, we will trust users to set NonBlocking() flag to +// the socket before using Recv() in a critical section. +// NOLINTBEGIN(clang-analyzer-unix.BlockInCriticalSection) + namespace xgboost { #if defined(xgboost_IS_MINGW) @@ -828,4 +835,6 @@ Result INetNToP(H const &host, std::string *p_out) { } // namespace collective } // namespace xgboost +// NOLINTEND(clang-analyzer-unix.BlockInCriticalSection) + #undef xgboost_CHECK_SYS_CALL diff --git a/src/common/cuda_pinned_allocator.h b/src/common/cuda_pinned_allocator.h index 6fe1757fd369..7ae70eaa40d1 100644 --- a/src/common/cuda_pinned_allocator.h +++ b/src/common/cuda_pinned_allocator.h @@ -23,7 +23,7 @@ namespace cuda { // // \see https://en.cppreference.com/w/cpp/memory/allocator template -class pinned_allocator; +class pinned_allocator; // NOLINT(readability-identifier-naming) template <> class pinned_allocator { From 00cefc0a16210f63205012aac70efb839a6fc689 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 21 Aug 2024 15:18:20 -0700 Subject: [PATCH 12/14] Clean up merge --- .clang-tidy | 2 +- include/xgboost/collective/socket.h | 9 --------- src/common/cuda_pinned_allocator.h | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 1194b8b7c104..c01182eb4d88 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,4 @@ -Checks: 'modernize-*,-modernize-use-nodiscard,-modernize-concat-nested-namespaces,-modernize-make-*,-modernize-use-auto,-modernize-type-traits,-modernize-raw-string-literal,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,google-*,-google-default-arguments,-clang-diagnostic-#pragma-messages,readability-identifier-naming' +Checks: 'modernize-*,-modernize-use-nodiscard,-modernize-concat-nested-namespaces,-modernize-make-*,-modernize-use-auto,-modernize-raw-string-literal,-modernize-avoid-c-arrays,-modernize-use-trailing-return-type,google-*,-google-default-arguments,-clang-diagnostic-#pragma-messages,readability-identifier-naming' CheckOptions: - { key: readability-identifier-naming.ClassCase, value: CamelCase } - { key: readability-identifier-naming.StructCase, value: CamelCase } diff --git a/include/xgboost/collective/socket.h b/include/xgboost/collective/socket.h index aba1ba898b9d..a025edddd409 100644 --- a/include/xgboost/collective/socket.h +++ b/include/xgboost/collective/socket.h @@ -58,13 +58,6 @@ using ssize_t = int; #define HOST_NAME_MAX 256 // macos #endif -// Disable BlockInCriticalSection check from clang-tidy -// Clang-tidy generates a false positive warning because -// it erroreously assumes that all recv() calls are blocking. -// Here, we will trust users to set NonBlocking() flag to -// the socket before using Recv() in a critical section. -// NOLINTBEGIN(clang-analyzer-unix.BlockInCriticalSection) - namespace xgboost { #if defined(xgboost_IS_MINGW) @@ -838,6 +831,4 @@ Result INetNToP(H const &host, std::string *p_out) { } // namespace collective } // namespace xgboost -// NOLINTEND(clang-analyzer-unix.BlockInCriticalSection) - #undef xgboost_CHECK_SYS_CALL diff --git a/src/common/cuda_pinned_allocator.h b/src/common/cuda_pinned_allocator.h index 8963a25e0148..c53ae4517c33 100644 --- a/src/common/cuda_pinned_allocator.h +++ b/src/common/cuda_pinned_allocator.h @@ -23,7 +23,6 @@ namespace xgboost::common::cuda_impl { // \see https://en.cppreference.com/w/cpp/memory/allocator template - struct PinnedAllocPolicy { using pointer = T*; // NOLINT: The type returned by address() / allocate() using const_pointer = const T*; // NOLINT: The type returned by address() From 997d2b1a99e1a6545859ada11ea6b13d47f8e949 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 21 Aug 2024 16:20:30 -0700 Subject: [PATCH 13/14] Patch CCCL 2.5.0 that comes with RMM --- .../ci_build/Dockerfile.gpu_build_rockylinux8 | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 index 801f447cd80e..8869fb468e12 100644 --- a/tests/ci_build/Dockerfile.gpu_build_rockylinux8 +++ b/tests/ci_build/Dockerfile.gpu_build_rockylinux8 @@ -36,18 +36,6 @@ ENV CUDAHOSTCXX=/opt/rh/gcc-toolset-10/root/usr/bin/c++ ENV GOSU_VERSION=1.10 -# Install RMM (Patch out -Werror) -RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git --recurse-submodules --depth 1 && \ - pushd rmm && \ - find . -name CMakeLists.txt -print0 | xargs -0 sed -i 's/-Werror//g' && \ - mkdir build && \ - pushd build && \ - cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/opt/rmm -DCUDA_STATIC_RUNTIME=ON && \ - cmake --build . --target install && \ - popd && \ - popd && \ - rm -rf rmm - # Install gRPC # Patch Abseil to apply https://github.com/abseil/abseil-cpp/issues/1629 RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ @@ -62,6 +50,24 @@ RUN git clone -b v1.65.4 https://github.com/grpc/grpc.git \ popd && \ rm -rf grpc +# Install RMM +# Patch out -Werror +# Patch CCCL 2.5.0 to apply https://github.com/NVIDIA/cccl/pull/1957 +RUN git clone -b v${RAPIDS_VERSION_ARG}.00 https://github.com/rapidsai/rmm.git --recurse-submodules --depth 1 && \ + pushd rmm && \ + find . -name CMakeLists.txt -print0 | xargs -0 sed -i 's/-Werror//g' && \ + mkdir build && \ + pushd build && \ + cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/opt/rmm -DCUDA_STATIC_RUNTIME=ON && \ + pushd _deps/cccl-src/ && \ + git fetch origin main && \ + git cherry-pick -n 9fcb32c228865f21f2b002b29d38a06b4c6fbd73 && \ + popd && \ + cmake --build . --target install && \ + popd && \ + popd && \ + rm -rf rmm + # Install lightweight sudo (not bound to TTY) RUN set -ex; \ wget -nv -nc -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ From 1bb2449b8485dd09eef26b2c979b63c352779692 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Wed, 21 Aug 2024 17:34:50 -0700 Subject: [PATCH 14/14] Invoke cuPy JIT ahead of time to avoid timeout --- tests/ci_build/test_python.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ci_build/test_python.sh b/tests/ci_build/test_python.sh index dd43f43a9ce6..a1a023046e5b 100755 --- a/tests/ci_build/test_python.sh +++ b/tests/ci_build/test_python.sh @@ -56,6 +56,7 @@ case "$suite" in set -x install_xgboost setup_pyspark_envs + python -c 'from cupy.cuda import jitify; jitify._init_module()' pytest -v -s -rxXs --fulltrace --durations=0 -m "not mgpu" ${args} tests/python-gpu unset_pyspark_envs uninstall_xgboost @@ -67,6 +68,7 @@ case "$suite" in set -x install_xgboost setup_pyspark_envs + python -c 'from cupy.cuda import jitify; jitify._init_module()' pytest -v -s -rxXs --fulltrace --durations=0 -m "mgpu" ${args} tests/python-gpu pytest -v -s -rxXs --fulltrace --durations=0 -m "mgpu" ${args} tests/test_distributed/test_gpu_with_dask pytest -v -s -rxXs --fulltrace --durations=0 -m "mgpu" ${args} tests/test_distributed/test_gpu_with_spark