{
  "id": "cuda/cublas-api-not-found",
  "signature": "RuntimeError: CUDA error: CUBLAS_STATUS_ARCH_MISMATCH when calling cublasSgemm",
  "signature_zh": "运行时错误：CUDA 错误：调用 cublasSgemm 时出现 CUBLAS_STATUS_ARCH_MISMATCH",
  "regex": "CUBLAS_STATUS_ARCH_MISMATCH",
  "domain": "cuda",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The GPU's compute capability is too low for the cuBLAS kernel being invoked, typically because the code was compiled for sm_80+ but the GPU only supports sm_70 or earlier.",
  "root_cause_type": "generic",
  "root_cause_zh": "GPU 的计算能力低于所调用 cuBLAS 内核的要求，通常是因为代码针对 sm_80+ 编译，但 GPU 仅支持 sm_70 或更早版本。",
  "versions": [
    {
      "version": "CUDA 11.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "cuBLAS 11.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "PyTorch 2.0.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "NVIDIA Driver 525.85.05",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Reinstallation does not change the GPU hardware or the compiled architecture targets; the mismatch persists.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Driver updates do not alter cuBLAS library architecture requirements; the kernel still expects a higher compute capability.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "export CUBLAS_WORKSPACE_CONFIG=\":4096:8\" && python your_script.py",
      "success_rate": 0.7,
      "how": "export CUBLAS_WORKSPACE_CONFIG=\":4096:8\" && python your_script.py",
      "condition": "",
      "sources": []
    },
    {
      "action": "export TORCH_CUDA_ARCH_LIST='7.0;7.5' && pip install --no-cache-dir torch --verbose",
      "success_rate": 0.85,
      "how": "export TORCH_CUDA_ARCH_LIST='7.0;7.5' && pip install --no-cache-dir torch --verbose",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "export CUBLAS_WORKSPACE_CONFIG=\":4096:8\" && python your_script.py",
    "export TORCH_CUDA_ARCH_LIST='7.0;7.5' && pip install --no-cache-dir torch --verbose"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.nvidia.com/cuda/cublas/index.html#cublas-status-t",
  "official_doc_section": null,
  "error_code": "CUBLAS_STATUS_ARCH_MISMATCH",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-05-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}