jaxlib is the essential support library for JAX, containing the binary (C/C++) parts of the JAX ecosystem, including Python bindings, the XLA compiler, the PJRT runtime, and various handwritten kernels. While JAX itself is a pure Python package providing the high-level API, jaxlib acts as its compiled backend, enabling high-performance numerical computation on CPUs, GPUs, and TPUs. The current version is 0.9.2, and it follows a frequent release cadence, often aligning with or preceding JAX releases.
pip install --upgrade pip
pip install --upgrade jax jaxlibVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic JAX program that implicitly leverages `jaxlib` for Just-In-Time (JIT) compilation and execution on available accelerators (CPU, GPU, or TPU). It defines a simple numerical function, compiles it with `jax.jit`, and performs an operation on a JAX array. The output shows detected devices and a sample of the computation.
Rewrite `jax.pmap` usage to `jax.shard_map`. Consult the JAX migration guide for `pmap`.
Upgrade NumPy to version 2.0 or newer and SciPy to 1.13 or newer (`pip install --upgrade numpy scipy`).
Ensure that the input to `jax.dlpack.from_dlpack` is an object that implements the DLPack Python protocol.
Adopt a functional programming style for array manipulations. Use `array = array.at[index].set(value)` for updates, which returns a new array with the modification.
Always refer to the official JAX installation guide for the correct, platform-specific commands. Ensure your CUDA/cuDNN versions are compatible with the `jaxlib` wheel you are installing.
If your code relies on distinguishing `TypedNdArray` from `np.ndarray`, adjust type checks accordingly. Convert to classic NumPy arrays using `np.asarray(x)` if necessary.