Skip to content

Fix FP32 log IEEE-754 handling in NEON and SVE - #1326

Open
harshith-roy wants to merge 2 commits into
ARM-software:mainfrom
harshith-roy:fix-log-ieee754-soft-relu-overflow
Open

harshith-roy wants to merge 2 commits into
ARM-software:mainfrom
harshith-roy:fix-log-ieee754-soft-relu-overflow

Conversation

@harshith-roy

Copy link
Copy Markdown

Summary

This change improves IEEE-754 exceptional-value handling and subnormal accuracy in the NEON and SVE FP32 logarithm implementations.

It also fixes an FP16 SOFT_RELU overflow regression exposed by the corrected logarithm behavior.

Changes

  • Add IEEE-754 classification and exceptional-value handling to NEON and SVE FP32 Log.
  • Handle positive FP32 subnormal inputs through normalization.
  • Return appropriate results for zero, negative inputs, infinities and NaNs.
  • Preserve the legacy logarithm implementation for Pow to avoid changing its existing behavior.
  • Fix FP16 SOFT_RELU overflow handling in NEON and SVE.
  • Add regression tests for exceptional logarithm inputs, vector boundaries, subnormal accuracy and SOFT_RELU overflow.

Validation

Validated using AArch64 cross-compilation and QEMU user-mode emulation.

  • NEON ElementwiseLog: 213/213
  • SVE ElementwiseLog: 213/213 at vector lengths 16, 32 and 64 bytes.
  • NEON ActivationLayer: 929/929
  • SVE ActivationLayer: 929/929 at vector lengths 16, 32 and 64 bytes.
  • NEON Softmax and LogSoftmax: 528/528.

Both NEON and SVE builds passed with warnings treated as errors.

Note: Runtime validation was performed under QEMU, not physical ARM hardware.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant