Skip to content

MAINT: Move export for scipy arm64 helper into main module#22939

Merged
mattip merged 1 commit intonumpy:mainfrom
seberg:arm64-symbol-export-help
Jan 7, 2023
Merged

MAINT: Move export for scipy arm64 helper into main module#22939
mattip merged 1 commit intonumpy:mainfrom
seberg:arm64-symbol-export-help

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Jan 5, 2023

This is a follow up to gh-22679 which addressed gh-22673.

The main thing is that we want the functions to be available after importing NumPy, so they need to be part of multiarray. However, npymath is a static library, so the symbols are not really exported there. The former PR did actually work in practice but this seems like it is technically the right place?

For some reason, I had to add nextafter to be able to do:

from scipy.spatial.distance import euclidean

with the SciPy 1.9.3 wheels. SciPy test collection works with this for the 1.9.3 wheel, so this should be all the symbols hopefully.


@mattip this was what I figured to solve the internal linking warnings that I have been seeing now. Does this make sense to you?

Maybe it also doesn't matter, since we should pull the whole hack out soon enough.

@seberg
Copy link
Copy Markdown
Member Author

seberg commented Jan 5, 2023

Actually... I am getting that nextafter issue with the SciPy 1.9.3 wheels also on main, so it fixes that up.

This is a follow up to numpygh-22679 which addressed numpygh-22673.

The main thing is that we want the functions to be available after
importing NumPy, so they need to be part of multiarray.
However, `npymath` is a static library, so the symbols are not really
exported there.  The former PR did actually work in practice but this
seems like it is technically the right place?

For some reason, I had to add nextafter to be able to do:

    from scipy.spatial.distance import euclidean

with the SciPy 1.9.3 wheels.  SciPy test collection works with this for
the 1.9.3 wheel, so this should be all the symbols hopefully.
@seberg seberg force-pushed the arm64-symbol-export-help branch from 2b77db3 to d0a613c Compare January 5, 2023 13:49
@mattip
Copy link
Copy Markdown
Member

mattip commented Jan 5, 2023

If I understand correctly, anyone using SciPy 1.9.x from wheels on macos arm64 (which cross-compile and thus do not link correctly to libnpymath.a) and wishing to use NumPy 1.24.x and later will need this fix. It is a mess. Thanks for looking into it.

@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Jan 5, 2023
@mattip mattip merged commit 316f018 into numpy:main Jan 7, 2023
@mattip
Copy link
Copy Markdown
Member

mattip commented Jan 7, 2023

Thanks @seberg

@seberg seberg deleted the arm64-symbol-export-help branch January 7, 2023 10:15
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants