forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
Ilp64 accelerate #21
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
Open
ev-br
wants to merge
143
commits into
main
Choose a base branch
from
ilp64_accelerate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ilp64 accelerate #21
Conversation
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
Co-authored-by: Christian Lorentzen <[email protected]>
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.
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.
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.
Reference issue
What does this implement/fix?
Additional information