cuda compatibility_error ai_generated true

RuntimeError: cuDNN version incompatibility

ID: cuda/cudnn-version-mismatch

Also available as: JSON · Markdown
88%Fix Rate
90%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
12 active

Root Cause

cuDNN version doesn't match the CUDA toolkit or PyTorch build.

generic

Workarounds

  1. 92% success Install the cuDNN version that matches your CUDA toolkit: check the compatibility matrix
    check the compatibility matrix

    Sources: https://docs.nvidia.com/deeplearning/cudnn/latest/reference/support-matrix.html

  2. 90% success Use conda install which handles CUDA/cuDNN version matching automatically
    conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia

    Sources: https://pytorch.org/get-started/locally/

  3. 85% success Or install PyTorch with bundled cuDNN via pip: pip install torch --index-url ...
    pip install torch --index-url 

    Sources: https://pytorch.org/get-started/locally/

Dead Ends

Common approaches that don't work:

  1. Install the latest cuDNN regardless of CUDA version 80% fail

    cuDNN versions are tied to CUDA versions — must match

  2. Build cuDNN from source 95% fail

    cuDNN is proprietary — can't build from source

Error Chain

Frequently confused with: