Skip to content

SIMD: Resolve Highway QSort symbol linking error on aarch32/ASIMD #28682

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

charris
Copy link
Member

@charris charris commented Apr 10, 2025

Backport of #28671.

The fix in numpy/meson#12 for ASIMD*(32-bit) compile-time feature detection revealed a new
build error on aarch32 platforms:

ImportError: /numpy/build-install/usr/lib/python3/dist-packages/numpy/_core/
_multiarray_umath.cpython-310-arm-linux-gnueabihf.so: undefined symbol:
_ZN2np7highway10qsort_simd11QSort_ASIMDIjEEvPT_i

This patch prevents platform detection constants of Highway from being exposed across
translation units with different compiler flags (baseline). This approach
eliminates detection mismatches that were causing symbol resolution failures
in the Highway QSort implementation.

relates numpy/meson#12

  The fix in numpy/meson#12 for ASIMD*(32-bit) compile-time feature detection revealed a new
  build error on aarch32 platforms:

    ImportError: /numpy/build-install/usr/lib/python3/dist-packages/numpy/_core/
    _multiarray_umath.cpython-310-arm-linux-gnueabihf.so: undefined symbol:
    _ZN2np7highway10qsort_simd11QSort_ASIMDIjEEvPT_i

  This patch prevents platform detection constants of Highway from being exposed across
  translation units with different compiler flags (baseline). This approach
  eliminates detection mismatches that were causing symbol resolution failures
  in the Highway QSort implementation.
@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Apr 10, 2025
@charris charris added this to the 2.2.5 release milestone Apr 10, 2025
@charris charris merged commit afd73fd into numpy:maintenance/2.2.x Apr 10, 2025
70 checks passed
@charris charris deleted the backport-28671 branch April 10, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 08 - Backport Used to tag backport PRs component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants