Skip to content

Update numpy to use OpenBLAS - #6310

Merged
ianthomas23 merged 2 commits into
emscripten-forge:mainfrom
jjerphan:numpy-use-openblas
Sep 11, 2026
Merged

ianthomas23 merged 2 commits into
emscripten-forge:mainfrom
jjerphan:numpy-use-openblas

Conversation

@jjerphan

@jjerphan jjerphan commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #6194. Based on main after Update numpy to run the full test suite #6676 (itself after Add numpy-tests #6610).

This PR only switches the official numpy recipe to OpenBLAS and removes numpy-openblas. The numpy-tests split and np.test(label="full") runner already landed in the PRs above.

The default numpy package now uses OpenBLAS for BLAS and LAPACK (-Dallow-noblas=false), with the flang Fortran ABI patch and the BLAS/LAPACK smokes from #6194. SciPy could be tested against the new builds of OpenBLAS (see #6320).

Template B: Checklist for updating a package

  • ⚠️ Bump build number if the version remains unchanged
  • Or reset build number to 0 if updating the package to a newer version

PR Formatting

  • PR title follows format: Add [package-name] or Update [package-name] to [version]
  • PR description includes:
    • Version being added/updated
    • Any special build considerations or patches applied

Package Details

  • Package Name: numpy / numpy-tests
  • Version: 2.5.3 (build 3)

Build Notes

Same considerations as #6194:

  • Host/run dependency on openblas
  • Build-local scipy-openblas.pc alias so Meson skips wasm-ld-breaking OpenBLAS symbol probes
  • Patch 0002-Match-flang-OpenBLAS-Fortran-ABI-on-Emscripten-wasm32.patch for flang CHARACTER lengths and void subroutine returns
  • Patch 0003-Silence-clang-warnings-on-Emscripten-wasm32.patch for emcc/clang 21 diagnostics (32-bit npy_uintp vs INT64_MAX, unused CPU-dispatch helpers, int-max to float rounding). Not OpenBLAS-specific.
  • Tests cover show_config BLAS/LAPACK, matmul, Cholesky, solve, and eigh on numpy

Wasm test skips and the numpy-tests suite runner are in #6676. The experimental-channel tag from numpy-openblas is not copied; this targets the main channel.

@jjerphan jjerphan changed the title Build the official numpy recipe against OpenBLAS Update numpy to use OpenBLAS Aug 20, 2026
@jjerphan
jjerphan force-pushed the numpy-use-openblas branch 4 times, most recently from 7699d85 to 44751df Compare August 21, 2026 09:27
@jjerphan jjerphan mentioned this pull request Aug 21, 2026
3 of 7 tasks
@jjerphan

jjerphan commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

SciPy is not rebuilt in this PR. For now we only want to verify that the NumPy test suite passes (numpy._core and numpy.linalg) on the OpenBLAS-linked build. A later PR can rebuild SciPy against this NumPy (see #6320).

@jjerphan jjerphan mentioned this pull request Sep 8, 2026
11 of 12 tasks
@jjerphan

jjerphan commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

numpy-tests is now an additional output of the numpy recipe (same split as scipy-tests in #6334). Runtime stays in numpy; test modules and C helpers go in numpy-tests, which runs np.test().

Standalone packaging PR without the OpenBLAS switch: #6610.

@jjerphan

jjerphan commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Compared np.test(label="full") with the allow-noblas control (#6613). Failures match; they are wasm longdouble / packaging, not OpenBLAS.

#6613 (allow-noblas, 2.5.2) this PR (OpenBLAS, 2.5.3)
Ubuntu 7 failed, 47427 passed 3 failed, 47511 passed

The extra four control failures are the print round-trips already skipped here (0002). Shared remaining cases (quantile longdouble 0.4 and typing.tests.test_isfile) are skipped in 0004. Control PR #6613 is closed.

@jjerphan
jjerphan force-pushed the numpy-use-openblas branch 2 times, most recently from 5322539 to a6a0cb9 Compare September 10, 2026 09:40
@jjerphan jjerphan mentioned this pull request Sep 10, 2026
3 of 7 tasks
@jjerphan

Copy link
Copy Markdown
Contributor Author

Rebased onto #6676 so this PR only applies the OpenBLAS switch:

Review the OpenBLAS delta at jjerphan/recipes@numpy-run-full-test-suite...numpy-use-openblas

@jjerphan

Copy link
Copy Markdown
Contributor Author

Rebased onto the updated #6676 after that PR was rebased onto main.

@jjerphan
jjerphan force-pushed the numpy-use-openblas branch 3 times, most recently from 163b8e6 to 03d40a9 Compare September 11, 2026 06:43
Port the experimental numpy-openblas recipe into numpy so the default
package uses OpenBLAS for BLAS and LAPACK, and drop numpy-openblas.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
The OpenBLAS-linked rebuild follows the full-suite rebuild at build 2.

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>

@ianthomas23 ianthomas23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @jjerphan.

In particular thanks for the copious clear documentation making it easy to review.

@ianthomas23
ianthomas23 merged commit 7ef2306 into emscripten-forge:main Sep 11, 2026
3 checks passed
@jjerphan
jjerphan deleted the numpy-use-openblas branch September 11, 2026 09:19
@ianthomas23 ianthomas23 mentioned this pull request Oct 8, 2026
2 of 4 tasks
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