Skip to content

Commit 5a2fb38

Browse files
superbobryjax authors
authored andcommitted
List all available backends when jax.devices() is called with an unknown platform
PiperOrigin-RevId: 616856256
1 parent 3e5e962 commit 5a2fb38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jax/_src/xla_bridge.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,8 @@ def _get_backend_uncached(
840840
raise RuntimeError(f"Backend '{platform}' failed to initialize: "
841841
f"{_backend_errors[platform]}. "
842842
f'Available backends are {list(bs)}')
843-
raise RuntimeError(f"Unknown backend {platform}")
843+
raise RuntimeError(
844+
f"Unknown backend {platform}. Available backends are {list(bs)}")
844845
return backend
845846
else:
846847
assert _default_backend is not None

0 commit comments

Comments
 (0)