{
  "id": "pytorch/cudnn-status-not-initialized",
  "signature": "RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED when calling cudnnCreate",
  "signature_zh": "运行时错误：cuDNN 错误：调用 cudnnCreate 时 CUDNN_STATUS_NOT_INITIALIZED",
  "regex": "RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED when calling cudnnCreate",
  "domain": "pytorch",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "cuDNN library failed to initialize, often due to incompatible CUDA/cuDNN versions, missing library files, or corrupted installation.",
  "root_cause_type": "generic",
  "root_cause_zh": "cuDNN 库初始化失败，通常由于 CUDA/cuDNN 版本不兼容、缺少库文件或安装损坏。",
  "versions": [
    {
      "version": "pytorch>=1.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "cuda>=11.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "cudnn>=8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Reinstalling PyTorch without changing CUDA version",
      "why_fails": "If the underlying CUDA/cuDNN mismatch persists, reinstalling PyTorch alone does not resolve it.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "Setting environment variable CUDNN_LOGINFO_DBG=1",
      "why_fails": "This only enables logging, does not fix the initialization issue.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Downgrading PyTorch to an older version",
      "why_fails": "May temporarily work but is not a proper fix; the root cause is version compatibility.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify CUDA and cuDNN versions match PyTorch requirements: run `python -c \"import torch; print(torch.version.cuda); print(torch.backends.cudnn.version())\"` and compare with PyTorch documentation.",
      "success_rate": 0.9,
      "how": "Verify CUDA and cuDNN versions match PyTorch requirements: run `python -c \"import torch; print(torch.version.cuda); print(torch.backends.cudnn.version())\"` and compare with PyTorch documentation.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reinstall cuDNN by downloading the correct version from NVIDIA and copying library files to the CUDA toolkit directory (e.g., /usr/local/cuda/lib64).",
      "success_rate": 0.85,
      "how": "Reinstall cuDNN by downloading the correct version from NVIDIA and copying library files to the CUDA toolkit directory (e.g., /usr/local/cuda/lib64).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a PyTorch Docker image with pre-matched CUDA/cuDNN versions: `docker pull pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel`",
      "success_rate": 0.8,
      "how": "Use a PyTorch Docker image with pre-matched CUDA/cuDNN versions: `docker pull pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify CUDA and cuDNN versions match PyTorch requirements: run `python -c \"import torch; print(torch.version.cuda); print(torch.backends.cudnn.version())\"` and compare with PyTorch documentation.",
    "Reinstall cuDNN by downloading the correct version from NVIDIA and copying library files to the CUDA toolkit directory (e.g., /usr/local/cuda/lib64).",
    "Use a PyTorch Docker image with pre-matched CUDA/cuDNN versions: `docker pull pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html",
  "official_doc_section": null,
  "error_code": "CUDNN_STATUS_NOT_INITIALIZED",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-01-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}