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
95 lines
13 KiB
ReStructuredText
95 lines
13 KiB
ReStructuredText
.. _cccl-config:
|
|
|
|
CCCL configuration macros
|
|
=========================
|
|
|
|
The CUDA Core Compute Libraries provide a set of macros to enable or disable specific features. These macros must be defined before any CCCL source file is included. The recommended way is to define them as the predefined compiler macros, for example:
|
|
|
|
.. code-block:: bash
|
|
|
|
nvcc -DCCCL_DISABLE_SOME_FEATURE src.cu
|
|
|
|
.. important::
|
|
These macros should be defined consistently in the whole project. Defining them only for some translation units may lead to unexpected compile time and runtime behaviour.
|
|
|
|
Assertion Control Macros
|
|
------------------------
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_ENABLE_ASSERTIONS | Enables assertions in both host and device code. Implied by compiling in debug mode. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_ENABLE_DEVICE_ASSERTIONS | Enables assertions in device code, independent of debug mode. Implied by ``CCCL_ENABLE_ASSERTIONS``. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_ENABLE_HOST_ASSERTIONS | Enables assertions in host code, independent of debug mode. Implied by ``CCCL_ENABLE_ASSERTIONS``. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
C++ Feature Control Macros
|
|
--------------------------
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_EXCEPTIONS | Disables throwing exceptions. Each ``throw`` is replaced by a call to ``cuda::std::terminate()``. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_RTTI | Disables use of runtime type information. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_IGNORE_MSVC_TRADITIONAL_PREPROCESSOR_WARNING | Disables diagnostics emitted when using MSVC's traditional preprocessor. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
CUDA Feature Control Macros
|
|
---------------------------
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_ARCH_DEPENDENT_NAMESPACE | Disables architecture dependent name mangling of kernels. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_CDP | Disables use of CUDA Dynamic Parallelism. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_CTK_COMPATIBILITY_CHECK | Disables the check whether NVCC's version matches the CUDA Toolkit version. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_DEVICE_RUNTIME | Disables use of CUDA device runtime APIs (``<cuda_device_runtime.h>``), thus makes some APIs that are ``__host__ __device__`` to be ``__host__`` only. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_LAUNCH_BOUNDS | Disables use of ``__launch_bounds__`` attribute. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_PDL | Disables use of Programmatic Dependent Launch. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Deprecation Diagnostics Suppression Macros
|
|
------------------------------------------
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_IGNORE_DEPRECATED_API | Disables deprecated API diagnostics. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_IGNORE_DEPRECATED_COMPILER | Disables deprecated compiler diagnostics. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_IGNORE_DEPRECATED_CPP_DIALECT | Disables deprecated C++ dialect diagnostics. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_IGNORE_DEPRECATED_CUDA_BELOW_12 | Disables deprecated CUDA compiler diagnostics. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Third Party Libraries Interoperability
|
|
--------------------------------------
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_DLPACK | Disables inclusion of DLPack header and APIs. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Type Support
|
|
------------
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_BF16_SUPPORT | Disables use and library support for the ``__nv_bfloat16`` type. Also disables support for smaller NV floating point types. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_FLOAT128_SUPPORT | Disables use and library support for the ``__float128`` type. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_FP16_SUPPORT | Disables use and library support for the ``__half`` type. Also disables support for smaller NV floating point types. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_INT128_SUPPORT | Disables use and library support for the ``__int128`` type. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_LONG_DOUBLE_SUPPORT | Disables use and library support for the ``long double`` type. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_NVFP4_SUPPORT | Disables use and library support for the ``__nv_fp4_eNmM`` types. Also disables support for smaller NV floating point types. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_NVFP6_SUPPORT | Disables use and library support for the ``__nv_fp6_eNmM`` types. Also disables support for smaller NV floating point types. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_DISABLE_NVFP8_SUPPORT | Disables use and library support for the ``__nv_fp8_eNmM`` types. Also disables support for smaller NV floating point types. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_ENABLE_EXPERIMENTAL_HOST_ATOMICS_128B | Enables experimental support for 128b atomics in host code. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| CCCL_GCC_HAS_EXTENDED_NUMERIC_LITERALS | Must be enabled in addition to passing ``-fext-numeric-literals`` with GCC to enable ``__float128`` support. |
|
|
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. note::
|
|
``<cuda_fpN.h>`` headers contain dependencies on other ``<cuda_fpM.h>`` headers, thus for example defining ``CCCL_DISABLE_BF16_SUPPORT`` will disable support for NVIDIA 8-bit, 6-bit and 4-bit floating point types, too.
|