Skip to content

BLD: Win arm64 adding openblas to gh build #27410

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

Closed

Conversation

SlobodanMiletic
Copy link
Contributor

Adding openblas to the git hub build of windows arm64 wheel. This is temporary solution until the native builds become available.
As there is still no appropriate fortran cross-compiler that is needed for openblas this build is using prebuilt openblas binaries built by linaro project (linaro organization is currently driving the changes needed for win arm64). When scipy-openblas becomes available build can be changed to link with it

@@ -5,6 +5,7 @@ on:

env:
python_version: 3.12
open_blas_link: "https://woastorage.blob.core.windows.net/packages/openblas/openblas_v0.3.27.zip"
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately I think this might be a security hazard, linking against a binary blob whose provenance we can't keep track of.

Copy link
Contributor Author

@SlobodanMiletic SlobodanMiletic Sep 17, 2024

Choose a reason for hiding this comment

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

Ok. I expected similar response, but I wanted to check what do you think about this, as I couldn't find appropriate Fortran cross compiler binary. This is the reason I extracted the link to be obvious, and hoped that maybe linaro would be acceptable as they are driving windows arm changes all across the open source community.
Gcc toolchain for cross-compilation should be available in a few months, but that would be the time when native builders would become available. In fact native Win and Linux arm64 runners should already be available for some customers, but I am not sure what is the NumPy community billing plan, and I have free GitHub account so I cannot see those.
I compiled the version of the flang-new and added a few additional binaries to make it work, but this build is taking several hours so it is not a solution for the NumPy. I also built win arm64 openblas natively to test the performance but that is also not a solution here.
I will try to rethink if there is some different solution.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be more appropriate to discuss this at https://github.com/MacPython/openblas-libs. That is where the scipy-openblas wheels are built. We already cross-compile under a qemu docker for aarch64 (which takes over 2 hours), we could do something similar for arm64-windows if there is a way to do that.

@mattip
Copy link
Member

mattip commented Sep 17, 2024

How is the linaro project building OpenBLAS? Maybe they could contribute the recipes to OpenBLAS and the wheel building MacPython/openblas-libs?

@SlobodanMiletic
Copy link
Contributor Author

How is the linaro project building OpenBLAS? Maybe they could contribute the recipes to OpenBLAS and the wheel building MacPython/openblas-libs?
As I understood from their confluence they have their nightly build farm with native win arm64 runners so they do not need to cross compile and they are building simple builds. They do not have some flags scipy-openblas uses for building (It is linking with windows libraries dynamicaly and has diferent MAX_THREADS number), but performance of the numpy when link with the library is on par with the scipy-openblas

@charris charris added the 36 - Build Build related PR label Sep 18, 2024
@charris charris changed the title Win arm64 adding openblas to gh build BLD: Win arm64 adding openblas to gh build Sep 18, 2024
@Mousius
Copy link
Member

Mousius commented Sep 25, 2024

How is the linaro project building OpenBLAS? Maybe they could contribute the recipes to OpenBLAS and the wheel building MacPython/openblas-libs?

https://gitlab.com/Linaro/windowsonarm/packages/openblas

@mattip
Copy link
Member

mattip commented Sep 25, 2024

Thanks @Mousius. That seems to be a one-line (or almost one-line) build. How would we set up the clang-cl environment so it would cross-compile using that recipe for arm64 on a x86_64 host, including finding fortran compilers?

@HinTak
Copy link
Contributor

HinTak commented May 4, 2025

Btw, there is a noblas build #28836 on the new native arm64 windows hosts.

@rgommers
Copy link
Member

rgommers commented Jun 8, 2025

This is now completely supported after gh-29039, so I will close this PR. Thank you for your contribution @SlobodanMiletic

@rgommers rgommers closed this Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
36 - Build Build related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants