Open vlebert opened 1 year ago
This needs support for the new Accelerate in macOS >=13.3 - the relevant issue is https://github.com/conda-forge/blas-feedstock/issues/103.
That new Accelerate PR is still open and the checker says there are some conflicts. Will the merge ever happen or is this issue & PR abandoned?
Please be patient, we'll get there.
Sorry,
I did not want to put any pressure on anybody. I am very grateful for all the work mostly volunteers put into developing fine open source software. So I am generally patient. May be I worded my question wrong. I just had installed a new Conda-forge environment. And had to learn that the former suggestion to install numpy there on Apple silicon by:
conda install -f numpy "libblas=*=*accelerate"
seems to be outdated. So I wanted to clarify whether I should wait for the PR to be merged sometime in the future or better uninstall that numpy and follow the other option.
conda install -f numpy "libblas=*=*accelerate"
seems to be outdated.
No, it's currently the best approach, probably 2-4x faster than OpenBLAS (at least, those numbers were cited in #253).
So I wanted to clarify whether I should wait for the PR to be merged sometime in the future or better uninstall that numpy and follow the other option.
Once that PR gets merged, you'll be able to do conda install -f numpy "libblas=*=*newaccelerate"
. Until then, you can either use the existing *accelerate
builds, or install numpy through pip
. Note that the latter is not supported by conda-forge, so if something breaks, there's not much we can do.
For fellow users - I had to learn, to keep your libblas
setup as intended, you have to make sure that every conda update
is done in a way which makes sure that the accelerate setup is kept. E.g.:
conda update --all "libblas=*=*accelerate"
. Otherwise updates might deliver different, unwanted BLAS libs.
Confirmation that the updates will run as intended can be verified in the package plan:
...
added / updated specs:
- libblas[build=*accelerate]
otherwise these packages would be installed (downgraded):
libopenblas conda-forge/osx-arm64::libopenblas-0.3.25-openmp_h6c19121_0
The following packages will be DOWNGRADED:
libblas 3.9.0-20_osxarm64_accelerate --> 3.9.0-20_osxarm64_openblas
libcblas 3.9.0-20_osxarm64_accelerate --> 3.9.0-20_osxarm64_openblas
liblapack 3.9.0-20_osxarm64_accelerate --> 3.9.0-20_osxarm64_openblas
@gsgxnet You can accomplish this by adding the libblas=*=*accelerate
in the file (you probably will need to create it) ~/miniconda3/envs/myenv/conda-meta/pinned
where miniconda3
is wherever you installed conda and myenv
is the environment you want to configure with the pin.
@gsgxnet You can accomplish this by adding the
libblas=*=*accelerate
in the file (you probably will need to create it)~/miniconda3/envs/myenv/conda-meta/pinned
whereminiconda3
is wherever you installed conda andmyenv
is the environment you want to configure with the pin.
Thanks for that hint. Step by step this thread becomes a useful documentation how to accelerate Apple Silicon Python environments. Great.
Solution to issue cannot be found in the documentation.
Issue
I did a few benchmark reported here
https://github.com/numpy/numpy/issues/24961
Installed packages
Environment info