
On Tue, May 9, 2023 at 5:11 AM Jerry Morrison < jerry.morrison+numpy@gmail.com> wrote:
This sounds terrific. Is there a technique to get such a performance improvement with Accelerate?
We tried:
pip install numpy==1.24.3 --no-binary numpy
with and without a ~/.numpy-site.cfg file that sets
[accelerate] libraries = Accelerate, vecLib
on Intel and M2 Macs on macOS 13.3. While np.show_config() reports that numpy is linked to Accelerate, a large dot product runs maybe twice as fast as with OpenBLAS, and our full bio simulation's performance is within measurement noise.
Trying the --no-use-pep517 argument had no obvious impact.
From the release notes: "To use the new interfaces, define ACCELERATE_NEW_LAPACK before including the Accelerate or vecLib headers". So you are still using the old version of the library if you did not do that. This is not entirely trivial to do now; I expect we'll see a PR to enable the new libraries quite soon. Cheers, Ralf
Best, Jerry
On Thu, Mar 23, 2023 at 3:52 AM Ralf Gommers <ralf.gommers@gmail.com> wrote:
On Thu, Mar 23, 2023 at 10:43 AM Clemens Brunner < clemens.brunner@gmail.com> wrote:
Thanks Ralf, this sounds great! Just making sure I understand, this means that for macOS 13, we have to enable Accelerate by building NumPy from source.
Indeed. Either that, or use a packaging system that's more capable in this regard - conda-forge for example will give you runtime switching of BLAS and LAPACK libraries out of the box ( https://conda-forge.org/docs/maintainer/knowledge_base.html#switching-blas-i...). Several Linux distros support this too, via mechanisms like `update-alternatives` - but that won't help you much on macOS of course.
Once macOS 13.3 is out, building SciPy from source will also link to
Accelerate. Finally, Accelerate support will be enabled by default in binary wheels for NumPy and SciPy once macOS 14 is out (presumably some time in October this year). Correct?
Yes, if I had to guess now then I'd say that this will be the default in NumPy 2.0 at the end of the year.
Cheers, Ralf
_______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-leave@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: ralf.gommers@gmail.com