feat(cccl): integrate missing CCCL directories — python/, ci/, .agent/, docs/, test/

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
This commit is contained in:
muh-bot
2026-08-07 02:34:33 +00:00
parent 3f97dca7ad
commit 2a7ca101d7
908 changed files with 121615 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
find_package(Python3 REQUIRED COMPONENTS Interpreter)
file(GLOB output_files "${CMAKE_CURRENT_SOURCE_DIR}/*.output")
foreach (output_file IN LISTS output_files)
get_filename_component(test_name "${output_file}" NAME_WE)
set(dirty_file "${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.dirty_files")
if (NOT EXISTS "${dirty_file}")
message(FATAL_ERROR "Missing dirty file for ${test_name}")
endif()
add_test(
NAME cccl.ci.test.inspect_changes.${test_name}
# gersemi: off
COMMAND
"${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/run_inspect_changes_test.py"
"--python" "${Python3_EXECUTABLE}"
"--script" "${PROJECT_SOURCE_DIR}/ci/inspect_changes.py"
"--dirty" "${dirty_file}"
"--expected" "${output_file}"
# gersemi: on
)
endforeach()

View File

@@ -0,0 +1 @@
c2h/catch2_runner.cu

View File

@@ -0,0 +1,2 @@
FULL_BUILD=tidy
LITE_BUILD=libcudacxx cub cudax cccl_c_parallel cccl_c_parallel_v2 python_v2 cccl_c_stf packaging

View File

@@ -0,0 +1 @@
CMakePresets.json

View File

@@ -0,0 +1,2 @@
FULL_BUILD=libcudacxx cub thrust cudax cccl_c_parallel cccl_c_parallel_v2 python_v2 python_tsan cccl_c_stf python packaging stdpar nvbench_helper nvrtcc tidy
LITE_BUILD=

View File

@@ -0,0 +1 @@
docs/index.rst

View File

@@ -0,0 +1,2 @@
FULL_BUILD=
LITE_BUILD=

View File

@@ -0,0 +1,2 @@
libcudacxx/CMakeLists.txt
libcudacxx/include/cuda/__device/device_ref.h

View File

@@ -0,0 +1,2 @@
FULL_BUILD=libcudacxx tidy
LITE_BUILD=cub thrust cudax cccl_c_parallel cccl_c_parallel_v2 python_v2 python_tsan cccl_c_stf python packaging stdpar nvbench_helper

View File

@@ -0,0 +1 @@
libcudacxx/CMakeLists.txt

View File

@@ -0,0 +1,2 @@
FULL_BUILD=libcudacxx tidy
LITE_BUILD=packaging

View File

@@ -0,0 +1 @@
libcudacxx/include/cuda/__device/device_ref.h

View File

@@ -0,0 +1,2 @@
FULL_BUILD=libcudacxx tidy
LITE_BUILD=cub thrust cudax cccl_c_parallel cccl_c_parallel_v2 python_v2 python_tsan cccl_c_stf python packaging stdpar nvbench_helper

View File

@@ -0,0 +1,3 @@
libcudacxx/include/cuda/__device/device_ref.h
thrust/thrust/version.h
README.md

View File

@@ -0,0 +1,2 @@
FULL_BUILD=libcudacxx thrust tidy
LITE_BUILD=cub cudax cccl_c_parallel cccl_c_parallel_v2 python_v2 python_tsan cccl_c_stf python packaging stdpar nvbench_helper

View File

@@ -0,0 +1,2 @@
python/cuda_cccl/pyproject.toml
examples/basic/CMakeLists.txt

View File

@@ -0,0 +1,2 @@
FULL_BUILD=python_v2 python_tsan python packaging
LITE_BUILD=

View File

@@ -0,0 +1,2 @@
FULL_BUILD=
LITE_BUILD=

View File

@@ -0,0 +1 @@
examples/CMakeLists.txt

View File

@@ -0,0 +1,2 @@
FULL_BUILD=packaging
LITE_BUILD=

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
project_root=$(cd "${script_dir}/../../.." && pwd)
inspect_changes="${project_root}/ci/inspect_changes.py"
if [[ ! -x "${inspect_changes}" ]]; then
echo "Error: ${inspect_changes} not found or not executable." >&2
exit 1
fi
cd "${script_dir}"
for dirty_file in *.dirty_files; do
test_name=${dirty_file%.dirty_files}
output_file="${test_name}.output"
echo "Regenerating ${output_file}"
python "${inspect_changes}" --file "${dirty_file}" \
| awk '/^FULL_BUILD=/{print}/^LITE_BUILD=/{print}' > "${output_file}"
done

View File

@@ -0,0 +1,81 @@
#!/usr/bin/env python3
"""Test harness for ci/inspect_changes.py."""
from __future__ import annotations
import argparse
import difflib
import subprocess
import sys
from pathlib import Path
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Run inspect_changes.py and compare output"
)
parser.add_argument(
"--script", required=True, type=Path, help="Path to inspect_changes.py"
)
parser.add_argument(
"--dirty", required=True, type=Path, help="File listing dirty files"
)
parser.add_argument(
"--expected", required=True, type=Path, help="Expected stdout contents"
)
parser.add_argument(
"--python", default=sys.executable, help="Python interpreter to use"
)
return parser.parse_args()
def build_command(python: str, script: Path, dirty_file: Path) -> list[str]:
cmd = [python, str(script), "--file", str(dirty_file)]
return cmd
def main() -> int:
args = parse_args()
cmd = build_command(args.python, args.script, args.dirty)
sys.stdout.write(f"COMMAND: {' '.join(cmd)}\n")
result = subprocess.run(cmd, capture_output=True, text=True)
sys.stdout.write("OUTPUT:\n")
sys.stdout.write(result.stdout)
if result.stdout and not result.stdout.endswith("\n"):
sys.stdout.write("\n")
if result.returncode != 0:
sys.stderr.write(result.stderr)
sys.stderr.write("\nCommand failed: {}\n".format(" ".join(cmd)))
return result.returncode
actual_lines = result.stdout.splitlines()
expected_lines = [
line.strip()
for line in args.expected.read_text(encoding="utf-8").splitlines()
if line.strip()
]
missing = [line for line in expected_lines if line not in actual_lines]
if missing:
diff = "\n".join(
difflib.unified_diff(
expected_lines,
actual_lines,
fromfile="expected(subset)",
tofile="actual",
lineterm="",
)
)
if diff:
sys.stderr.write(diff + "\n\n")
sys.stderr.write("\nExpected lines missing from output:\n")
for line in missing:
sys.stderr.write(f" {line}\n")
return 1
return 0
if __name__ == "__main__":
raise SystemExit(main())