-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
BLD: bump OpenBLAS version, use OpenBLAS for win-arm64 #29039
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9cf70dc
BLD: bump OpenBLAS version, use OpenBLAS for win-arm64 [wheel build]
mattip c6f764b
Update requirements/ci_requirements.txt
mattip 7ed91ee
use pip to install anaconda-client on win-arm64 [wheel build]
mattip eb7a3d7
allow noblas in win32 wheels, use scipy-openblas32 on win-arm64 [whee…
mattip 66364b8
improve runner arch detection logic [wheel build]
mattip a27c638
remove win_arm64 cibuildwheel override
joerick 5bc41aa
remove 'strip' before calling delvewheel [wheel build]
mattip 93cf510
use openblas 0.3.29.265 only on win-arm64 [wheel build]
mattip 228296a
add comment about lack of win-arm64 openblas64 wheels [wheel build]
mattip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
spin==0.13 | ||
# Keep this in sync with ci_requirements.txt | ||
scipy-openblas32==0.3.29.0.0 | ||
scipy-openblas32==0.3.29.0.0 ; sys_platform != 'win32' or platform_machine != 'ARM64' | ||
scipy-openblas32==0.3.29.265.0 ; sys_platform == 'win32' and platform_machine == 'ARM64' | ||
rgommers marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
spin==0.13 | ||
# Keep this in sync with ci32_requirements.txt | ||
scipy-openblas32==0.3.29.0.0 | ||
scipy-openblas64==0.3.29.0.0 | ||
scipy-openblas32==0.3.29.0.0 ; sys_platform != 'win32' or platform_machine != 'ARM64' | ||
scipy-openblas32==0.3.29.265.0 ; sys_platform == 'win32' and platform_machine == 'ARM64' | ||
# Note there is not yet a win-arm64 wheel, so we currently only exclude win-arm64 | ||
scipy-openblas64==0.3.29.0.0 ; sys_platform != 'win32' or platform_machine != 'ARM64' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,30 +22,40 @@ fi | |
if [[ $(python -c"import sys; print(sys.maxsize)") < $(python -c"import sys; print(2**33)") ]]; then | ||
echo "No BLAS used for 32-bit wheels" | ||
export INSTALL_OPENBLAS=false | ||
elif [[ $(python -c"import sysconfig; print(sysconfig.get_platform())") == "win-arm64" ]]; then | ||
echo "No BLAS used for ARM64 wheels" | ||
export INSTALL_OPENBLAS=false | ||
elif [ -z $INSTALL_OPENBLAS ]; then | ||
# the macos_arm64 build might not set this variable | ||
export INSTALL_OPENBLAS=true | ||
fi | ||
|
||
# Install Openblas from scipy-openblas64 | ||
if [[ "$INSTALL_OPENBLAS" = "true" ]] ; then | ||
echo PKG_CONFIG_PATH $PKG_CONFIG_PATH | ||
# by default, use scipy-openblas64 | ||
OPENBLAS=openblas64 | ||
# Possible values for RUNNER_ARCH in github are | ||
# X86, X64, ARM, or ARM64 | ||
# TODO: should we detect a missing RUNNER_ARCH and use platform.machine() | ||
# when wheel build is run outside github? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That seems useful indeed, so fine to leave this comment in to do this later |
||
# On 32-bit platforms, use scipy_openblas32 | ||
# On win-arm64 use scipy_openblas32 | ||
if [[ $RUNNER_ARCH == "X86" || $RUNNER_ARCH == "ARM" ]] ; then | ||
rgommers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
OPENBLAS=openblas32 | ||
elif [[ $RUNNER_ARCH == "ARM64" && $RUNNER_OS == "Windows" ]] ; then | ||
rgommers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
OPENBLAS=openblas32 | ||
fi | ||
echo PKG_CONFIG_PATH is $PKG_CONFIG_PATH, OPENBLAS is ${OPENBLAS} | ||
PKG_CONFIG_PATH=$PROJECT_DIR/.openblas | ||
rm -rf $PKG_CONFIG_PATH | ||
mkdir -p $PKG_CONFIG_PATH | ||
python -m pip install -r requirements/ci_requirements.txt | ||
python -c "import scipy_openblas64; print(scipy_openblas64.get_pkg_config())" > $PKG_CONFIG_PATH/scipy-openblas.pc | ||
python -c "import scipy_${OPENBLAS}; print(scipy_${OPENBLAS}.get_pkg_config())" > $PKG_CONFIG_PATH/scipy-openblas.pc | ||
# Copy the shared objects to a path under $PKG_CONFIG_PATH, the build | ||
# will point $LD_LIBRARY_PATH there and then auditwheel/delocate-wheel will | ||
# pull these into the wheel. Use python to avoid windows/posix problems | ||
python <<EOF | ||
import os, scipy_openblas64, shutil | ||
srcdir = os.path.join(os.path.dirname(scipy_openblas64.__file__), "lib") | ||
import os, scipy_${OPENBLAS}, shutil | ||
srcdir = os.path.join(os.path.dirname(scipy_${OPENBLAS}.__file__), "lib") | ||
shutil.copytree(srcdir, os.path.join("$PKG_CONFIG_PATH", "lib")) | ||
srcdir = os.path.join(os.path.dirname(scipy_openblas64.__file__), ".dylibs") | ||
srcdir = os.path.join(os.path.dirname(scipy_${OPENBLAS}.__file__), ".dylibs") | ||
if os.path.exists(srcdir): # macosx delocate | ||
shutil.copytree(srcdir, os.path.join("$PKG_CONFIG_PATH", ".dylibs")) | ||
EOF | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.