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:
106
cccl_upstream/docs/python/setup.rst
Normal file
106
cccl_upstream/docs/python/setup.rst
Normal file
@@ -0,0 +1,106 @@
|
||||
.. _cccl-python-setup:
|
||||
|
||||
Setup and Installation
|
||||
======================
|
||||
|
||||
This guide walks you through installing and setting up the CUDA Python Core Libraries (CCCL).
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Before installing cuda-cccl, ensure you have:
|
||||
|
||||
* **Python 3.10 or later**
|
||||
* **CUDA Toolkit 12.x or 13.x**
|
||||
* **Compatible NVIDIA GPU** with Compute Capability 7.5 or higher
|
||||
* **Operating Systems:** Linux (tested on Ubuntu 20.04+) or Windows 10/11 (with WSL2 support)
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Install from PyPI
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
The easiest way to install ``cuda-cccl`` is using pip:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install cuda-cccl[cu13] # or cuda-cccl[cu12]
|
||||
|
||||
This will install ``cuda-cccl`` along with all required dependencies, including
|
||||
the ``cuda-toolkit`` pip packages for the chosen CUDA major version.
|
||||
|
||||
If you already have a CUDA toolkit installed on your system (e.g., via the
|
||||
NVIDIA runfile, package manager, or Conda) and do not want pip to install it,
|
||||
use the ``sysctk`` variants instead:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install cuda-cccl[sysctk13] # or cuda-cccl[sysctk12]
|
||||
|
||||
These install the same dependencies except ``cuda-toolkit``; it is your
|
||||
responsibility to ensure a compatible CUDA toolkit is on ``PATH`` and
|
||||
``LD_LIBRARY_PATH``.
|
||||
|
||||
For a minimal install without Numba (useful when you supply your own
|
||||
:ref:`pre-compiled operators <cuda.compute.externally_compiled_operators>`), use:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pip install cuda-cccl[minimal-cu13] # pip-installed CUDA toolkit
|
||||
pip install cuda-cccl[minimal-sysctk13] # system CUDA toolkit
|
||||
|
||||
Free-threaded Python support is currently validated with the ``minimal-cu12``
|
||||
and ``minimal-cu13`` extras. The full ``cu12`` and ``cu13`` extras depend on
|
||||
Numba CUDA and are not currently supported in free-threaded Python.
|
||||
|
||||
Install from conda-forge
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Alternatively, you can install ``cuda-cccl`` using conda:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
conda install -c conda-forge cccl-python
|
||||
|
||||
This will install the CCCL Python libraries and their dependencies from the conda-forge channel.
|
||||
|
||||
Install from Source
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For development or to access the latest features:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
git clone https://github.com/NVIDIA/cccl.git
|
||||
cd cccl/python/cuda_cccl
|
||||
pip install -e .[test-cu13] # or .[test-cu12], .[test-sysctk13], .[test-sysctk12]
|
||||
|
||||
The test extras do not install CuPy. To also run the CuPy-based
|
||||
``cuda.compute`` examples, install CuPy separately, for example
|
||||
``pip install cupy-cuda13x``.
|
||||
|
||||
|
||||
Development Setup
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For contributing to cuda-cccl or advanced development:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Clone the repository
|
||||
git clone https://github.com/NVIDIA/cccl.git
|
||||
cd cccl/python/cuda_cccl
|
||||
|
||||
# Install in development mode with test dependencies
|
||||
pip install -e .[test-cu13] # or .[test-cu12], .[test-sysctk13], .[test-sysctk12]
|
||||
|
||||
# Run tests to verify everything works
|
||||
pytest tests/
|
||||
|
||||
Next Steps
|
||||
----------
|
||||
|
||||
Now that you have ``cuda-cccl`` installed, check out:
|
||||
|
||||
* :doc:`compute/index` - Parallel computing primitives for operations on arrays or data ranges
|
||||
Reference in New Issue
Block a user