SIMD: Fix Highway QSort symbol linking error on aarch32/ASIMD by seiko2plus · Pull Request #28671 · numpy/numpy · GitHub
Skip to content

SIMD: Fix Highway QSort symbol linking error on aarch32/ASIMD#28671

Merged
seiko2plus merged 1 commit into
numpy:mainfrom
seiko2plus:fix_highway_qsort_arm32
Apr 9, 2025
Merged

SIMD: Fix Highway QSort symbol linking error on aarch32/ASIMD#28671
seiko2plus merged 1 commit into
numpy:mainfrom
seiko2plus:fix_highway_qsort_arm32

Conversation

@seiko2plus

Copy link
Copy Markdown
Member

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

@seiko2plus seiko2plus added 00 - Bug component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Apr 8, 2025
@seiko2plus seiko2plus added the 09 - Backport-Candidate PRs tagged should be backported label Apr 8, 2025
  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.
@seiko2plus seiko2plus force-pushed the fix_highway_qsort_arm32 branch from 6d9a2b1 to d634e51 Compare April 8, 2025 11:48
@seiko2plus seiko2plus requested a review from Mousius April 8, 2025 11:48

@Mousius Mousius left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit unfortunate to have the extra levels of indirection, but I think fixing the symbol issue takes precedence 😸

@seiko2plus

Copy link
Copy Markdown
Member Author

@seiko2plus seiko2plus merged commit b7b368a into numpy:main Apr 9, 2025
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug component: SIMD Issues in SIMD (fast instruction sets) code or machinery

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants