Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CI: Replace QEMU armhf with native (32-bit compatibility mode) #28663

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 6, 2025

Conversation

charris
Copy link
Member

@charris charris commented Apr 6, 2025

Backport of #28653.

This PR enhances support for ARM platforms with several important fixes:

  1. Native ARMv7/armhf Testing: Adds a new CI workflow that tests NumPy on 32-bit ARM hard-float (armhf) using 32-bit compatibility mode on ARM64 GitHub runners, replacing the previous QEMU-based approach for more reliable and faster testing.

  2. ARMv8 32-bit Feature Detection: Fixes detection of advanced ARMv8 features (FPHP, ASIMDHP, ASIMDDP, ASIMDFHM) when running in 32-bit mode (aarch32), and addresses memory leaks in CPU feature detection on Android.

  3. ARM Floating-Point Error Handling: Adds protection against floating-point errors when processing positive infinity values in SIMD sqrt operations on ARMv7 architectures.

  4. Subnormal Number Handling: Adds an xfail marker for linspace tests with subnormal numbers on ARM32 platforms, addressing the platform-specific behavior where subnormals are flushed to zero.

relates #24548, #28635

  • CI: Tests NumPy on 32-bit ARM hard-float (armhf) via compatibility mode

  • BUG, SIMD: Fix floating-point errors with positive infinity input in sqrt on armhf

    Guards against passing positive infinity to vrsqrteq_f32 in sqrt operation,
    which would raise invalid floating-point errors on ARMv7 architectures.

  • TEST: Mark linspace subnormal test as xfail on ARM32 platforms

    Adds an xfail marker to the linspace subnormal test case for ARMv7 and AArch32
    platforms. These platforms seem to flush subnormals to zero (FTZ) even when
    not explicitly enabled via the FPSCR register, causing the test to fail.

  • BUG, SIMD: Fix ARMv8 feature detection in 32-bit mode

    Fix detection of FPHP, ASIMDHP, ASIMDDP, ASIMDFHM features
    on ARMv8 32-bit mode (aarch32). Fix memory leaks in CPU feature
    detection on Android by adding missing free() calls.

  • CI: Remove QEMU-based armhf testing

    Remove QEMU-based armhf testing as we now use native 32-bit compatibility
    mode running on ARM64 GitHub runners in a separate implementation.

…#28653)

* CI: Tests NumPy on 32-bit ARM hard-float (armhf) via compatibility mode

* BUG, SIMD: Fix floating-point errors with positive infinity input in sqrt on armhf

  Guards against passing positive infinity to vrsqrteq_f32 in sqrt operation,
  which would raise invalid floating-point errors on ARMv7 architectures.

* TEST: Mark linspace subnormal test as xfail on ARM32 platforms

  Adds an xfail marker to the linspace subnormal test case for ARMv7 and AArch32
  platforms. These platforms seem to flush subnormals to zero (FTZ) even when
  not explicitly enabled via the FPSCR register, causing the test to fail.

* BUG, SIMD: Fix ARMv8 feature detection in 32-bit mode

  Fix detection of `FPHP`, `ASIMDHP`, `ASIMDDP`, `ASIMDFHM` features
  on ARMv8 32-bit mode (aarch32). Fix memory leaks in CPU feature
  detection on Android by adding missing free() calls.

* CI: Remove QEMU-based armhf testing

  Remove QEMU-based armhf testing as we now use native 32-bit compatibility
  mode running on ARM64 GitHub runners in a separate implementation.
@charris charris added 00 - Bug 05 - Testing 08 - Backport Used to tag backport PRs component: CI component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Apr 6, 2025
@charris charris added this to the 2.2.5 release milestone Apr 6, 2025
@charris charris merged commit 9f2ce36 into numpy:maintenance/2.2.x Apr 6, 2025
67 of 70 checks passed
@charris charris deleted the backport-28653 branch April 6, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 05 - Testing 08 - Backport Used to tag backport PRs component: CI 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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.