Open Kubiczek36 opened 4 months ago
Based on the packages, it is AMD GPU? Could you try a venv with python=3.9?
Reproduces on my m2 mac. with both py 3.10.6 and 3.9.13
Tried jax==0.4.11 jaxlib==0.4.11 jax-metal==0.0.4 - same thing
Haven't been able to reproduce the issue. The below config shows an installation and verification result: ProductName: macOS ProductVersion: 14.4
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/osx-64::ca-certificates-2023.12.12-hecd8cb5_0
libcxx pkgs/main/osx-64::libcxx-14.0.6-h9765a3e_0
libffi pkgs/main/osx-64::libffi-3.4.4-hecd8cb5_0
ncurses pkgs/main/osx-64::ncurses-6.4-hcec6c5f_0
openssl pkgs/main/osx-64::openssl-3.0.13-hca72f7f_0
pip pkgs/main/osx-64::pip-23.3.1-py39hecd8cb5_0
python pkgs/main/osx-64::python-3.9.18-h5ee71fb_0
readline pkgs/main/osx-64::readline-8.2-hca72f7f_0
setuptools pkgs/main/osx-64::setuptools-68.2.2-py39hecd8cb5_0
sqlite pkgs/main/osx-64::sqlite-3.41.2-h6c40b1e_0
tk pkgs/main/osx-64::tk-8.6.12-h5d9f67b_0
tzdata pkgs/main/noarch::tzdata-2024a-h04d1e81_0
wheel pkgs/main/osx-64::wheel-0.41.2-py39hecd8cb5_0
xz pkgs/main/osx-64::xz-5.4.6-h6c40b1e_0
zlib pkgs/main/osx-64::zlib-1.2.13-h4dc903c_0
Package Version
------------------ -------
importlib_metadata 7.0.2
jax 0.4.20
jax-metal 0.0.5
jaxlib 0.4.20
ml-dtypes 0.3.2
numpy 1.26.4
opt-einsum 3.3.0
pip 24.0
scipy 1.12.0
setuptools 68.2.2
six 1.16.0
wheel 0.41.2
zipp 3.17.0
python -c 'import jax; print(jax.numpy.arange(10))'
Platform 'METAL' is experimental and not all JAX functionality may be correctly supported!
2024-03-08 17:33:36.946600: W pjrt_plugin/src/mps_client.cc:563] WARNING: JAX Apple GPU support is experimental and not all JAX functionality is correctly supported!
Metal device set to: AMD Radeon Pro Vega 20
systemMemory: 32.00 GB
maxCacheSize: 1.99 GB
[0 1 2 3 4 5 6 7 8 9]
Right, i think i was able to figure it out - in my case it was due python being i386
arch and not arm64
.
After switching arch and installing native python, it worked.
Right, i think i was able to figure it out - in my case it was due python being
i386
arch and notarm64
. After switching arch and installing native python, it worked.
I have just tried to install following the instructions in the apple website (https://developer.apple.com/metal/jax/) and it failed. Same error than everyone here in a M2. How did you switched your native python3?
I have just ran the following code:
import platform
# Check the machine architecture
machine = platform.machine()
if machine == 'arm64':
print("Your Python version is ARM64")
elif machine == 'i386':
print("Your Python version is i386 (32-bit)")
elif machine == 'x86_64':
print("Your Python version is x86_64 (64-bit)")
else:
print(f"Unknown machine architecture: {machine}")
and the print out is:
Your Python version is x86_64 (64-bit)
@phisanti you switch in you CLI with arch
command, then you install python afresh (it will be a different python) and go with jax m install instruct from apple.
@curlup thanks for the tip. It worked for me!
Description
Using the instructions on the pip website the jax_metal failed to install
System info (python version, jaxlib version, accelerator, etc.)
Macbook Air M2 Macos Sonoma 14.3.1 (23D60) Python 3.10