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
112 lines
2.2 KiB
Bash
Executable File
112 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
NO_LID=false
|
|
LID0=false
|
|
LID1=false
|
|
LID2=false
|
|
ARTIFACT_TAGS=()
|
|
|
|
ci_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
new_args="$("${ci_dir}/util/extract_switches.sh" \
|
|
-no-lid \
|
|
-lid0 \
|
|
-lid1 \
|
|
-lid2 \
|
|
-- "$@")"
|
|
|
|
declare -a new_args="(${new_args})"
|
|
set -- "${new_args[@]}"
|
|
while true; do
|
|
case "$1" in
|
|
-no-lid)
|
|
ARTIFACT_TAGS+=("no_lid")
|
|
NO_LID=true
|
|
shift
|
|
;;
|
|
-lid0)
|
|
ARTIFACT_TAGS+=("lid_0")
|
|
LID0=true
|
|
shift
|
|
;;
|
|
-lid1)
|
|
ARTIFACT_TAGS+=("lid_1")
|
|
LID1=true
|
|
shift
|
|
;;
|
|
-lid2)
|
|
ARTIFACT_TAGS+=("lid_2")
|
|
LID2=true
|
|
shift
|
|
;;
|
|
--)
|
|
shift
|
|
break
|
|
;;
|
|
*)
|
|
echo "Unknown argument: $1"
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# shellcheck source=ci/build_common.sh
|
|
source "${ci_dir}/build_common.sh"
|
|
|
|
print_environment_details
|
|
|
|
ENABLE_CCCL_BENCHMARKS="false"
|
|
ENABLE_CUB_RDC="false"
|
|
|
|
if [[ "$CUDA_COMPILER" == *nvcc* ]]; then
|
|
ENABLE_CUB_RDC="true"
|
|
NVCC_VERSION=$($CUDA_COMPILER --version | grep release | awk '{print $6}' | cut -c2-)
|
|
if [[ -n "${DISABLE_CUB_BENCHMARKS}" ]]; then
|
|
echo "Benchmarks have been forcefully disabled."
|
|
else
|
|
ENABLE_CCCL_BENCHMARKS="true"
|
|
echo "nvcc version is $NVCC_VERSION. Building CUB benchmarks."
|
|
fi
|
|
else
|
|
echo "Not building with NVCC, disabling RDC and benchmarks."
|
|
fi
|
|
|
|
if [[ "$HOST_COMPILER" == *icpc* || "$HOST_COMPILER" == *nvhpc* ]]; then
|
|
ENABLE_CCCL_BENCHMARKS="false"
|
|
fi
|
|
|
|
PRESET="cub"
|
|
if $NO_LID; then
|
|
PRESET="cub-nolid"
|
|
elif $LID0; then
|
|
PRESET="cub-lid0"
|
|
elif $LID1; then
|
|
PRESET="cub-lid1"
|
|
elif $LID2; then
|
|
PRESET="cub-lid2"
|
|
fi
|
|
|
|
CMAKE_OPTIONS=(
|
|
"-DCMAKE_CXX_STANDARD=$CXX_STANDARD"
|
|
"-DCMAKE_CUDA_STANDARD=$CXX_STANDARD"
|
|
"-DCCCL_ENABLE_BENCHMARKS=$ENABLE_CCCL_BENCHMARKS"
|
|
"-DCUB_ENABLE_RDC_TESTS=$ENABLE_CUB_RDC"
|
|
)
|
|
|
|
configure_and_build_preset "CUB" "$PRESET" "${CMAKE_OPTIONS[@]}"
|
|
|
|
# Create test artifacts:
|
|
if [[ -n "${GITHUB_ACTIONS:-}" ]]; then
|
|
if [[ ${#ARTIFACT_TAGS[@]} -gt 0 ]]; then
|
|
run_command "📦 Packaging test artifacts" \
|
|
"${ci_dir}/upload_cub_test_artifacts.sh" \
|
|
"${ARTIFACT_TAGS[@]}"
|
|
else
|
|
run_command "📦 Packaging test artifacts" "${ci_dir}/upload_cub_test_artifacts.sh"
|
|
fi
|
|
fi
|
|
|
|
print_time_summary
|