You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add skills/cccl, an agent skill for Thrust, CUB and libcu++ meant for the
NVIDIA skills catalog, with its evaluation dataset.
- SKILL.md: when to use CCCL instead of a hand-written kernel, fusing
passes, silent wrong results, performance, execution environments,
determinism, newer CCCL 3.x algorithms, block/warp primitives, libcu++,
APIs removed in CCCL 3.0, and builds.
- references/libcudacxx.md: runtime API and parallel algorithms examples.
- evals/evals.json: 21 cases (19 positive, 2 negative) with starter code
under evals/files/.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Documentation
Added CUDA C++ guidance covering CCCL and libcu++ APIs, version compatibility, build workflows, algorithm selection, correctness, performance, determinism, and common pitfalls.
Added a libcu++ reference with toolkit guidance, usage constraints, and examples for streams and GPU parallel algorithms.
Added evaluation examples covering sorting, reductions, streams, reproducibility, CUDA version migration, and other development scenarios.
The pull request adds a CUDA C++ CCCL skill guide, a libcu++ reference, 21 evaluation cases, and sample programs covering CCCL builds, algorithms, correctness, performance, and execution patterns.
Changes: CCCL Skill and Evaluation Examples
Layer / File(s)
Summary
CCCL guidance and references skills/cccl/SKILL.md, skills/cccl/references/libcudacxx.md
The skill guide covers CCCL workflows, algorithms, correctness, performance, determinism, and execution patterns. The libcu++ reference documents APIs, examples, and usage constraints.
Evaluation prompts and assertions skills/cccl/evals/evals.json
The evaluation records define prompts and expected-output assertions for CCCL tasks and out-of-scope questions.
Host-compiler build and statistics example skills/cccl/evals/files/cccl-host-compiler-include/code/CMakeLists.txt, skills/cccl/evals/files/cccl-host-compiler-include/code/src/*
The sample project configures a C++/CUDA build, declares fleet-statistics interfaces, calculates GPU statistics, creates readings, and prints a report.
Thrust algorithms and execution examples skills/cccl/evals/files/cccl-bykey-reproducible/code/ledger.cu, skills/cccl/evals/files/cccl-compose-events/code/replay.cu, skills/cccl/evals/files/cccl-fuse-passes/code/hot_particles.cu, skills/cccl/evals/files/cccl-sort-perf/code/bin_particles.cu, skills/cccl/evals/files/cccl-stream-pipeline/code/pipeline.cu
The programs demonstrate by-key reduction reproducibility, ordered update composition, particle diagnostics, sorting, and per-stream signal processing.
CUB reductions and ingest examples skills/cccl/evals/files/cccl-port-2x-to-3x/code/stats.cu, skills/cccl/evals/files/cccl-review-ingest/code/ingest.cu
The programs use CUB reductions for calibrated readings and process sensor data with counts, offsets, radix sorting, and segmented minima.
Possibly related issues
NVIDIA/cccl#9466: The skill includes CCCL documentation guidance and links, which relates to the issue’s question about using developer documentation.
NVIDIA/cccl#9337: The pull request adds a CCCL skill and evaluation dataset, matching the epic’s request for CCCL skills.
NVIDIA/cccl#9995: The skill discusses determinism for per-key reductions and warns about thrust::reduce_by_key reproducibility for long key runs.
Possibly related PRs
NVIDIA/cccl#5583: This PR routes cub::DeviceReduce::ReduceByKey through the same API exercised by the new reproducibility evaluation.
Change: Feature
Merge Risk: Low · up to 19eb0
Users following the reference with CUDA 13.4 may encounter compilation failures. The version guidance needs correction.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 04508f6 and 19eb098.
Files selected for processing: 1
skills/cccl/SKILL.md
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
CUDA Toolkit 13.4 CCCL 3.5 shipped version libcu++
Result:
Sources consulted:
- CUDA Toolkit 13.4 - Release Notes — Release Notes 13.4 documentation — https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html?highlight=ptx
- Releases · NVIDIA/cccl · GitHub — https://github.com/NVIDIA/cccl/releases
- GitHub - NVIDIA/cccl: CUDA Core Compute Libraries · GitHub — https://github.com/NVIDIA/cccl
- CUDA Toolkit 13.4 - Release Notes — Release Notes 13.4 documentation — https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html?from=20421
- CUDA Toolkit 13.4 Adds Windows on Arm Support and Greater Control over Shared GPUs | NVIDIA Technical Blog — https://developer.nvidia.com/blog?p=121255
- …and 21 more
Script executed:
cat -n docs/libcudacxx/extended_api/bit.rst | sed -n '1,80p'
cat -n docs/libcudacxx/extended_api/math.rst | sed -n '1,100p'
cat -n docs/libcudacxx/extended_api/warp.rst | sed -n '1,85p'
cat -n docs/libcudacxx/extended_api/numeric.rst | sed -n '1,105p'
cat -n docs/libcudacxx/standard_api/algorithms_library.rst | sed -n '1,35p'
Repository: NVIDIA/cccl
Length of output: 11833
suggestion: Correct the toolkit version and API availability.
CUDA 13.4 GA ships libcu++ 3.4.2. Code that uses cuda::warp_match_any can fail to compile with that toolkit.
Correct the version guidance
--- "a/skills/cccl/references/libcudacxx.md"+++ "b/skills/cccl/references/libcudacxx.md"@@ -1,6 +1,6 @@
# libcu++ beyond `cuda::std`
-Everything here ships in the CUDA 13.4 toolkit (CCCL 3.5) under `<ctk>/include/cccl/cuda/`.+CUDA 13.4 GA ships libcu++ 3.4.2 under `<ctk>/include/cccl/cuda/`. Some APIs require newer versions; `cuda::warp_match_any` requires CCCL 3.5 / CUDA 13.5.
Older toolkits have less of it: check `CCCL_VERSION` and compile a small test first.
## Runtime API: streams, buffers, kernel launch
Committable suggestion
IMPORTANT
Review the replacement and indentation, then test before committing.
Suggested change
Everything here ships in the CUDA 13.4 toolkit (CCCL 3.5) under `<ctk>/include/cccl/cuda/`.
CUDA 13.4 GA ships libcu++ 3.4.2 under `<ctk>/include/cccl/cuda/`. Some APIs require newer versions; `cuda::warp_match_any` requires CCCL 3.5 / CUDA 13.5.
It did pretty well when trying to complete the examples, for the ones where we have an algo: 6/12 went from hand written to using cccl, i think 12/12 would do it if it wasnt for some of the comments about only add compute, the agents were a bit to strict so they went back to hand written kernels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
skills/ccclfor users of Thrust, CUB and libcu++.Will be added to the NVIDIA skills catalog, with its evaluation dataset.
Description
closes
Results of evals in a 4090 (just for demonstration real eval numbers will run in the skills repo).
Checklist