Backend API Overview#
The NVIDIA CUDA Deep Neural Network (cuDNN) library offers a context-based API that allows for easy multithreading and (optional) interoperability with CUDA streams. This API Reference lists the data types and API functions per sub-library.
The cuDNN version 9 library is reorganized into several sub-libraries. This new library structure separates legacy functionality (an imperative API with a fixed set of operations and fusion patterns in cuDNN version 7 and older) from the graph API (a declarative API, introduced in cuDNN version 8), as well as from the engine implementation. The graph API is now grouped into a single library (libcudnn_graph.so).
We recommend users to make API calls through the graph API, but the older shim layer (libcudnn.so) and legacy libraries (libcudnn_cnn.so, libcudnn_ops.so, libcudnn_adv.so) can still be directly used. The engine libraries (libcudnn_engines_precompiled.so, libcudnn_heuristic.so, and libcudnn_engines_runtime_compiled.so) contain necessary internal functionality to support the aforementioned sub-libraries. This library split is done in a way to allow for more flexibility on the user side in loading libraries. The mechanism for more flexible configurability of libraries will be introduced in a later version of cuDNN.
The API is split into the following libraries, each having corresponding header files in the include directory:
This entity contains the API functions related to cuDNN context creation and destruction, a list of valid cuDNN backend descriptor types, a list of valid attributes, a subset of valid attribute values, and a full description of each backend descriptor type and their attributes. In addition, it is responsible for loading the correct engine libraries.
Engine and heuristics libraries (
cudnn_engines_precompiled,cudnn_engines_runtime_compiled, andcudnn_heuristics) are loaded throughdlopenbycudnn_graph, and provide implementations for the API incudnn_graph. The main idea of separating these engines from each other is to, in a future version of cuDNN, provide a way for the user to only load the functionality they need, and thus provide an opportunity to save memory and disk space.
This entity contains the legacy API functions related to tensor descriptor management, tensor utility API functions, and common machine learning algorithms such as batch normalization, softmax, dropout, and so on. This library depends on
cudnn_graph, and indirectly oncudnn_engines_precompiled, as kernels for some APIs reside in thecudnn_engines_precompiledlibrary.
This entity contains all legacy API functions related to convolutional neural networks. This library depends on
cudnn_opsandcudnn_graph. Thecudnn_engines_precompiledlibrary must be present forcudnn_cnnto correctly load.
This entity contains all other features and algorithms. This includes RNNs, CTC loss, and multihead attention. This library depends on
cudnn_opsandcudnn_graph.
Added, Deprecated, and Removed APIs#
API Changes for cuDNN 9.13.0#
Added Enums:
CUDNN_BACKEND_OPERATION_SDPA_FWD_DESCRIPTORCUDNN_ATTR_OPERATION_SDPA_FWD_QDESCCUDNN_ATTR_OPERATION_SDPA_FWD_KDESCCUDNN_ATTR_OPERATION_SDPA_FWD_VDESCCUDNN_ATTR_OPERATION_SDPA_FWD_ODESCCUDNN_ATTR_OPERATION_SDPA_FWD_STATSDESCCUDNN_ATTR_OPERATION_SDPA_FWD_SCALEDESC
API Changes for cuDNN 9.8.0#
Added Enums:
CUDNN_BACKEND_DEVICEPROP_DESCRIPTORCUDNN_ATTR_DEVICEPROP_DEVICE_IDCUDNN_ATTR_DEVICEPROP_HANDLECUDNN_ATTR_DEVICEPROP_JSON_REPRESENTATIONCUDNN_ATTR_ENGINE_DEVICEPROPCUDNN_ATTR_ENGINEHEUR_DEVICEPROPCUDNN_ATTR_EXECUTION_PLAN_DEVICEPROP
Deprecated Enums:
CUDNN_ATTR_OPERATIONGRAPH_HANDLECUDNN_ATTR_EXECUTION_PLAN_HANDLE
API Changes for cuDNN 9.5.0#
Added APIs:
Added Enums:
CUDNN_STATUS_BAD_PARAM_CUDA_GRAPH_MISMATCHCUDNN_STATUS_NOT_SUPPORTED_CUDA_GRAPH_NATIVE_APICUDNN_BEHAVIOR_NOTE_SUPPORTS_CUDA_GRAPH_NATIVE_API
API Changes for cuDNN 9.2.0#
Added APIs:
Added Enums:
CUDNN_STATUS_SUBLIBRARY_LOADING_FAILEDCUDNN_ATTR_ENGINECFG_WORKSPACE_SIZECUDNN_ATTR_ENGINECFG_SHARED_MEMORY_USED
Deprecated APIs:
API Changes for cuDNN 9.1.0#
Added Enums:
CUDNN_NUMERICAL_NOTE_STRICT_NAN_PROPCUDNN_POINTWISE_ATAN2CUDNN_POINTWISE_CBRTCUDNN_POINTWISE_CLZCUDNN_POINTWISE_IS_FINITECUDNN_POINTWISE_POPCCUDNN_POINTWISE_ROUND_NEAREST_AFZCUDNN_POINTWISE_ROUND_NEAREST_EVENCUDNN_POINTWISE_SHIFT_LEFTCUDNN_POINTWISE_SHIFT_RIGHT_ARITHMETICCUDNN_POINTWISE_SHIFT_RIGHT_LOGICALCUDNN_POINTWISE_XORCUDNN_POINTWISE_ANDCUDNN_POINTWISE_ORCUDNN_POINTWISE_NOT
API Changes for cuDNN 9.0.0#
Added Environment Variables:
CUDNN_LOGLEVEL_DB
Added Type:
Added APIs:
Added Enums:
CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCHCUDNN_STATUS_SERIALIZATION_VERSION_MISMATCHCUDNN_STATUS_BAD_PARAM_NULL_POINTERCUDNN_STATUS_BAD_PARAM_MISALIGNED_POINTERCUDNN_STATUS_BAD_PARAM_NOT_FINALIZEDCUDNN_STATUS_BAD_PARAM_OUT_OF_BOUNDCUDNN_STATUS_BAD_PARAM_SIZE_INSUFFICIENTCUDNN_STATUS_BAD_PARAM_STREAM_MISMATCHCUDNN_STATUS_BAD_PARAM_SHAPE_MISMATCHCUDNN_STATUS_BAD_PARAM_DUPLICATED_ENTRIESCUDNN_STATUS_BAD_PARAM_ATTRIBUTE_TYPECUDNN_STATUS_NOT_SUPPORTED_GRAPH_PATTERNCUDNN_STATUS_NOT_SUPPORTED_SHAPECUDNN_STATUS_NOT_SUPPORTED_DATA_TYPECUDNN_STATUS_NOT_SUPPORTED_LAYOUTCUDNN_STATUS_NOT_SUPPORTED_INCOMPATIBLE_CUDA_DRIVERCUDNN_STATUS_NOT_SUPPORTED_INCOMPATIBLE_CUDARTCUDNN_STATUS_NOT_SUPPORTED_ARCH_MISMATCHCUDNN_STATUS_NOT_SUPPORTED_RUNTIME_PREREQUISITE_MISSINGCUDNN_STATUS_NOT_SUPPORTED_SUBLIBRARY_UNAVAILABLECUDNN_STATUS_NOT_SUPPORTED_SHARED_MEMORY_INSUFFICIENTCUDNN_STATUS_NOT_SUPPORTED_PADDINGCUDNN_STATUS_NOT_SUPPORTED_BAD_LAUNCH_PARAMCUDNN_STATUS_INTERNAL_ERROR_COMPILATION_FAILEDCUDNN_STATUS_INTERNAL_ERROR_UNEXPECTED_VALUECUDNN_STATUS_INTERNAL_ERROR_HOST_ALLOCATION_FAILEDCUDNN_STATUS_INTERNAL_ERROR_DEVICE_ALLOCATION_FAILEDCUDNN_STATUS_INTERNAL_ERROR_BAD_LAUNCH_PARAMCUDNN_STATUS_INTERNAL_ERROR_TEXTURE_CREATION_FAILEDCUDNN_STATUS_EXECUTION_FAILED_CUDA_DRIVERCUDNN_STATUS_EXECUTION_FAILED_CUBLASCUDNN_STATUS_EXECUTION_FAILED_CUDARTCUDNN_STATUS_EXECUTION_FAILED_CURAND
Deprecated Environment Variables:
CUDNN_LOGERR_DBGCUDNN_LOGWARN_DBGCUDNN_LOGINFO_DBG
Deprecated APIs:
Deprecated Enums:
CUDNN_ATTR_OPERATION_RESAMPLE_BWD_ALPHACUDNN_ATTR_OPERATION_RESAMPLE_BWD_BETACUDNN_ATTR_OPERATION_RESAMPLE_FWD_ALPHACUDNN_ATTR_OPERATION_RESAMPLE_FWD_BETACUDNN_DATA_INT8x32CUDNN_DATA_INT8x4CUDNN_DATA_UINT8x4CUDNN_STATUS_ALLOC_FAILEDCUDNN_STATUS_ARCH_MISMATCHCUDNN_STATUS_INVALID_VALUECUDNN_STATUS_MAPPING_ERRORCUDNN_STATUS_RUNTIME_PREREQUISITE_MISSINGCUDNN_STATUS_VERSION_MISMATCHcudnnBackendAttributeName_t:::CUDNN_ATTR_POINTWISE_NAN_PROPAGATIONcudnnBackendAttributeType_t::CUDNN_TYPE_NAN_PROPOGATIONCUDNN_TYPE_NAN_PROPOGATIONCUDNN_ATTR_POINTWISE_NAN_PROPAGATIONCUDNN_KNOB_TYPE_SPLIT_KCUDNN_KNOB_TYPE_USE_TEXCUDNN_KNOB_TYPE_KBLOCKCUDNN_KNOB_TYPE_LDGACUDNN_KNOB_TYPE_LDGBCUDNN_KNOB_TYPE_CHUNK_KCUDNN_KNOB_TYPE_SPLIT_HCUDNN_KNOB_TYPE_WINO_TILECUDNN_KNOB_TYPE_CTA_SPLIT_K_MODECUDNN_KNOB_TYPE_IDX_MODECUDNN_KNOB_TYPE_SLICEDCUDNN_KNOB_TYPE_SPLIT_RSCUDNN_KNOB_TYPE_SINGLEBUFFERCUDNN_KNOB_TYPE_LDGCCUDNN_KNOB_TYPE_TILE_CGACUDNN_KNOB_TYPE_NUM_C_PER_BLOCK
Deprecated Types:
Removed APIs:
Functions Deprecated in v8, Removed in v9 |
Replacement Function |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Removed Types:
cudnnRNNPaddingMode_tcudnnAttnQueryMap_t