Attention

Following the recent operating system upgrade, software listings and module load commands now reflect the upgraded system. Some examples and notices are still being updated and may contain outdated guidance.

cuDNN

Guidance last updated: 16 October 2026

The NVIDIA CUDA Deep Neural Network library (cuDNN) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalisation, and activation layers. cuDNN is part of the NVIDIA Deep Learning SDK.

Usage

Warning

Only GPU-enabled nodes are able to run the cuDNN library.

See Using GPUs on Stanage for more information on how to request a GPU-enabled node for an interactive session or job submission.

Load the appropriate cuDNN version (and implicitly load a specified CUDA version) with one of the following commands:

module load cuDNN/9.23.0.39-CUDA-13.2.0
module load cuDNN/9.15.0.57-CUDA-12.9.1

Example batch job

Download cudnn-example.cpp to your working directory. This small C++ example uses cuDNN’s legacy activation API to calculate sigmoid values on the GPU and checks them against a CPU reference. The following example batch submission script compiles and runs it:

#!/bin/bash
#SBATCH --partition=gpu
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --gres=gpu:1
#SBATCH --mem=4000
#SBATCH --time=00:05:00

set -e
module load cuDNN/9.23.0.39-CUDA-13.2.0
cd "$SLURM_SUBMIT_DIR"

g++ -std=c++11 -O2 -o cudnn-example cudnn-example.cpp -lcudnn -lcudart
./cudnn-example

Save the script as run.sh and submit it from the directory containing the source file with sbatch run.sh. It requests one GPU, one CPU and 4000 MB of memory for five minutes. Choose resources appropriate to your application.

Installation notes

cuDNN was installed using Easybuild, build details can be found in $EBROOTCUDNN/easybuild with a given module loaded.

Direct dependencies for latest version of cuDNN