From 8c08424b9509abe2e83be5805dd11eec76b21d38 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Sat, 3 Oct 2026 04:05:23 +0000 Subject: [PATCH] Build MG C++ tests in libcuml-tests Build the multi-GPU C++ tests in the libcuml conda recipe so they use the sccache build infrastructure, and remove the separate MG build job. --- .github/workflows/pr.yaml | 18 ---------------- .github/workflows/test.yaml | 18 ---------------- ci/build_mg_cpp_tests.sh | 36 ------------------------------- ci/test_cpp.sh | 5 +++-- conda/recipes/libcuml/recipe.yaml | 4 +++- dependencies.yaml | 17 --------------- 6 files changed, 6 insertions(+), 92 deletions(-) delete mode 100755 ci/build_mg_cpp_tests.sh diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e0e43e59ac..3cc481e8b6 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -18,7 +18,6 @@ jobs: - clang-tidy - conda-cpp-build - conda-cpp-tests - - build-mg-cpp-tests - conda-cpp-checks - conda-python-build - conda-python-tests-singlegpu @@ -348,23 +347,6 @@ jobs: with: build_type: pull-request script: ci/test_cpp.sh - build-mg-cpp-tests: - needs: [conda-cpp-build, changed-files] - permissions: - actions: read - contents: read - id-token: write - packages: read - pull-requests: read - secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main - if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp - with: - build_type: pull-request - node_type: cpu16 - arch: amd64 - container_image: "rapidsai/ci-conda:26.12-latest" - script: ci/build_mg_cpp_tests.sh conda-cpp-checks: needs: conda-cpp-build permissions: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6aa2049a3c..e6fd7e7fcb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -55,24 +55,6 @@ jobs: date: ${{ inputs.date }} script: ci/test_cpp.sh sha: ${{ inputs.sha }} - build-mg-cpp-tests: - permissions: - actions: read - contents: read - id-token: write - packages: read - pull-requests: read - secrets: inherit # zizmor: ignore[secrets-inherit] - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main - with: - build_type: ${{ inputs.build_type }} - branch: ${{ inputs.branch }} - date: ${{ inputs.date }} - sha: ${{ inputs.sha }} - node_type: cpu16 - arch: amd64 - container_image: "rapidsai/ci-conda:26.12-latest" - script: ci/build_mg_cpp_tests.sh conda-python-tests-singlegpu: permissions: actions: read diff --git a/ci/build_mg_cpp_tests.sh b/ci/build_mg_cpp_tests.sh deleted file mode 100755 index c25d8d7656..0000000000 --- a/ci/build_mg_cpp_tests.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# SPDX-License-Identifier: Apache-2.0 - -set -euo pipefail - -# Support invoking build_mg_cpp_tests.sh outside the script directory -cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../ - -. /opt/conda/etc/profile.d/conda.sh - -rapids-logger "Configuring conda strict channel priority" -conda config --set channel_priority strict - -rapids-logger "Downloading artifacts from previous jobs" -CPP_CHANNEL=$(rapids-download-from-github "$(rapids-artifact-name conda_cpp libcuml cuml --cuda "$RAPIDS_CUDA_VERSION")") - -rapids-logger "Generate C++ testing dependencies" -rapids-dependency-file-generator \ - --output conda \ - --file-key build_cpp_mg_tests \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" \ - --prepend-channel "${CPP_CHANNEL}" | tee env.yaml - -rapids-mamba-retry env create --yes -f env.yaml -n test - -# Temporarily allow unbound variables for conda activation. -set +u -conda activate test -set -u - -rapids-print-env - -rapids-logger "Ensure that cpp-mgtests can be built" -# Compile for supported GPU architectures without requiring a GPU on the worker. -./build.sh --ccache cpp-mgtests --allgpuarch diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index e31178f75b..1a0937459a 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 set -euo pipefail @@ -40,7 +40,8 @@ nvidia-smi rapids-logger "Run gtests" export GTEST_OUTPUT=xml:${RAPIDS_TESTS_DIR}/ # Run libcuml gtests from libcuml-tests package -timeout -v 20m ./ci/run_ctests.sh -j9 && EXITCODE=$? || EXITCODE=$?; +# Multi-GPU (MG_*) tests require MPI with multiple GPUs to run +timeout -v 20m ./ci/run_ctests.sh -j9 --exclude-regex '^MG_' && EXITCODE=$? || EXITCODE=$?; rapids-logger "Test script exiting with value: $EXITCODE" exit "${EXITCODE}" diff --git a/conda/recipes/libcuml/recipe.yaml b/conda/recipes/libcuml/recipe.yaml index 97ab31f583..ed0fbd958f 100644 --- a/conda/recipes/libcuml/recipe.yaml +++ b/conda/recipes/libcuml/recipe.yaml @@ -28,7 +28,7 @@ cache: export CXXFLAGS=$(echo $CXXFLAGS | sed -E 's@\-fdebug\-prefix\-map[^ ]*@@g') set +x - ./build.sh -n libcuml prims -v --allgpuarch --build-metrics --incl-cache-stats + ./build.sh -n libcuml prims cpp-mgtests -v --allgpuarch --build-metrics --incl-cache-stats secrets: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY @@ -74,6 +74,7 @@ cache: - libcuvs =${{ minor_version }} - libraft-headers =${{ minor_version }} - librmm =${{ minor_version }} + - openmpi # Required for building cpp-mgtests (multi-GPU tests) - rapids-logger =0.3 - treelite ${{ treelite_version }} - cuda-cudart-dev @@ -160,6 +161,7 @@ outputs: - rapids-logger =0.3 - ${{ pin_subpackage("libcuml", exact=True) }} - cuda-cudart-dev + - openmpi # Required for multi-GPU tests run: - ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }} - ${{ pin_subpackage("libcuml", exact=True) }} diff --git a/dependencies.yaml b/dependencies.yaml index c59429c9f2..ae3fcf247d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -91,17 +91,6 @@ files: - depends_on_libnvforest - test_libcuml - test_cpp - build_cpp_mg_tests: - output: none - includes: - - common_build - - cuda - - cuda_version - - depends_on_libcuvs - - depends_on_libnvforest - - depends_on_libraft_headers - - depends_on_librmm - - build_cpp_mg_tests test_integration_bertopic: output: none includes: @@ -608,12 +597,6 @@ dependencies: - output_types: conda packages: - *cmake_ver - build_cpp_mg_tests: - common: - - output_types: conda - packages: - - openmpi - - ccache test_python: specific: - output_types: [conda, requirements, pyproject]