Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
tag-prefix: lint

clang-tidy:
name: Run clang-tidy
name: Run clang-tidy with CUDA 12.9
needs: ci-configure
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
- tag=lint-clang-tidy-clang-cuda
container:
image: ${{ needs.ci-configure.outputs.docker_registry }}/xgb-ci.gpu_build_rockylinux8:${{ needs.ci-configure.outputs.image_tag }}
image: ${{ needs.ci-configure.outputs.docker_registry }}/xgb-ci.gpu_build_cuda12_rockylinux8:${{ needs.ci-configure.outputs.image_tag }}
credentials:
username: ${{ needs.ci-configure.outputs.docker_username }}
password: ${{ needs.ci-configure.outputs.docker_password }}
Expand Down
135 changes: 68 additions & 67 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,16 @@ jobs:
- uses: dmlc/xgboost-devops/actions/sccache@main
with:
cache-key-prefix: ${{ github.job }}-${{ matrix.build_suite }}
- name: Build and test
run: bash ops/pipeline/build-cpu.sh ${{ matrix.build_suite }}
- name: Test federated learning on CPU
- name: Build run C++ tests on CPU
if: matrix.variant == 'default'
shell: bash -l {0}
run: |
source activate linux_cpu_test
conda install scikit-build-core -y
cd python-package && pip install -e . --no-deps --no-build-isolation && cd -
timeout 600s pytest -v -s -rxXs --durations=0 tests/test_distributed/test_federated
bash ops/pipeline/build-cpu.sh ${{ matrix.build_suite }}
- run: sccache --show-stats
- name: Build and test with sanitizer
if: matrix.variant == 'sanitizer'
run: bash ops/pipeline/build-cpu.sh ${{ matrix.build_suite }}

