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,52 @@
.. _infra-devcontainer-overview:
Devcontainer overview
=====================
CCCL devcontainers package a CUDA toolkit and host compiler into a Docker image
that matches a CI environment exactly. The same image that builds and tests a
project in GitHub Actions runs on a developer's machine. Reproducing a CI
result locally requires no guesswork about toolchain versions: pick the
combination, launch the container, and the compiler, CTK, and supporting tools
are identical to what CI used.
Two uses: local development and CI
----------------------------------
**Local development.** Open the repository in VSCode and select a devcontainer
from the picker, or launch one directly with ``.devcontainer/launch.sh``.
:ref:`infra-devcontainer-launch-sh-reference` covers ``launch.sh`` flags and the available
combinations. ``launch.sh --docker`` runs the container without VSCode and drops
into a shell or runs a script. Without ``--docker``, it opens the container in
VSCode.
**CI.** GitHub Actions runs the identical images. A CI job for a given CTK and
compiler combination builds and tests inside the same ``rapidsai/devcontainers``
image a developer would launch locally.
Image source: rapidsai/devcontainers
------------------------------------
The base images are built and published by the
`rapidsai/devcontainers <https://github.com/rapidsai/devcontainers>`_ repository,
not by CCCL. Each image bundles a CUDA toolkit, a host compiler, and
development tooling. CCCL references these images by tag; it does not build them.
Image tags follow the pattern
``rapidsai/devcontainers:<version>-cpp-<compiler><version>-cuda<ctk>[ext]``.
The ``-cuda<ctk>`` segment is present for every combination except nvhpc, which
bundles its own CUDA toolkit; nvhpc images omit it.
The ``<version>`` tag is defined in ``ci/matrix.yaml`` under
``devcontainer_version``. A generated ``.devcontainer/<combo>/devcontainer.json``
contains the resolved tag for any given combination.
This upstream dependency gates toolchain changes. Adding a CUDA toolkit version
or a host compiler requires the matching image to exist in rapidsai/devcontainers
first. The sequence is:
#. Update rapidsai/devcontainers to build and publish images for the new
combination.
#. Update CCCL's ``ci/matrix.yaml`` to reference the new version.
#. Regenerate CCCL's devcontainer configs to match all matrix workflow requirements.
:ref:`infra-devcontainer-adding-toolchain` has additional details on this process.

View File

@@ -0,0 +1,13 @@
.. _infra-devcontainer-references-index:
Devcontainer Reference
======================
Reference pages for the CCCL devcontainer environment.
.. toctree::
:hidden:
:maxdepth: 1
devcontainer_overview
launch_sh_reference

View File

@@ -0,0 +1,84 @@
.. _infra-devcontainer-launch-sh-reference:
launch.sh reference
===================
``.devcontainer/launch.sh`` launches a development container for a chosen CUDA
toolkit and host compiler. It selects a generated ``devcontainer.json``, mounts
the repository, and starts either a VSCode dev container or a raw Docker shell.
Linux-only.
Flags
-----
.. list-table::
:header-rows: 1
:widths: 22 12 12 54
* - Flag
- Type
- Default
- Description
* - ``-c``, ``--cuda <VER>``
- string
- unset
- CUDA toolkit version, e.g. ``12.9``. Combines with ``--host`` to select a
container.
* - ``-H``, ``--host <COMPILER>``
- string
- unset
- Host compiler, e.g. ``gcc12``. Combines with ``--cuda`` to select a
container.
* - ``--cuda-ext``
- flag
- false
- Select the extended-CTK-libraries image. Adds the ``ext`` suffix to the
container name.
* - ``-d``, ``--docker``
- flag
- false
- Launch directly in Docker, bypassing VSCode.
* - ``--gpus <REQUEST>``
- string
- inferred
- GPU devices to attach, e.g. ``all``. Overrides the
``hostRequirements.gpu`` value from ``devcontainer.json``.
* - ``-e``, ``--env <LIST>``
- list
- none
- Set additional container environment variables. Repeatable.
* - ``-v``, ``--volume <LIST>``
- list
- none
- Bind-mount an additional volume. Repeatable.
* - ``-h``, ``--help``
- flag
- —
- Print usage and exit.
Arguments after ``--`` pass through to the container as the command to run.
Container selection
-------------------
With no ``--cuda`` and no ``--host``, ``launch.sh`` uses the top-level
``.devcontainer/devcontainer.json`` (the default environment).
Set both ``--cuda`` and ``--host`` to select a generated container.
With both set, ``launch.sh`` builds a directory name and loads
``.devcontainer/<name>/devcontainer.json``:
.. code-block:: text
cuda<VER>[ext]-<COMPILER>
``<VER>`` comes from ``--cuda``, ``<COMPILER>`` from ``--host``, and the
``ext`` suffix is added when ``--cuda-ext`` is set. Examples:
.. code-block:: text
cuda12.9-gcc12 # --cuda 12.9 --host gcc12
cuda13.3ext-clang20 # --cuda 13.3 --host clang20 --cuda-ext
If the resolved ``devcontainer.json`` does not exist, ``launch.sh`` reports the
unknown combination and exits non-zero.