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:
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_HOST_ASSERTIONS |
Enables assertions in host code, independent of debug mode. Implied by |
C++ Feature Control Macros#
CCCL_DISABLE_EXCEPTIONS |
Disables throwing exceptions. Each |
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 ( |
CCCL_DISABLE_LAUNCH_BOUNDS |
Disables use of |
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 |
CCCL_DISABLE_FLOAT128_SUPPORT |
Disables use and library support for the |
CCCL_DISABLE_FP16_SUPPORT |
Disables use and library support for the |
CCCL_DISABLE_INT128_SUPPORT |
Disables use and library support for the |
CCCL_DISABLE_LONG_DOUBLE_SUPPORT |
Disables use and library support for the |
CCCL_DISABLE_NVFP4_SUPPORT |
Disables use and library support for the |
CCCL_DISABLE_NVFP6_SUPPORT |
Disables use and library support for the |
CCCL_DISABLE_NVFP8_SUPPORT |
Disables use and library support for the |
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 |
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.