build-cuda:
name: Build CUDA ${{ matrix.cuda_version }} (${{ matrix.arch }})
Expand All @@ -94,27 +93,27 @@ jobs:
fail-fast: false
matrix:
include:
# CUDA 12
# xgboost-cu12
- cuda_version: 12
arch: aarch64
runner: linux-arm64-cpu
image_repo: xgb-ci.gpu_build_rockylinux8_aarch64
image_repo: xgb-ci.gpu_build_cuda12_rockylinux8_aarch64
use_rmm: 0
- cuda_version: 12
arch: x86_64
runner: linux-amd64-cpu
image_repo: xgb-ci.gpu_build_rockylinux8
image_repo: xgb-ci.gpu_build_cuda12_rockylinux8
use_rmm: 0
# CUDA 13
# Default xgboost package (CUDA 13)
- cuda_version: 13
arch: aarch64
runner: linux-arm64-cpu
image_repo: xgb-ci.gpu_build_cuda13_rockylinux8_aarch64
image_repo: xgb-ci.gpu_build_rockylinux8_aarch64
use_rmm: 0
- cuda_version: 13
arch: x86_64
runner: linux-amd64-cpu
image_repo: xgb-ci.gpu_build_cuda13_rockylinux8
image_repo: xgb-ci.gpu_build_rockylinux8
use_rmm: 0
container:
image: ${{ needs.ci-configure.outputs.docker_registry }}/${{ matrix.image_repo }}:${{ needs.ci-configure.outputs.image_tag }}
Expand Down Expand Up @@ -142,15 +141,15 @@ jobs:
build/testxgboost python-package/dist/*.whl

build-cuda-clang:
name: Build CUDA with clang 21.1.8 (x86_64)
name: Build CUDA 12.9 with clang 22.1.8 (x86_64)
needs: ci-configure
runs-on:
- runs-on=${{ github.run_id }}
- runner=linux-amd64-cpu
- tag=main-build-cuda-clang
- extras=s3-cache
container:
image: ${{ needs.ci-configure.outputs.docker_registry }}/xgb-ci.gpu_build_rockylinux8:${{ needs.ci-configure.outputs.image_tag }}
image: ${{ needs.ci-configure.outputs.docker_registry }}/xgb-ci.gpu_build_cuda12_rockylinux8:${{ needs.ci-configure.outputs.image_tag }}
credentials:
username: ${{ needs.ci-configure.outputs.docker_username }}
password: ${{ needs.ci-configure.outputs.docker_password }}
Expand All @@ -161,8 +160,8 @@ jobs:
submodules: "true"
- uses: dmlc/xgboost-devops/actions/sccache@main
with:
cache-key-prefix: ${{ github.job }}-clang21-cuda12
- run: bash ops/pipeline/build-cuda-clang.sh --clang-version 21.1.8
cache-key-prefix: ${{ github.job }}-clang22-1-8-cuda12
- run: bash ops/pipeline/build-cuda-clang.sh --clang-version 22.1.8
- run: sccache --show-stats

audit-cuda-wheel:
Expand All @@ -176,22 +175,22 @@ jobs:
fail-fast: false
matrix:
include:
# CUDA 12
# xgboost-cu12
- cuda_version: 12
cuda_variant_flag: ""
cuda_variant_flag: "--cuda-variant cuda12"
arch: aarch64
runner: linux-arm64-cpu
- cuda_version: 12
cuda_variant_flag: ""
cuda_variant_flag: "--cuda-variant cuda12"
arch: x86_64
runner: linux-amd64-cpu
# CUDA 13
# Default xgboost package (CUDA 13)
- cuda_version: 13
cuda_variant_flag: "--cuda-variant cuda13"
cuda_variant_flag: ""
arch: aarch64
runner: linux-arm64-cpu
- cuda_version: 13
cuda_variant_flag: "--cuda-variant cuda13"
cuda_variant_flag: ""
arch: x86_64
runner: linux-amd64-cpu
container:
Expand Down Expand Up @@ -225,7 +224,7 @@ jobs:
python-package/dist/*.whl

build-cuda-with-rmm:
name: Build CUDA with RMM
name: Build CUDA 13 with RMM
needs: ci-configure
runs-on:
- runs-on=${{ github.run_id }}
Expand All @@ -243,9 +242,11 @@ jobs:
with:
submodules: "true"
- uses: dmlc/xgboost-devops/actions/sccache@main
with:
cache-key-prefix: ${{ github.job }}-cuda13
- run: >-
bash ops/pipeline/build-cuda.sh
--cuda-version 12
--cuda-version 13
--use-rmm 1
- run: sccache --show-stats
- name: Stash files
Expand Down Expand Up @@ -331,58 +332,58 @@ jobs:
fail-fast: false
matrix:
include:
# CUDA 12 tests
# CUDA 12 artifact tests using the native CUDA 12.9 runtime
# Note: --gpus all provides GPU access; --privileged is not needed for basic GPU tests
- cuda_version: 12
suite: gpu
arch: x86_64
runner: linux-amd64-gpu
image_repo: xgb-ci.gpu
image_repo: xgb-ci.gpu_cuda12
artifact_from: build-cuda12-x86_64
container_options: "--gpus all --privileged"
test_args: ""
- cuda_version: 12
suite: gpu
arch: aarch64
runner: linux-arm64-gpu
image_repo: xgb-ci.gpu_aarch64
image_repo: xgb-ci.gpu_cuda12_aarch64
artifact_from: build-cuda12-aarch64
container_options: "--gpus all --privileged"
test_args: ""
- cuda_version: 12
suite: gpu-rmm
# Default CUDA 13 artifact tests
- cuda_version: 13
suite: gpu
arch: x86_64
runner: linux-amd64-gpu
image_repo: xgb-ci.gpu
artifact_from: build-cuda-with-rmm
artifact_from: build-cuda13-x86_64
container_options: "--gpus all --privileged"
test_args: "--use-rmm-pool --gtest_filter=-*DeathTest*"
- cuda_version: 12
test_args: ""
- cuda_version: 13
suite: gpu
arch: aarch64
runner: linux-arm64-gpu
image_repo: xgb-ci.gpu_aarch64
artifact_from: build-cuda13-aarch64
container_options: "--gpus all --privileged"
test_args: ""
- cuda_version: 13
suite: mgpu
arch: x86_64
runner: linux-amd64-mgpu
image_repo: xgb-ci.gpu
artifact_from: build-cuda12-x86_64
artifact_from: build-cuda13-x86_64
# mgpu needs --shm-size for NCCL shared memory communication
container_options: "--gpus all --shm-size=4g --privileged"
test_args: "--gtest_filter=*MGPU*"
# CUDA 13 tests
- cuda_version: 13
suite: gpu
suite: gpu-rmm
arch: x86_64
runner: linux-amd64-gpu
image_repo: xgb-ci.gpu_build_cuda13_rockylinux8
artifact_from: build-cuda13-x86_64
container_options: "--gpus all --privileged"
test_args: ""
- cuda_version: 13
suite: gpu
arch: aarch64
runner: linux-arm64-gpu
image_repo: xgb-ci.gpu_build_cuda13_rockylinux8_aarch64
artifact_from: build-cuda13-aarch64
image_repo: xgb-ci.gpu
artifact_from: build-cuda-with-rmm
container_options: "--gpus all --privileged"
test_args: ""
test_args: "--use-rmm-pool --gtest_filter=-*DeathTest*"
container:
image: ${{ needs.ci-configure.outputs.docker_registry }}/${{ matrix.image_repo }}:${{ needs.ci-configure.outputs.image_tag }}
credentials:
Expand Down Expand Up @@ -416,41 +417,41 @@ jobs:
fail-fast: false
matrix:
include:
# CUDA 12 tests
# xgboost-cu12 tests using the native CUDA 12.9 runtime
- cuda_version: 12
description: GPU-x86_64-CUDA-12
image_repo: xgb-ci.gpu
image_repo: xgb-ci.gpu_cuda12
suite: gpu
runner: linux-amd64-gpu
artifact_from: audit-cuda12-wheel-x86_64
container_options: "--gpus all --privileged"
- cuda_version: 12
description: Multi-GPU-x86_64-CUDA-12
image_repo: xgb-ci.gpu
suite: mgpu
runner: linux-amd64-mgpu
artifact_from: audit-cuda12-wheel-x86_64
# mgpu needs --shm-size for NCCL shared memory communication
container_options: "--gpus all --shm-size=4g --privileged"
# CUDA 12 aarch64 tests
# xgboost-cu12 aarch64 test using the native CUDA 12.9 runtime
- cuda_version: 12
description: GPU-arm64-CUDA-12
image_repo: xgb-ci.gpu_aarch64
image_repo: xgb-ci.gpu_cuda12_aarch64
suite: gpu-arm64
runner: linux-arm64-gpu
artifact_from: audit-cuda12-wheel-aarch64
container_options: "--gpus all --privileged"
# CUDA 13 tests
# Default xgboost package tests (CUDA 13)
- cuda_version: 13
description: GPU-x86_64-CUDA-13
image_repo: xgb-ci.gpu_build_cuda13_rockylinux8
image_repo: xgb-ci.gpu
suite: gpu
runner: linux-amd64-gpu
artifact_from: audit-cuda13-wheel-x86_64
container_options: "--gpus all --privileged"
- cuda_version: 13
description: Multi-GPU-x86_64-CUDA-13
image_repo: xgb-ci.gpu
suite: mgpu
runner: linux-amd64-mgpu
artifact_from: audit-cuda13-wheel-x86_64
# mgpu needs --shm-size for NCCL shared memory communication
container_options: "--gpus all --shm-size=4g --privileged"
- cuda_version: 13
description: GPU-arm64-CUDA-13
image_repo: xgb-ci.gpu_build_cuda13_rockylinux8_aarch64
image_repo: xgb-ci.gpu_aarch64
suite: gpu-arm64
runner: linux-arm64-gpu
artifact_from: audit-cuda13-wheel-aarch64
Expand All @@ -476,16 +477,16 @@ jobs:
bash ops/pipeline/test-python-wheel.sh
--suite ${{ matrix.suite }}
--cuda-version ${{ matrix.cuda_version }}
# Train a model for cross-platform testing (only for CUDA 12 x86_64)
# Train a model for cross-platform testing (only for default CUDA 13 x86_64)
- name: Train cross-platform test model
if: matrix.cuda_version == 12 && matrix.suite == 'gpu'
if: matrix.cuda_version == 13 && matrix.suite == 'gpu'
shell: bash -l {0}
run: |
source activate gpu_test
python tests/cross-platform/test_cross_platform_model.py \
--train --model-path cross_platform_model.ubj
- name: Upload cross-platform model artifact
if: matrix.cuda_version == 12 && matrix.suite == 'gpu'
if: matrix.cuda_version == 13 && matrix.suite == 'gpu'
uses: actions/upload-artifact@v7.0.1
with:
name: cross-platform-model
Expand All @@ -505,20 +506,20 @@ jobs:
timeout-minutes: 60
strategy:
fail-fast: false
# Uses the wheel from cuda12 for tests.
# Uses the default CUDA 13 wheel for tests.
matrix:
include:
- description: CPU-amd64
image_repo: xgb-ci.cpu
suite: cpu
runner: linux-amd64-cpu
artifact_from: audit-cuda12-wheel-x86_64
artifact_from: audit-cuda13-wheel-x86_64
container_options: "--init"
- description: CPU-arm64
image_repo: xgb-ci.cpu_aarch64
suite: cpu-arm64
runner: linux-arm64-cpu
artifact_from: audit-cuda12-wheel-aarch64
artifact_from: audit-cuda13-wheel-aarch64
container_options: "--init"
container:
image: ${{ needs.ci-configure.outputs.docker_registry }}/${{ matrix.image_repo }}:${{ needs.ci-configure.outputs.image_tag }}
Expand Down
20 changes: 1 addition & 19 deletions doc/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,6 @@ architectures can be found `in this page <https://developer.nvidia.com/cuda-gpus
building XGBoost with NCCL as a shared library, while ``USE_DLOPEN_NCCL`` enables
XGBoost to load NCCL at runtime using ``dlopen``.

Federated Learning
==================

The federated learning plugin requires ``grpc`` and ``protobuf``. To install grpc, refer
to the `installation guide from the gRPC website
<https://grpc.io/docs/languages/cpp/quickstart/>`_. Alternatively, one can use the
``libgrpc`` and the ``protobuf`` package from conda forge if conda is available. After
obtaining the required dependencies, enable the flag: ``-DPLUGIN_FEDERATED=ON`` when
running CMake. Please note that only Linux is supported for the federated plugin.


.. code-block:: bash

cmake -B build -S . -DPLUGIN_FEDERATED=ON -GNinja
cd build && ninja


.. _build_python:

***********************************
Expand Down Expand Up @@ -206,8 +189,7 @@ There are several ways to build and install the package from source:
--config-settings cmake.define.USE_CUDA=ON \
--config-settings cmake.define.USE_NCCL=ON

Common CMake options
(see :ref:`building-the-shared-library` for the full list):
Common CMake options (see :ref:`build_shared_lib` for the full list):

- ``USE_CUDA`` — build with CUDA / GPU acceleration
- ``USE_NCCL`` — build with NCCL for distributed GPU training
Expand Down
Loading
Loading