Question
I am trying to find out if the latest version of NumPy (2.0.0
) is taking advantage of the updated Accelerate BLAS/LAPACK library, including ILP64.
Numpy
Numpy in their 2.0.0
release added support for the Apple Accelerate framework.
Having installed this version, I checked the BLAS/LAPACK linking:
>>> import numpy as np
>>> np.show_config()
Build Dependencies:
blas:
detection method: pkgconfig
found: true
include directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/include
lib directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib
name: blas
openblas configuration: unknown
pc file directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib/pkgconfig
version: 3.9.0
lapack:
detection method: pkgconfig
found: true
include directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/include
lib directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib
name: lapack
openblas configuration: unknown
pc file directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib/pkgconfig
version: 3.9.0
While it says found: true
, I am unsure if this is using the Accelerate-linked versions of BLAS/LAPACK.
SciPy
The SciPy documentation (1.13.X) mentions that:
A recent version of OpenBLAS, MKL or ATLAS. The Accelerate BLAS library is no longer supported.
– Scipy Toolchain Roadmap
An archived SciPy GitHub-wiki entry details the reasoning for this missing support.
>>> import scipy as sp
>>> sp.show_config()
Build Dependencies:
blas:
detection method: pkgconfig
found: true
include directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/include
lib directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib
name: blas
openblas configuration: unknown
pc file directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib/pkgconfig
version: 3.9.0
lapack:
detection method: pkgconfig
found: true
include directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/include
lib directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib
name: lapack
openblas configuration: unknown
pc file directory: /opt/homebrew/Caskroom/miniconda/base/envs/numpy/lib/pkgconfig
version: 3.9.0
…this looks just like the configuration of NumPy 2.0.0
… which leads me to believe the NumPy linking may not be working. Perhaps this is an issue with Conda?
Related:
- How to check BLAS/LAPACK linking in NumPy/SciPy