Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Fix FP overflow error in division when the divisor is scalar #25191

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 2 commits into from
Nov 19, 2023

Conversation

charris
Copy link
Member

@charris charris commented Nov 19, 2023

Backport of #25129.

The bug occurred when SIMD partial load was involved,
due to filling remaining lanes of the dividend vector
with ones, which leads to raised overflow warnings
when the divisor is denormal.

This patch replaces the remaining lanes with nans rather
than ones to fix this issue.

closes #25097

@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Nov 19, 2023
@charris charris added this to the 1.26.3 release milestone Nov 19, 2023
  The bug occurred when SIMD partial load was involved,
  due to filling remaining lanes of the dividend vector
  with ones, which leads to raised overflow warnings
  when the divisor is denormal.

  This patch replaces the remaining lanes with nans rather
  than ones to fix this issue.
  The decision is based on the lack of native SIMD support for
  this operation in the armhf architecture, and the associated challenges
  in performance and evaluate the benefits of emulated SIMD intrinsic versus
  native scalar division.
@charris charris merged commit 9d49d1b into numpy:maintenance/1.26.x Nov 19, 2023
@charris charris deleted the backport-25129 branch November 19, 2023 22:17
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