Skip to navigation

Installing the cuDNN Python Frontend

View as MarkdownOpen in Claude

You can install the cuDNN Python frontend from a wheel or build it from source. Both options require a compatible cuDNN backend.

Installing the Python Frontend from pip Wheel

Run pip with the Python interpreter you want to use:

python -m pip install nvidia-cudnn-frontend

Installing the Python Frontend from Source

Building the Python bindings requires Python 3.10 or later, a compiler with C++20 support, the CUDA Toolkit, and cuDNN backend development files. Install the development headers for the Python interpreter you use to build, such as python3-dev for the system Python on Debian or Ubuntu.

  1. If you require a custom installation path for the CUDA Toolkit or cuDNN software, set environment variables as follows:

    SoftwareEnvironment Variable
    CUDA ToolkitCUDAToolkit_ROOT
    cuDNNCUDNN_PATH

    If these variables are unset, the build uses the standard CUDA Toolkit and cuDNN search paths.

  2. Build and install the frontend from the GitHub repository:

    python -m pip install git+https://github.com/NVIDIA/cudnn-frontend.git

Verifying the Python Frontend Installation

Import cudnn and query both versions with the interpreter you used for installation:

python -c "import cudnn; print(cudnn.__version__, cudnn.backend_version())"

To run GPU tests from a source checkout, see Running tests.