Returns the available global devices, across all processes. In single-host setups, that list usually matches the local devices list; the first entry is the default device for uncommitted arrays. section 3.2.3 section 5.1.1
Commonly used to:
- inspect which CPU, GPU, or TPU devices JAX can see. section 3.2.3
- pick a specific device for placement or JIT execution. section 5.1.1
- compare local versus global device counts in multi-process settings. section 3.2.3
Basic device listing
`jax.devices()` can return a list like `[gpu(id=0)]`, while `jax.devices('cpu')` can return `[CpuDevice(id=0)]`. That makes it easy to see what hardware is available before placing data or compiling a function for a target device. section 3.2.3
Pairs with `jax.device_put()` and `jax.jit(device=...)` when you need precise placement or execution control. It also sits alongside `jax.local_devices()`, `jax.device_count()`, and `jax.local_device_count()` for hardware introspection. section 3.2.3 section 5.1.1
