On Tue, Apr 22, 2025 at 11:42 AM Marc Culler <marc.cul...@gmail.com> wrote:
> However, FYI, it looks like scipy is also using the Accelerate framework. > > scipy/linalg/_fblas.cpython-313-darwin.so loads > /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate > > and the dylibs included with the scipy binary package by delocate are: > libgcc_s.1.1.dylib libgfortran.5.dylib libquadmath.0.dylib > I was assuming https://github.com/scipy/scipy/wiki/Dropping-support-for-Accelerate is still valid, but it's now archived, as obsolete, I suppose. Also, confusingly, Homebrew numpy and scipy use openblas. To double-check, I did pip install numpy in a venv, and got % otool -L a/lib/python3.12/site-packages/numpy/_core/_ multiarray_umath.cpython-312-darwin.so a/lib/python3.12/site-packages/numpy/_core/_ multiarray_umath.cpython-312-darwin.so: /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1345.120.2) (and ditto for scipy) Well, this actually is good news! I think we have most blas/lapack dependent spkgs available in one or another way on Homebrew, and they use Accelerate: namely, the following Homebrew formulae: in "core" gsl (doesn't link any external blas/lapack) suite-sparse (spkg suitesparse) in Macaulay2/homebrew-tap: csdp fflas-ffpack linbox Wheel on PyPI numpy scipy igraph (optional, doesn't link any external blas/lapack) ------------------------------ Available on Homebrew, but in openblas flavour only: papilo (optional) cbc (optional) numpy (but PyPI wheels use Acceletate!) scipy (but PyPI wheels use Acceletate!) Not there: iml cvxopt (PyPI wheel links to openblas) dsdp (optional) ---------------------------------------- Thus, only iml and cvxopt, and 4 optional packages need work on this. And sagelib, naturally. Dima > - Marc > > On Tue, Apr 22, 2025 at 11:31 AM Marc Culler <marc.cul...@gmail.com> > wrote: > >> Answering my own question, it looks like >> site-packages/numpy/linalg/lapack_lite.cpython-313-darwin.so >> loads >> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate >> So the answer would seem to be no, and the numpy binary pypi package >> probably outperforms the sage spkg version of numpy on macOS. >> >> But this is really another topic. Sorry. We should stick to discussing >> the python3 spkg. >> >> - Marc >> >> On Tue, Apr 22, 2025 at 11:21 AM Dima Pasechnik <dimp...@gmail.com> >> wrote: >> >>> you will get a binary wheel with openblas dylib packed in, >>> as far as I understand. >>> (same with scipy - I am not completely sure how they share openblas >>> among themselves) >>> >>> >>> On 22 April 2025 10:49:32 GMT-05:00, Marc Culler <marc.cul...@gmail.com> >>> wrote: >>> >>>> >>>> I am not sure we want different Python modules using different >>>>> lapack/blas implementations. >>>>> >>>> >>>> Would that happen if the Sage numpy spkg were replaced with a simple >>>> pip install of a binary numpy package from pypi? >>>> (I.e. numpy-2.2.5-cp313-cp313-macosx_11_0_arm64.whl or >>>> numpy-2.2.5-cp313-cp313-macosx_10_13_x86_64.whl .) >>>> >>>> - Marc >>>> >>> -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sage-devel/CAAWYfq0Mj4MTUzbwt2rWg7zCzthu7yW03fnTWbfY7fy7TA3wJw%40mail.gmail.com.