NVIDIA/cudnn-frontend
cuDNN Frontend is NVIDIA's modern, open-source entry point to the cuDNN library and a growing collection of high-performance open-source kernels.
NVIDIA cuDNN Frontend (cuDNN‑FE)
What it is – A thin, header‑only C++ library plus Python bindings that wrap NVIDIA’s cuDNN Graph API. It gives developers a higher‑level, easier‑to‑use way to build and run high‑performance deep‑learning primitives (convolutions, GEMM, attention, normalization, etc.) on modern NVIDIA GPUs (Hopper H100/H200, Blackwell B200/GB200/GB300). The package also ships a growing set of open‑source kernels (Flash‑Attention / SDPA, fused GEMM‑+‑activation, block‑sparse attention, etc.) that can be JIT‑compiled and selected at runtime.
Key features
- Unified Graph API – Create a
cudnn_frontend::graph::Graphobject once and reuse it for many executions. - Header‑only C++ – No library to link; just
#include <cudnn_frontend.h>. - Python / PyTorch integration –
pip install nvidia‑cudnn‑frontendprovidescudnnPython module withpybind11bindings and ready‑madetorch.compilecustom ops. - Auto‑tuning & plan ranking – The frontend builds multiple engine candidates (including the new OSS “FROST” kernels) and picks the fastest.
- Open‑source kernels – Flash‑Attention (SDPA), grouped GEMM for Mixture‑of‑Experts, fused RMSNorm+SiLU, block‑sparse and native sparse attention, etc., all written in CuTe DSL and shipped under Apache‑2.0.
- Support for FP16, BF16, FP8, MXFP8 – Enables the newest low‑precision formats on Hopper/Blackwell.
Typical use cases
- Researchers building custom transformer models that need the absolute fastest attention kernels on H100/Blackwell.
- Engineers integrating cuDNN‑accelerated layers into PyTorch pipelines without writing CUDA kernels.
- Teams training Mixture‑of‑Experts models who want fused grouped‑GEMM + activation kernels to reduce memory traffic.
- Anyone who wants to inspect, modify, or contribute cutting‑edge GPU kernels (the OSS kernels are JIT‑compiled and can be customized).
Installation
- Python:
pip install nvidia-cudnn-frontend(requires Python 3.10+, NVIDIA driver, CUDA Toolkit, cuDNN ≥ 8.5.0). - C++: Just add the
include/directory to the compiler’s include path and compile against the CUDA and cuDNN libraries. - From source:
pip install -v git+https://github.com/NVIDIA/cudnn-frontend.gitfor the Python bindings, or use CMake to build the C++ samples (cmake … && cmake --build .).
Ecosystem & integration
- Works with PyTorch (custom ops under
python/cudnn/experimental/ops). - Compatible with CUDA Graphs and can be used inside
torch.compilepipelines. - Provides sample notebooks and C++ examples for convolution, matmul, SDPA/Flash‑Attention, RMSNorm, etc.
- Documentation hosted at NVIDIA’s developer site and a blog with deep‑dive articles.
Maturity
- Actively maintained by NVIDIA; versioned releases are published on PyPI.
- The core frontend API is stable, while new OSS kernels are added incrementally (e.g., FROST GEMM, Flex Attention, HSTU, DSA).
- Logging and environment‑report utilities help with debugging and reproducibility.
License
- Primarily Apache License 2.0; a few files are under the MIT License (clearly marked). All third‑party attributions are listed in
THIRD_PARTY_LICENSES.txt.
Related
- Project
- Project
- Project
- Project
- Project