Skip to content

Conversation

@ev-br
Copy link
Owner

@ev-br ev-br commented Apr 7, 2025

Reference issue

What does this implement/fix?

Additional information

ev-br and others added 30 commits March 10, 2025 12:05
TST: optimize: add test for VectorFunction with sparse_jacobian=False
This makes tests pass under pytest-run-parallel; the logic
was already broken for use of the default build with Python-level
threads (e.g., through the `threading` module) though.
This is per-module global state that wasn't robust against
altering it from separate threads.
Also tweak the refcounting test's skip condition to be more
accurate. It would have failed under Pyston and other interpreters
than CPython and PyPy otherwise.
It's always defined for Python >=3.7, threadless builds no longer
exist.
)

* TST: special: remove test skips due to upstream issue

* MAINT: Update requirements/test.txt

* STY/CI: fix lint, adjust required array-api-strict version
ev-br and others added 28 commits April 6, 2025 11:16
`qhull.pyx` uses cython_lapack, so linking is done at the build time.
NB: and if anything, Qhull might not be 64-bit int ready, so it'll
probably need an LP64 LAPACK.
Violations observed on linux with MKL in the ILP64 mode.
It otherwise segfaults. Needs using BLAS_FUNC maybe?
32-bit LAPACK builds generate the `blas_lapack_wrapper.so` library
which contains trampolines from F_FUNC to BLAS_FUNC mangling
(i.e. create dgemm_ as a synonym for scipy_dgemm_ etc).
Then f2py uses F_FUNC mangled symbols, and which get picked up
from the wrappers.

With ILP64 builds this approach may lead to symbol clashes:
at least the MKL _ilp64.so variants contain two kinds of symbols:
both `dgemm_64_` and `dgemm_`.
We want to only use the former (is dgemm_ 32- or 64-bit?).

Therefore, we instead force the BLAS_FUNC mangling at the f2py level:
inject a 'usercode' section into f2py-generated C files and replace
the F_FUNC define with BLAS_FUNC.
This relies on the fact that f2py includes the usercode section _after_
its F_FUNC define.
@ev-br ev-br closed this Apr 8, 2025
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.