jax-ml/jax · error · RuntimeError
(set JAX_PLATFORMS='' to automatically choose an available…
Error message
{err_msg} (set JAX_PLATFORMS='' to automatically choose an available backend) What it means
Raised by backends() when a requested backend fails to initialize (fail_quietly is off). The error text includes the per-platform failure and suggests setting JAX_PLATFORMS='' so JAX falls back to automatically choosing an available backend.
Solutions
- Set JAX_PLATFORMS='' so JAX falls back to an available backend
- Fix the underlying backend error included in err_msg (driver/plugin/library issues)
- Uninstall or deprioritize the failing plugin so another backend is selected
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at jax/_src/xla_bridge.py:842 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/bad8a78fbfa2b202.
Report an issue: GitHub.
Appendix: source
Thrown at jax/_src/xla_bridge.py:842
continue
backend = _init_backend(platform)
_backends[platform] = backend
if priority > default_priority:
_default_backend = backend
default_priority = priority
except Exception as err:
err_msg = f"Unable to initialize backend '{platform}': {err}"
if fail_quietly:
_backend_errors[platform] = str(err)
logger.info(err_msg)
else:
if config.jax_platforms.value:
err_msg += " (set JAX_PLATFORMS='' to automatically choose an available backend)"
else:
err_msg += " (you may need to uninstall the failing plugin package, or set JAX_PLATFORMS=cpu to skip this backend.)"
raise RuntimeError(err_msg)
assert _default_backend is not None
if not config.jax_platforms.value:
_suggest_missing_backends()
return _backends
# Code to suggest plugins that should be installed.
#
# Plugin vendors are welcome to add code to this list, assuming there's a
# lightweight way to determine if hardware is present without requiring
# the relevant plugin be installed.
def _suggest_missing_backends():
if py_platform.system() != "Linux":
# If you're not using Linux (or WSL2), we don't have any suggestions at the
# moment.
return
View on GitHub (pinned to 1e1c6a8fc0)