Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symbolprefix=scipy #125

Merged
merged 22 commits into from
Nov 14, 2023
Merged

Add symbolprefix=scipy #125

merged 22 commits into from
Nov 14, 2023

Conversation

mattip
Copy link
Collaborator

@mattip mattip commented Oct 29, 2023

It turns out we need to add a symbol prefix in order to use the wheels, otherwise there are clashes with other builds of OpenBLAS and/or other BLAS implementations. This adds a SYMBOLPREFIX=scipy to these builds. Also

  • update the OpenBLAS hash to latest HEAD
  • update the OpenBLAS and multibuild subrepos (not necessarily required)

@mattip
Copy link
Collaborator Author

mattip commented Nov 3, 2023

This is ready if anyone wants to review. I don't think we need to change the wheel names for the changed function names. This is a new version 0.3.24.95 and the changed prefix requires no external code changes.

fi
# if [ "macos-11" == "${{ matrix.os }}" ]; then
# echo "LDFLAGS=-L/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib" >> $GITHUB_ENV;
# echo "LIBRARY_PATH=-L/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/lib" >> $GITHUB_ENV;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll note that if this is needed again in the future or changes, there's a better way than hardcoding it. The path can be obtained from xcrun --sdk macosx --show-sdk-path. I just managed to get rid of this hardcoding in numpy CI.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment in the commit to add the BLAS_SYMBOL_PREFIX definition to the pkgconfig file

@mattip
Copy link
Collaborator Author

mattip commented Nov 14, 2023

Currently if you use the ILP64 builds, you have to add -Duse-ilp64=true which ends up defining OPENBLAS_ILP64_NAMING_SCHEME. We have cflags in the pkgconfig file, so I added the macro there. Once use of these newer wheels is normalized we can remove the meson flag.

@rgommers
Copy link
Collaborator

We can't in general, because there are libraries that have both LP64 and ILP64 symbols. True right now for at least MKL and Accelerate, and may also be true for OpenBLAS sometime next year (after reference BLAS/LAPACK adopts it). It has to be a user opt-in. It may be okay for the opt-in to be automatic for scipy-openblas, less sure of that.

@mattip
Copy link
Collaborator Author

mattip commented Nov 14, 2023

It may be okay for the opt-in to be automatic for scipy-openblas, less sure of that.

It worked locally, with the latest commit I can do

PKG_CONFIG_PATH=$PWD/.openblas
pip install scipy-openblas64
spin build --with-scipy-openblas=64  # without -- -Duse-ilp64=true

@mattip mattip merged commit aacba21 into MacPython:main Nov 14, 2023
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants