Skip to content
Prev Previous commit
[CI] Test cross-thread cuvsRMMHostFree before and after the fix; skip…
… rust-build this round
  • Loading branch information
bdice committed Oct 11, 2026
commit d9e5779a824b623c4a15fe18985044fdfa3470d4
16 changes: 15 additions & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
needs:
- build-details
- conda-cpp-build
- rust-build
- rust-old-crate
- c-host-alloc
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main
permissions:
contents: read
Expand All @@ -39,6 +39,7 @@ jobs:
script: ci/build_cpp.sh
matrix_filter: 'map(select(.ARCH == "amd64")) | sort_by(.CUDA_VER | split(".") | map(tonumber)) | [last]'
rust-build:
if: false
needs: [conda-cpp-build]
permissions:
actions: read
Expand All @@ -64,3 +65,16 @@ jobs:
build_type: pull-request
matrix_filter: 'map(select(.ARCH == "amd64")) | sort_by(.CUDA_VER | split(".") | map(tonumber)) | [last] | [range(2) as $i | .[] | . + {COPY: $i, GPU: (if $i < 1 then "rtxpro6000" else "l4" end)}]'
script: "ci/stress_rust_old.sh"
c-host-alloc:
needs: [conda-cpp-build]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
uses: ./.github/workflows/matrix-job.yaml
with:
build_type: pull-request
matrix_filter: 'map(select(.ARCH == "amd64")) | sort_by(.CUDA_VER | split(".") | map(tonumber)) | [last]'
script: "ci/test_c_host_alloc.sh"
50 changes: 50 additions & 0 deletions ci/test_c_host_alloc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# CI-only: run c/tests/core/host_alloc.cpp (pinned host buffer freed on another thread) against
# the nightly libcuvs (without the fix) and against this PR's libcuvs (with the fix).
set -uo pipefail

. /opt/conda/etc/profile.d/conda.sh
CUDA_MM=${RAPIDS_CUDA_VERSION%.*}
CPP_CHANNEL=$(rapids-download-from-github "$(rapids-artifact-name conda_cpp libcuvs cuvs --cuda "$RAPIDS_CUDA_VERSION")")
nvidia-smi || true

build_and_run() {
local label=$1
local cxx
cxx=$(ls "${CONDA_PREFIX}"/bin/*-linux-gnu-g++ | head -1)
"${cxx}" -std=c++20 -O1 -g c/tests/core/host_alloc.cpp -o "host_alloc_${label}" \
-I"${CONDA_PREFIX}/include" -I"${CONDA_PREFIX}/targets/x86_64-linux/include" \
-L"${CONDA_PREFIX}/lib" -Wl,-rpath,"${CONDA_PREFIX}/lib" \
-lcuvs_c -lgtest -lgtest_main -pthread || { echo "BUILD FAILED (${label})"; return; }
local crashes=0 fails=0
for i in $(seq 1 10); do
"./host_alloc_${label}" > "run_${label}.log" 2>&1
rc=$?
[ "${i}" -eq 1 ] && tail -25 "run_${label}.log"
if [ "${rc}" -ge 128 ]; then crashes=$((crashes + 1)); elif [ "${rc}" -ne 0 ]; then fails=$((fails + 1)); fi
echo "${label} run ${i}: rc=${rc}"
done
echo "RESULT ${label}: 10 runs, ${crashes} crashes, ${fails} other failures"
}

PKGS=("cuda-version=${CUDA_MM}" cuda-cudart-dev dlpack gtest "gxx_linux-64=14.*" "sysroot_linux-64=2.28")

rapids-logger "Baseline: nightly libcuvs without the fix"
rapids-mamba-retry create -y -n cbase -c rapidsai-nightly -c conda-forge "libcuvs=26.12" "${PKGS[@]}"
set +u; conda activate cbase; set -u
conda list | grep -E "^libcuvs |^librmm "
build_and_run baseline
set +u; conda deactivate; set -u

rapids-logger "Fixed: this PR's libcuvs"
rapids-mamba-retry create -y -n cfix -c "${CPP_CHANNEL}" -c rapidsai-nightly -c conda-forge \
"libcuvs=26.12" "libcuvs-tests=26.12" "${PKGS[@]}"
set +u; conda activate cfix; set -u
conda list | grep -E "^libcuvs |^libcuvs-tests |^librmm "
build_and_run fixed
GT="${CONDA_PREFIX}/bin/gtests/libcuvs/cuvs_c_host_alloc_test"
ls -la "${GT}" || true
"${GT}" --gtest_repeat=100 2>&1 | tail -15
echo "installed cuvs_c_host_alloc_test rc=${PIPESTATUS[0]}"
Loading