Sparse-checkout from NVIDIA/cccl main branch to complete cccl_upstream: Added: - python/cuda_cccl/ (226 files) — Python bindings for device-level algorithms Critical for muh toolchain: cuda.compute.reduce_into, scan, radix_sort, etc. Includes 204 .py files with full test coverage for all 27 algorithms - ci/ (163 files) — Build/test infrastructure build_cub.sh, test_cub.sh, build_and_test_targets.sh, matrix.yaml Directly maps to our [INFRA-CI] and [INFRA-BUILD] items - .agent/skills/ (7 files) — NVIDIA's own agent skills for CCCL cccl-style/SKILL.md, cccl-test/SKILL.md, sass-diff/SKILL.md - docs/ (491 files) — Official CCCL documentation CI references, CMake guides, Python compute docs, libcudacxx PTX docs - test/ (12 files) — Top-level integration tests (cuda_smoke, stdpar) - Root configs: .clang-format, .clang-tidy, CONTRIBUTING.md, pyproject.toml - CLAUDE.md symlink → AGENTS.md (NVIDIA's standard) cccl_upstream now mirrors full NVIDIA/cccl structure: Before: 42M (cub + thrust + libcudacxx + cudax + c + examples + benchmarks) After: 53M (+python +ci +docs +.agent +test +configs) This completes the CCCL base needed for: - [muh-bench] items: ci/util/build_and_test_targets.sh for targeted builds - [CCCL-verify] items: python/cuda_cccl/tests/ as reference implementations - [CCCL-test] items: ci/test_cub.sh, ci/test_thrust.sh - Agent workflow: .agent/skills/ for consistent style and test patterns
94 lines
3.1 KiB
Bash
Executable File
94 lines
3.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
if [[ -z "${GITHUB_ACTIONS:-}" ]]; then
|
|
echo "This script must be run in a GitHub Actions environment." >&2
|
|
exit 1
|
|
fi
|
|
|
|
ci_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
readonly ci_dir
|
|
repo_root="$(cd "${ci_dir}/.." && pwd)"
|
|
readonly repo_root
|
|
|
|
cd "$repo_root"
|
|
|
|
if ! ci/util/workflow/has_consumers.sh; then
|
|
echo "No consumers found for this job. Exiting." >&2
|
|
exit 0
|
|
fi
|
|
|
|
# Figure out which artifact needs to be built:
|
|
consumers=$(ci/util/workflow/get_consumers.sh)
|
|
preset_variants=()
|
|
if grep -q "TestGPU" <<< "$consumers"; then
|
|
preset_variants+=("test_gpu")
|
|
fi
|
|
if grep -q "TestCPU" <<< "$consumers"; then
|
|
preset_variants+=("test_cpu")
|
|
fi
|
|
|
|
artifact_prefix="z_thrust-test-artifacts-${DEVCONTAINER_NAME:?}-${JOB_ID:?}"
|
|
|
|
# BUILD_INFIX is undefined on windows CI
|
|
build_dir_regex="build${CCCL_BUILD_INFIX:+/$CCCL_BUILD_INFIX}/thrust[^/]*"
|
|
|
|
# Just collect the minimum set of files needed for running each ctest preset:
|
|
for preset_variant in "${preset_variants[@]}"; do
|
|
# Shared across all presets:
|
|
ci/util/artifacts/stage.sh "$artifact_prefix-$preset_variant" \
|
|
"$build_dir_regex/build\.ninja$" \
|
|
"$build_dir_regex/.*rules\.ninja$" \
|
|
"$build_dir_regex/CMakeCache\.txt$" \
|
|
"$build_dir_regex/.*VerifyGlobs\.cmake$" \
|
|
"$build_dir_regex/.*CTestTestfile\.cmake$" \
|
|
> /dev/null
|
|
done
|
|
|
|
if [[ " ${preset_variants[*]} " == *" test_cpu "* ]]; then
|
|
# Initially add all binaries, then remove all containing 'cuda' in the name:
|
|
ci/util/artifacts/stage.sh \
|
|
"$artifact_prefix-test_cpu" \
|
|
"$build_dir_regex/bin/.*" > /dev/null
|
|
ci/util/artifacts/unstage.sh \
|
|
"$artifact_prefix-test_cpu" \
|
|
"$build_dir_regex/bin/thrust\..*\.cuda\..*" > /dev/null
|
|
|
|
ci/util/artifacts/stage.sh \
|
|
"$artifact_prefix-test_cpu" \
|
|
"$build_dir_regex/lib/.*\.test\.framework\..*" > /dev/null
|
|
ci/util/artifacts/unstage.sh \
|
|
"$artifact_prefix-test_cpu" \
|
|
"$build_dir_regex/lib/.*\.cuda\.test\.framework\..*" > /dev/null
|
|
|
|
# Windows builds generate binaries for the header tests, remove these:
|
|
ci/util/artifacts/unstage.sh \
|
|
"$artifact_prefix-test_cpu" \
|
|
"$build_dir_regex/.*\.headers\..*" > /dev/null || :
|
|
|
|
ci/util/artifacts/upload_stage_packed.sh "$artifact_prefix-test_cpu"
|
|
fi
|
|
|
|
if [[ " ${preset_variants[*]} " == *" test_gpu "* ]]; then
|
|
# Only binaries containing 'cuda':
|
|
ci/util/artifacts/stage.sh \
|
|
"$artifact_prefix-test_gpu" \
|
|
"$build_dir_regex/bin/thrust\..*\.cuda\..*" > /dev/null
|
|
ci/util/artifacts/stage.sh \
|
|
"$artifact_prefix-test_gpu" \
|
|
"$build_dir_regex/lib/.*\.cuda\.test\.framework\..*" > /dev/null
|
|
# The CUDA runtime smoke binary is invoked explicitly from build_common.sh
|
|
ci/util/artifacts/stage.sh \
|
|
"$artifact_prefix-test_gpu" \
|
|
"$build_dir_regex/bin/cccl\.test\.cuda_runtime_smoke$" > /dev/null
|
|
|
|
# Windows builds generate binaries for the header tests, remove these:
|
|
ci/util/artifacts/unstage.sh \
|
|
"$artifact_prefix-test_gpu" \
|
|
"$build_dir_regex/.*\.headers\..*" > /dev/null || :
|
|
|
|
|
|
ci/util/artifacts/upload_stage_packed.sh "$artifact_prefix-test_gpu"
|
|
fi
|