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) #28653

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 5 commits into from
Apr 6, 2025

Conversation

seiko2plus
Copy link
Member

@seiko2plus seiko2plus commented Apr 5, 2025

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

…sqrt on armhf

  Guards against passing positive infinity to vrsqrteq_f32 in sqrt operation,
  which would raise invalid floating-point errors on ARMv7 architectures.
@seiko2plus seiko2plus force-pushed the ci_armhf_compatibility_mode branch from 781424d to a0c6c20 Compare April 5, 2025 13:48
  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.
@seiko2plus seiko2plus added 00 - Bug 05 - Testing 09 - Backport-Candidate PRs tagged should be backported component: CI component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Apr 6, 2025
@seiko2plus seiko2plus force-pushed the ci_armhf_compatibility_mode branch from 107a44b to 37d82ae Compare April 6, 2025 12:08
  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.
@seiko2plus seiko2plus force-pushed the ci_armhf_compatibility_mode branch from 37d82ae to 0668e83 Compare April 6, 2025 16:14
  Remove QEMU-based armhf testing as we now use native 32-bit compatibility
  mode running on ARM64 GitHub runners in a separate implementation.
@seiko2plus seiko2plus changed the title CI: Tests NumPy on armhf via compatibility mode CI: Replace QEMU armhf with native ARMHF (32-bit compatibility mode) Apr 6, 2025
@seiko2plus seiko2plus changed the title CI: Replace QEMU armhf with native ARMHF (32-bit compatibility mode) CI: Replace QEMU armhf with native (32-bit compatibility mode) Apr 6, 2025
@seiko2plus seiko2plus marked this pull request as ready for review April 6, 2025 16:28
@charris charris merged commit 69f4df3 into numpy:main Apr 6, 2025
72 checks passed
@charris
Copy link
Member

charris commented Apr 6, 2025

Thanks Sayed. I'm a bit nervous about a backport, let's see how it goes.

charris pushed a commit to charris/numpy that referenced this pull request Apr 6, 2025
…#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 removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 6, 2025
@seiko2plus
Copy link
Member Author

Thanks Sayed. I'm a bit nervous about a backport, let's see how it goes.

Seems good for now, no worries. I will follow up on any new related issues. Thank you Charles for the quick merge and backport.

MaanasArora pushed a commit to MaanasArora/numpy that referenced this pull request Apr 11, 2025
…#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 05 - Testing 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.