jax-ml/jax · error · RuntimeError

Unknown backend: '{platform}' requested, but no platforms th

Error message

Unknown backend: '{platform}' requested, but no platforms that are instances of {platform} are present. Platforms present are: 

What it means

Error "Unknown backend: '{platform}' requested, but no platforms that are instances of {platform} are present. Platforms present are: " thrown in jax-ml/jax.

Source

Thrown at jax/_src/xla_bridge.py:745


def canonicalize_platform(platform: str) -> str:
  """Replaces platform aliases with their concrete equivalent.

  In particular, replaces "gpu" with either "cuda", "oneapi" or "rocm", depending on which
  hardware is actually present. We want to distinguish "cuda", "oneapi" and "rocm" for
  purposes such as MLIR lowering rules, but in many cases we don't want to
  force users to care.
  """
  platforms = _alias_to_platforms.get(platform, None)
  if platforms is None:
    return platform

  b = backends()
  for p in platforms:
    if p in b.keys():
      return p
  raise RuntimeError(f"Unknown backend: '{platform}' requested, but no "
                     f"platforms that are instances of {platform} are present. "
                     "Platforms present are: " + ",".join(b.keys()))


def expand_platform_alias(platform: str) -> list[str]:
  """Expands, e.g., "gpu" to ["cuda", "rocm", "oneapi"].

  This is used for convenience reasons: we expect cuda and rocm to act similarly
  in many respects since they share most of the same code.
  """
  return _alias_to_platforms.get(platform, [platform])


def backends_are_initialized() -> bool:
  "Returns true if backends have already been initialized."
  with _backend_lock:
    return len(_backends) != 0

View on GitHub (pinned to 1e1c6a8fc0)

When it happens

Trigger: Thrown at jax/_src/xla_bridge.py:745 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of jax-ml/jax@1e1c6a8fc0 (2026-08-27). Data as JSON: /api/errors/1a370335f588147f. Report an issue: GitHub.