GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BLD: use newly released OpenBLAS 0.3.30, use ILP64 on win_arm64 by mattip · Pull Request #29280 · numpy/numpy

Conversation

@mattip

@mattip mattip commented Jun 26, 2025

Copy link
Copy Markdown
Member

OpenBLAS 0.3.30 was recently released, let's use it. Since we now have scipy-openblas64 wheels for win_arm64, use those in the wheel build.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mattip
BLD: use newly released OpenBLAS 0.3.30, use ILP64 on win_arm64 [whee…
57026e2
…l build]
@github-actions github-actions Bot added the 36 - Build Build related PR label Jun 26, 2025
@mattip

mattip commented Jun 26, 2025

Copy link
Copy Markdown
Member Author

On cirrusCI in the first cibuildwheel iteration (python3.11) of the macos_arm64 build these tests are failing, pointing to a problem with OpenBLAS. The dtype seems to always be float32, but the tests with a * test many dtypes and float32 appears first in the list of dtypes to try:

test_ufunc_noncontiguous[matmul] with dtype float32*
TestEinsum.test_einsum_sums_float32
TestMethods.test_arr_mult[dot] with float32*
TestMethods.test_arr_mult[matmul] with float32*
TestMatmul.test_matrix_matrix_values with float32*
TestMatmul.test_dot_equivalent_matrix_matrix_blastypes[float32]
TestMatmulOperator.test_matrix_matrix_values with float32*
TestInv.test_generalized_sq_cases with float32*

and more in total 44 tests failed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip

mattip commented Jun 27, 2025

Copy link
Copy Markdown
Member Author

Locally, the cirrusCI failure does not reproduce on a macbook pro m2 with clang 17.0.0. However locally I can reproduce the 2 failures from the 'transition to github CI" PR #29069. CirrusCI uses clang 16.0.0, the PR uses clang 15.0.0, so I don't think it is a compiler problem.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ngoldbaum

ngoldbaum commented Jun 27, 2025

Copy link
Copy Markdown
Member

I can also reproduce those two failures on my mac.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip

mattip commented Jun 28, 2025

Copy link
Copy Markdown
Member Author

It reproduces on scipy-openblas32 as well, and reproduces all the way back to the first scipy-openblas macos_arm64 packages 0.3.24.95.0. The warnings are emitted in zgetrf. Using a homebrew installed gcc-14.2.0 and building OpenBLAS 0.3.30 makes the warnings disappear and all the tests pass.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip

mattip commented Jun 29, 2025

Copy link
Copy Markdown
Member Author

I am stuck.

  • I don't see why only in zgetrf the floating point error states are set when using clang but not when using gcc, maybe there is a flag missing?
  • I tried to replace clang with gcc in the openblas-lib build in use gcc from homebrew MacPython/openblas-libs#207, but somehow I am setting the cross-compilation up improperly, so the macos-arm64 builds fail.

@martin-frbg any hints how to move past the failures? Do you know off-hand what kernel is used by zgetrf on macos-arm64?

Maybe we can wrap the call and manually reset the flags on macos-arm64?

numpy/numpy/linalg/umath_linalg.cpp

Line 821 in 2bb4005

return LAPACK(zgetrf)(m, n, a, lda, ipiv, info);

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@martin-frbg

martin-frbg commented Jun 29, 2025

Copy link
Copy Markdown

getrf is reimplemented via ztrsm&zgemm (or as getf2 using zgemv&zscal when the problem size is small enough. if you are building for either Apple M or generic ARMV8 that should mean trsm as generic C code ( unlikely to be an issue) zgemv, zgemm and zscal all using the same assembly that any other non-SVE target uses.
no obvious candidate among them that got major changes in 0.3.30 IIRC

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip

mattip commented Jun 29, 2025

Copy link
Copy Markdown
Member Author

Thanks. If I go back to 0.3.24, I still see the FPE registers set in zgetrf on that platform in a very small problem (2x2 matrix). I think the OpenBLAS build uses the native clang compilers. I tried using the same homebrew clang compiler as you do in the OpenBLAS CI, but still got the FPE register errors.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip

mattip commented Jun 29, 2025

Copy link
Copy Markdown
Member Author

I worked around the problem in a different PR to use github to build the NumPy wheels by resetting the registers after a call to zgetrf.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip

mattip commented Jul 3, 2025

Copy link
Copy Markdown
Member Author

Replaced by #29069

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mattip mattip closed this Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

36 - Build Build related PR

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mattip @ngoldbaum @martin-frbg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.