Am Mon, 27 Nov 2023 14:58:45 +0100 schrieb Ralf Gommers <ralf.gomm...@gmail.com>:
> The NumPy build does not know anything about this. It will just build, and > it will simply call the OpenBLAS functionality Great! > Yes, that is possible. You should be building with a build frontend (pip or > pypa/build) and then the invocation will include `-C-Dblas=<your .pc name> > -C-Dlapack=<your .pc name>`. I'm confused about these frontends, I must say. I imagined that if you're using meson, one could just call meson setup/build? That being said: I am not sure now myself how the pkgsrc build actually works right now. There's common machinery to 'build python stuff' and the part about meson-based packages is rather fresh and not documented yet. The build output starts with * Building wheel... + /data/pkg/bin/python3.11 /data/projekte/pkgsrc/work/math/py-numpy/work/numpy-1.26.2/vendored-meson/meson/meson.py setup /data/projekte/pkgsrc/work/math/py-numpy/work/numpy-1.26.2 /data/projekte/pkgsrc/work/math/py-numpy/work/numpy-1.26.2/.mesonpy-_lv … so some wrapped call to a vendored copy of meson that NumPy ships. Adding -Dblas=$CBLAS_PC to that command should do the trick, no? (however that is effected) > > And: NumPy needs CBLAS … does it also need LAPACKE instead of LAPACK? > > > > No need for LAPACKE. Good, if also somewhat weird;-) I'm curious, though: When you need the CBLAS API, why is the dependency called blas and not cblas? In practice, most accelerated libraries offer all APIs in one binary and -Dlapack is already redundant, but when we use the netlib reference, blas, cblas, lapack, and lapacke are distinct entities. Calling cblas just blas where lapack _does_ mean the Fortran one, is rather confusing. > You have to opt in to ILP64, via a `-Duse-ilp64` flag. It will not work to > craft a blas.pc which points at a 64-bit BLAS. So -Dblas=openblas64 -Dlapack=openblas64 -Duse-ilp64 would do it, right? Alrighty then, Thomas PS: You might want to fix that one: ../../numpy/meson.build:124: WARNING: Project targets '>=1.2.99' but uses feature introduced in '1.3.0': dep 'blas' custom lookup. -- Dr. Thomas Orgis HPC @ Universität Hamburg _______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com