Skip to main content

JAX acceleration for Mac GPUs.

Project description

jax-metal

The jax-metal package is a Metal GPU plugin to provide Metal acceleration on Mac platforms for JAX applications.

Installation

The following table tracks jax-metal versions and compatible versions of jax, jaxlib and MacOS.

jax-metal MacOS jaxlib jax
0.0.7 Sonoma 14.4+ >=0.4.26 >=0.4.26
0.0.6 Sonoma 14.4 Beta >=v0.4.22, <v0.4.24 >=v0.4.22
0.0.5 Sonoma 14.2+ >=v0.4.20, <v0.4.22 >=v0.4.20
0.0.4 Sonoma 14.0+ v0.4.11 v0.4.11
0.0.3 Ventura 13.4.1+, Sonoma 14.0 Beta v0.4.10 v0.4.11

We recommend to install the binary package with venv or conda.

python3 -m venv ~/jax-metal
source ~/jax-metal/bin/activate
python -m pip install -U pip
python -m pip install numpy wheel
python -m pip install jax-metal

Usage

python -c 'import jax; print(jax.numpy.arange(10))'

Use with advanced jaxlib

jax-metal is compatible with the minimal jaxlib version tracked in the above table. It can be compatibly run with advanced jaxlibs no beyond the version with "<", by setting enviroment variable ENABLE_PJRT_COMPATIBILITY. However functionality correctness is not guarenteed under the circumtances.

pip install -U jaxlib jax
ENABLE_PJRT_COMPATIBILITY=1 python -c 'import jax; print(jax.numpy.arange(10))'

Please refer to https://developer.apple.com/metal/jax/ for the full setup and verification.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

jax_metal-0.0.7-py3-none-macosx_13_0_arm64.whl (40.8 MB view hashes)

Uploaded Python 3 macOS 13.0+ ARM64

jax_metal-0.0.7-py3-none-macosx_10_14_x86_64.whl (55.0 MB view hashes)

Uploaded Python 3 macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page