cuDNN Frontend is NVIDIA's modern, open-source entry point to the cuDNN library and a growing collection of high-performance open-source kernels.
932
stars
492
commits
Python
primary language
Sep 11, 2026
updated
cuDNN Frontend is NVIDIA's modern, open-source entry point to the cuDNN library and a growing collection of high-performance open-source kernels — scaled dot-product attention (SDPA / Flash Attention), grouped GEMM fusions for Mixture-of-Experts (MoE) training, fused normalization + activation, and more.
It provides a header-only C++ API and a Python interface (with native PyTorch integration) to the cuDNN Graph API, targeting NVIDIA Hopper (H100/H200) and Blackwell (B200/GB200/GB300) GPUs across FP16, BF16, FP8, and MXFP8 precision.
Links: Documentation · Blog & Deep Dives · PyPI · Release Notes · Samples
We will begin open-sourcing kernels based on customer needs, with the goal to educate developers and enable them to customize as needed.
We are now shipping OSS kernels, allowing you to inspect, modify, and contribute to the core logic. Check out our latest implementations:
cudnn.pygraph API — matmul, grouped (MoE) matmul, block-scaled FP4/FP8, and chained pointwise epilogues are fused into one kernel from the graph you already built. Opt in with CUDNN_FRONTEND_ENABLE_FROST_ENGINES=1; it is then a candidate for every matmul graph it can serve, ranked against the backend's own plans.Contributor credits for these OSS CuTe DSL kernels are listed in Acknowledgements.
See our latest talk on GPU-Mode
cudnn_frontend::graph::Graph objects to describe complex subgraphs.pybind11) that abstract away the boilerplate of the backend API.The easiest way to get started is via pip:
pip install nvidia-cudnn-frontend
Requirements:
Since the C++ API is header-only, integration is seamless. Simply include the header in your compilation unit:
#include <cudnn_frontend.h>
Ensure your include path points to the include/ directory of this repository.
If you want to build the Python bindings from source or run the C++ samples:
1. Dependencies
python-dev (e.g., apt-get install python-dev)requirements.txt (pip install -r requirements.txt)2. Python Source Build
pip install -v git+https://github.com/NVIDIA/cudnn-frontend.git
Environment variables CUDAToolkit_ROOT and CUDNN_PATH can be used to override default paths.
3. C++ Samples Build
mkdir build && cd build
cmake -DCUDNN_PATH=/path/to/cudnn -DCUDAToolkit_ROOT=/path/to/cuda ../
cmake --build . -j16
./bin/samples
samples/cpp for end-to-end examples covering convolution, matmul, SDPA / Flash Attention, normalization, and more.samples/python for Jupyter notebooks and PyTorch integration patterns.python/cudnn/ for source of SDPA, grouped GEMM + SwiGLU/GLU, RMSNorm + SiLU, Native Sparse Attention, and other open-sourced kernels.python/cudnn/experimental/ops for torch.compile-compatible wrappers around cuDNN kernels.We strictly welcome contributions! Whether you are fixing a bug, improving documentation, or optimizing one of our new OSS kernels, your help makes cuDNN better for everyone.
To view the execution flow and debug issues, you can enable logging via environment variables:
# Log to stdout
export CUDNN_FRONTEND_LOG_INFO=1
export CUDNN_FRONTEND_LOG_FILE=stdout
# Log to a file
export CUDNN_FRONTEND_LOG_INFO=1
export CUDNN_FRONTEND_LOG_FILE=execution_log.txt
Logging Levels:
CUDNN_FRONTEND_LOG_INFO=0: No loggingCUDNN_FRONTEND_LOG_INFO=1: Full logging with tensor dumpsCUDNN_FRONTEND_LOG_INFO=10: Basic logging (safe for CUDA graph capture)Alternatively, you can control logging programmatically via cudnn_frontend::isLoggingEnabled().
OSS engine selection:
The open-source engines are opt-in while they mature: set the flag below and they become candidates for every graph they can serve, ranked against the cuDNN backend's own engines in one list. Engines that are the only implementation of their operation (GDN/KDA) need no flag.
# Offer the maturing open-source engines (FROST GEMM / SDPA) as plan candidates.
export CUDNN_FRONTEND_ENABLE_FROST_ENGINES=1
# Where JIT-compiled kernels are cached (default: $XDG_CACHE_HOME/cudnn_gemm/kernel_cache).
export CUDNN_FRONTEND_GEMM_KERNEL_CACHE=/path/to/cache
graph.plans is the ranked list and graph.get_plan_name_at_index(i) names each entry — an OSS
engine reports its engine name, the backend reports the backend plan name. Pin one with
graph.select_plan(i) (strict: that plan runs or the build fails) and exclude by name with the
classic graph.deselect_engines([...]). graph.selected_engine is the engine that ran, or None
when the backend served the graph.
When filing a bug, include the output of the environment collector — it reports the frontend/backend versions, GPU/driver properties, and every cuDNN/CUDA library copy on the system (loaded vs on disk):
python -m cudnn.collect_env
If import cudnn itself fails, download collect_env.py and run it standalone with any Python.
When the frontend is built with dynamic loading enabled, it locates the CUDA runtime
(libcudart.so.*) at runtime by searching for the supported major versions. In some
environments (for example, containers such as GKE where the TCPXO NCCL plugin mounts a
different libcudart major version from the host) multiple versions of libcudart may be
visible on the library search path, and the automatic detection aborts with a
Multiple libcudart libraries found error.
To resolve this, set the CUDNN_FRONTEND_CUDART_LIB_NAME environment variable to the
library name (or full path) that should be loaded. This bypasses the automatic detection:
export CUDNN_FRONTEND_CUDART_LIB_NAME=libcudart.so.13
# or an absolute path
export CUDNN_FRONTEND_CUDART_LIB_NAME=/usr/local/cuda/lib64/libcudart.so.13
This project is distributed primarily under the Apache License 2.0.
A subset of files remain under the MIT License; each source
file declares its license with an SPDX SPDX-License-Identifier: tag. See
LICENSING.md for the full list of MIT-licensed files and the
rationale, and THIRD_PARTY_LICENSES.txt for
third-party attributions.
(top 30 of 69)
Python
88.3%
C++
11.7%
cuDNN Frontend is NVIDIA's modern, open-source entry point to the cuDNN library and a growing collection of high-performance open-source kernels.
932
stars
492
commits
Python
primary language
Sep 11, 2026
updated
cuDNN Frontend is NVIDIA's modern, open-source entry point to the cuDNN library and a growing collection of high-performance open-source kernels — scaled dot-product attention (SDPA / Flash Attention), grouped GEMM fusions for Mixture-of-Experts (MoE) training, fused normalization + activation, and more.
It provides a header-only C++ API and a Python interface (with native PyTorch integration) to the cuDNN Graph API, targeting NVIDIA Hopper (H100/H200) and Blackwell (B200/GB200/GB300) GPUs across FP16, BF16, FP8, and MXFP8 precision.
Links: Documentation · Blog & Deep Dives · PyPI · Release Notes · Samples
We will begin open-sourcing kernels based on customer needs, with the goal to educate developers and enable them to customize as needed.
We are now shipping OSS kernels, allowing you to inspect, modify, and contribute to the core logic. Check out our latest implementations:
cudnn.pygraph API — matmul, grouped (MoE) matmul, block-scaled FP4/FP8, and chained pointwise epilogues are fused into one kernel from the graph you already built. Opt in with CUDNN_FRONTEND_ENABLE_FROST_ENGINES=1; it is then a candidate for every matmul graph it can serve, ranked against the backend's own plans.Contributor credits for these OSS CuTe DSL kernels are listed in Acknowledgements.
See our latest talk on GPU-Mode
cudnn_frontend::graph::Graph objects to describe complex subgraphs.pybind11) that abstract away the boilerplate of the backend API.The easiest way to get started is via pip:
pip install nvidia-cudnn-frontend
Requirements:
Since the C++ API is header-only, integration is seamless. Simply include the header in your compilation unit:
#include <cudnn_frontend.h>
Ensure your include path points to the include/ directory of this repository.
If you want to build the Python bindings from source or run the C++ samples:
1. Dependencies
python-dev (e.g., apt-get install python-dev)requirements.txt (pip install -r requirements.txt)2. Python Source Build
pip install -v git+https://github.com/NVIDIA/cudnn-frontend.git
Environment variables CUDAToolkit_ROOT and CUDNN_PATH can be used to override default paths.
3. C++ Samples Build
mkdir build && cd build
cmake -DCUDNN_PATH=/path/to/cudnn -DCUDAToolkit_ROOT=/path/to/cuda ../
cmake --build . -j16
./bin/samples
samples/cpp for end-to-end examples covering convolution, matmul, SDPA / Flash Attention, normalization, and more.samples/python for Jupyter notebooks and PyTorch integration patterns.python/cudnn/ for source of SDPA, grouped GEMM + SwiGLU/GLU, RMSNorm + SiLU, Native Sparse Attention, and other open-sourced kernels.python/cudnn/experimental/ops for torch.compile-compatible wrappers around cuDNN kernels.We strictly welcome contributions! Whether you are fixing a bug, improving documentation, or optimizing one of our new OSS kernels, your help makes cuDNN better for everyone.
To view the execution flow and debug issues, you can enable logging via environment variables:
# Log to stdout
export CUDNN_FRONTEND_LOG_INFO=1
export CUDNN_FRONTEND_LOG_FILE=stdout
# Log to a file
export CUDNN_FRONTEND_LOG_INFO=1
export CUDNN_FRONTEND_LOG_FILE=execution_log.txt
Logging Levels:
CUDNN_FRONTEND_LOG_INFO=0: No loggingCUDNN_FRONTEND_LOG_INFO=1: Full logging with tensor dumpsCUDNN_FRONTEND_LOG_INFO=10: Basic logging (safe for CUDA graph capture)Alternatively, you can control logging programmatically via cudnn_frontend::isLoggingEnabled().
OSS engine selection:
The open-source engines are opt-in while they mature: set the flag below and they become candidates for every graph they can serve, ranked against the cuDNN backend's own engines in one list. Engines that are the only implementation of their operation (GDN/KDA) need no flag.
# Offer the maturing open-source engines (FROST GEMM / SDPA) as plan candidates.
export CUDNN_FRONTEND_ENABLE_FROST_ENGINES=1
# Where JIT-compiled kernels are cached (default: $XDG_CACHE_HOME/cudnn_gemm/kernel_cache).
export CUDNN_FRONTEND_GEMM_KERNEL_CACHE=/path/to/cache
graph.plans is the ranked list and graph.get_plan_name_at_index(i) names each entry — an OSS
engine reports its engine name, the backend reports the backend plan name. Pin one with
graph.select_plan(i) (strict: that plan runs or the build fails) and exclude by name with the
classic graph.deselect_engines([...]). graph.selected_engine is the engine that ran, or None
when the backend served the graph.
When filing a bug, include the output of the environment collector — it reports the frontend/backend versions, GPU/driver properties, and every cuDNN/CUDA library copy on the system (loaded vs on disk):
python -m cudnn.collect_env
If import cudnn itself fails, download collect_env.py and run it standalone with any Python.
When the frontend is built with dynamic loading enabled, it locates the CUDA runtime
(libcudart.so.*) at runtime by searching for the supported major versions. In some
environments (for example, containers such as GKE where the TCPXO NCCL plugin mounts a
different libcudart major version from the host) multiple versions of libcudart may be
visible on the library search path, and the automatic detection aborts with a
Multiple libcudart libraries found error.
To resolve this, set the CUDNN_FRONTEND_CUDART_LIB_NAME environment variable to the
library name (or full path) that should be loaded. This bypasses the automatic detection:
export CUDNN_FRONTEND_CUDART_LIB_NAME=libcudart.so.13
# or an absolute path
export CUDNN_FRONTEND_CUDART_LIB_NAME=/usr/local/cuda/lib64/libcudart.so.13
This project is distributed primarily under the Apache License 2.0.
A subset of files remain under the MIT License; each source
file declares its license with an SPDX SPDX-License-Identifier: tag. See
LICENSING.md for the full list of MIT-licensed files and the
rationale, and THIRD_PARTY_LICENSES.txt for
third-party attributions.
(top 30 of 69)
Python
88.3%
C++
11.7%