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
58 lines
2.0 KiB
ReStructuredText
58 lines
2.0 KiB
ReStructuredText
.. _infra-cmake-preset-reference:
|
|
|
|
Preset reference
|
|
================
|
|
|
|
CCCL ships its CMake configurations as presets in ``CMakePresets.json``, using CMake's
|
|
`preset format <https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html>`_. The file
|
|
defines 40+ presets covering each library, multiple C++ standards, special build
|
|
modes, and benchmarking.
|
|
|
|
Preset structure
|
|
----------------
|
|
|
|
Each preset belongs to one of three sections:
|
|
|
|
- ``configurePresets`` set the configuration: enabled libraries, build type, CUDA
|
|
architectures, C++ standard, and per-library options. Every configure preset
|
|
inherits from the hidden ``base`` preset, which selects the Ninja generator,
|
|
Release mode, ``all-major-cccl`` architectures, and disables all libraries by
|
|
default. A named preset enables the libraries and options it needs.
|
|
- ``buildPresets`` reference a configure preset by name. Some pin an explicit
|
|
target list; most build everything the configuration enables.
|
|
- ``testPresets`` reference a configure preset and add CTest filters. Filters
|
|
select a subset of tests by name regex. CUB launcher-mode presets and Thrust
|
|
GPU/CPU splits are examples of this pattern.
|
|
|
|
A configure preset, its build preset, and its test preset share a name. Run all
|
|
three with the same ``<name>``.
|
|
|
|
Listing available presets
|
|
-------------------------
|
|
|
|
``cmake --list-presets`` prints all configure presets::
|
|
|
|
cmake --list-presets
|
|
|
|
List build and test presets separately::
|
|
|
|
cmake --list-presets=build
|
|
cmake --build --list-presets
|
|
ctest --list-presets
|
|
|
|
Using a preset
|
|
--------------
|
|
|
|
Configure, then build with the matching preset name::
|
|
|
|
cmake --preset cub-cpp17
|
|
cmake --build --preset cub-cpp17
|
|
|
|
Run the test preset of the same name with ``ctest``::
|
|
|
|
ctest --preset cub-cpp17
|
|
|
|
Build output lands under ``build/<infix>/<presetName>/``, where the infix comes from
|
|
the ``CCCL_BUILD_INFIX`` environment variable used for devcontainer isolation.
|
|
Distinct presets use distinct build directories and do not collide.
|