{
  "id": "cuda/cuda-error-unsupported-exec-affinity",
  "signature": "CUDA error: unsupported exec affinity (cudaErrorUnsupportedExecAffinity)",
  "signature_zh": "CUDA 错误：不支持的执行亲和性 (cudaErrorUnsupportedExecAffinity)",
  "regex": "CUDA error: unsupported exec affinity",
  "domain": "cuda",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The application requested a kernel execution affinity (e.g., via cudaLaunchAttributeCooperative or cudaFuncAttributeMaxDynamicSharedMemorySize) that is not supported by the current GPU architecture or driver version.",
  "root_cause_type": "generic",
  "root_cause_zh": "应用程序请求的内核执行亲和性（例如通过 cudaLaunchAttributeCooperative 或 cudaFuncAttributeMaxDynamicSharedMemorySize）不受当前 GPU 架构或驱动程序版本支持。",
  "versions": [
    {
      "version": "CUDA 12.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "CUDA 12.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "NVIDIA Driver 545.23.06",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "NVIDIA Driver 550.54.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "PyTorch 2.4.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The error is about execution affinity attributes, not shared memory limits; increasing shared memory may cause other issues but does not resolve the affinity problem.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Synchronous execution does not affect launch attributes; the affinity check happens before the kernel is queued, regardless of blocking mode.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Check GPU compute capability and remove unsupported launch attributes. For example, cooperative launch requires sm >= 70: `deviceProp.major * 10 + deviceProp.minor >= 70`.",
      "success_rate": 0.85,
      "how": "Check GPU compute capability and remove unsupported launch attributes. For example, cooperative launch requires sm >= 70: `deviceProp.major * 10 + deviceProp.minor >= 70`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrade to a driver that supports the required execution affinity (e.g., driver 550.54.10 or newer for CUDA 12.5 features).",
      "success_rate": 0.8,
      "how": "Upgrade to a driver that supports the required execution affinity (e.g., driver 550.54.10 or newer for CUDA 12.5 features).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Fall back to a non-cooperative launch by setting `cudaLaunchAttributeCooperative` to 0: `cudaLaunchConfig config; config.attrs[cudaLaunchAttributeCooperative] = 0;`",
      "success_rate": 0.9,
      "how": "Fall back to a non-cooperative launch by setting `cudaLaunchAttributeCooperative` to 0: `cudaLaunchConfig config; config.attrs[cudaLaunchAttributeCooperative] = 0;`",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Check GPU compute capability and remove unsupported launch attributes. For example, cooperative launch requires sm >= 70: `deviceProp.major * 10 + deviceProp.minor >= 70`.",
    "Upgrade to a driver that supports the required execution affinity (e.g., driver 550.54.10 or newer for CUDA 12.5 features).",
    "Fall back to a non-cooperative launch by setting `cudaLaunchAttributeCooperative` to 0: `cudaLaunchConfig config; config.attrs[cudaLaunchAttributeCooperative] = 0;`"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html",
  "official_doc_section": null,
  "error_code": "cudaErrorUnsupportedExecAffinity (802)",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2025-01-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}