{
  "id": "pytorch/cudnn-version-mismatch",
  "signature": "RuntimeError: cuDNN version mismatch: PyTorch was compiled against cuDNN X but linked against cuDNN Y",
  "signature_zh": "RuntimeError: cuDNN 版本不匹配：PyTorch 编译时使用 cuDNN X，但链接时使用 cuDNN Y",
  "regex": "RuntimeError: cuDNN version mismatch: PyTorch was compiled against cuDNN \\d+ but linked against cuDNN \\d+",
  "domain": "pytorch",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "Installed PyTorch binary was compiled with a different cuDNN version than the one installed on the system or in the environment.",
  "root_cause_type": "generic",
  "root_cause_zh": "安装的 PyTorch 二进制文件编译时使用的 cuDNN 版本与系统或环境中安装的 cuDNN 版本不匹配。",
  "versions": [
    {
      "version": "1.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.13",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "This only changes the visible version but doesn't fix the underlying library path.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This may break other CUDA-dependent libraries that need the system cuDNN.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Install PyTorch with the matching cuDNN version using conda or pip from pytorch.org, ensuring the cudatoolkit package matches. For example: conda install pytorch torchvision torchaudio cudatoolkit=11.8 -c pytorch",
      "success_rate": 0.9,
      "how": "Install PyTorch with the matching cuDNN version using conda or pip from pytorch.org, ensuring the cudatoolkit package matches. For example: conda install pytorch torchvision torchaudio cudatoolkit=11.8 -c pytorch",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a Docker container from PyTorch's official images to avoid system-level cuDNN conflicts.",
      "success_rate": 0.95,
      "how": "Use a Docker container from PyTorch's official images to avoid system-level cuDNN conflicts.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Install PyTorch with the matching cuDNN version using conda or pip from pytorch.org, ensuring the cudatoolkit package matches. For example: conda install pytorch torchvision torchaudio cudatoolkit=11.8 -c pytorch",
    "Use a Docker container from PyTorch's official images to avoid system-level cuDNN conflicts."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pytorch.org/get-started/locally/",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-06-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}