Update numpy to use OpenBLAS - #6310
Open
jjerphan wants to merge 9 commits into
Open
Conversation
Port the experimental numpy-openblas recipe from emscripten-forge#6194 into numpy so the default package uses OpenBLAS for BLAS and LAPACK. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
jjerphan
force-pushed
the
numpy-use-openblas
branch
3 times, most recently
from
August 21, 2026 08:33
1772cca to
6257f48
Compare
Ship the Python test suite, meson tests-tag C helpers, and hypothesis so np.test() can collect numpy._core and linalg in the browser, and rebuild SciPy against this OpenBLAS-linked NumPy. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
jjerphan
force-pushed
the
numpy-use-openblas
branch
from
August 21, 2026 09:27
7699d85 to
44751df
Compare
Emscripten long double is 128-bit while libc strtold only parses binary64, so unique Dragon4 strings do not parse back. Skip those four tests, using np.dtype(tp).itemsize because the scalar type's .itemsize is a descriptor. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Meson install tags were limited to runtime/python-runtime/tests, which
omits numpy.pc and headers. SciPy's dependency('numpy') then fails at
configure. Include the devel tag as well.
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
Ship SciPy's Meson tests tag into the package and call scipy.test() from pytester so CI exercises the full fast suite, not only smokes. Skip wasm thread, process, and host-libm tests in conftest. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
fft/tests/test_backend.py fails wholesale because set_backend is thread-local. Pytest then aborts on Fortran void/int ABI mismatches during GC; skip that collection and _exit after the session. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
test_bsplines/fitpack hit a function-signature mismatch under llvm-flang's hidden character-length calling convention. Exit the pytest session immediately so destructor GC cannot abort a clean run. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
The full suite aborts on unpatched FITPACK Fortran ABI. Run scipy.linalg and scipy.sparse.linalg, matching NumPy's scoped tests. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
7 tasks
The function-signature mismatch after linalg/tests/test_basic.py also happens on main's NumPy in emscripten-forge#6320, so it is not OpenBLAS-specific. Disable GC, skip the Cython ABI checks, and log tests with -v. Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #6194. This ports the OpenBLAS-linked build from the experimental
numpy-openblasrecipe into the officialnumpyrecipe, and removesnumpy-openblas.The default
numpypackage now uses OpenBLAS for BLAS and LAPACK (-Dallow-noblas=false), with the flang Fortran ABI patch and the BLAS/LAPACK tests from #6194.SciPy pytester stays scoped to
scipy.linalgandscipy.sparse.linalguntil #6320's full-suite diagnostic can finish. Thefunction signature mismatchabort afterlinalg/tests/test_basic.pyalso happens on main's NumPy in #6320 (same ~3647 tests), so it is not caused by OpenBLAS-linked NumPy.Template B: Checklist for updating a package
PR Formatting
Add [package-name]orUpdate [package-name] to [version]Package Details
Build Notes
Same considerations as #6194:
openblasscipy-openblas.pcalias so Meson skips wasm-ld-breaking OpenBLAS symbol probes0001-Match-flang-OpenBLAS-Fortran-ABI-on-Emscripten-wasm32.patchfor flang CHARACTER lengths and void subroutine returnsshow_configBLAS/LAPACK, matmul, Cholesky, solve, and eighThe experimental-channel tag from
numpy-openblasis not copied; this targets the main channel.