{"record":{"id":"1a370335f588147f","repo":"jax-ml/jax","slug":"unknown-backend-platform-requested-but-no-pl","errorCode":null,"errorMessage":"Unknown backend: '{platform}' requested, but no platforms that are instances of {platform} are present. Platforms present are: ","messagePattern":"Unknown backend: '(.+?)' requested, but no platforms that are instances of (.+?) are present\\. Platforms present are: ","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"jax/_src/xla_bridge.py","lineNumber":745,"sourceCode":"\n\ndef canonicalize_platform(platform: str) -> str:\n  \"\"\"Replaces platform aliases with their concrete equivalent.\n\n  In particular, replaces \"gpu\" with either \"cuda\", \"oneapi\" or \"rocm\", depending on which\n  hardware is actually present. We want to distinguish \"cuda\", \"oneapi\" and \"rocm\" for\n  purposes such as MLIR lowering rules, but in many cases we don't want to\n  force users to care.\n  \"\"\"\n  platforms = _alias_to_platforms.get(platform, None)\n  if platforms is None:\n    return platform\n\n  b = backends()\n  for p in platforms:\n    if p in b.keys():\n      return p\n  raise RuntimeError(f\"Unknown backend: '{platform}' requested, but no \"\n                     f\"platforms that are instances of {platform} are present. \"\n                     \"Platforms present are: \" + \",\".join(b.keys()))\n\n\ndef expand_platform_alias(platform: str) -> list[str]:\n  \"\"\"Expands, e.g., \"gpu\" to [\"cuda\", \"rocm\", \"oneapi\"].\n\n  This is used for convenience reasons: we expect cuda and rocm to act similarly\n  in many respects since they share most of the same code.\n  \"\"\"\n  return _alias_to_platforms.get(platform, [platform])\n\n\ndef backends_are_initialized() -> bool:\n  \"Returns true if backends have already been initialized.\"\n  with _backend_lock:\n    return len(_backends) != 0\n","sourceCodeStart":727,"sourceCodeEnd":763,"githubUrl":"https://github.com/jax-ml/jax/blob/1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb/jax/_src/xla_bridge.py#L727-L763","documentation":"Error \"Unknown backend: '{platform}' requested, but no platforms that are instances of {platform} are present. Platforms present are: \" thrown in jax-ml/jax.","triggerScenarios":"Thrown at jax/_src/xla_bridge.py:745 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1e1c6a8fc06dfcd1247076ec5cae4640cea5d7bb","analyzedAt":"2026-08-27T09:53:25.647Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}