Skip to content

Adding newly shared SVML Float16 HA imlementation - #9

Open
r-devulap wants to merge 3 commits into
numpy:mainfrom
r-devulap:fp16-ha
Open

Adding newly shared SVML Float16 HA imlementation#9
r-devulap wants to merge 3 commits into
numpy:mainfrom
r-devulap:fp16-ha

Conversation

@r-devulap

@r-devulap r-devulap commented Aug 21, 2026

Copy link
Copy Markdown
Member

Intel open sourced and shared the AVX-512 FP16 high-accuracy (HA) functions. Adding them here to the repo.

Functions added: acos, acosh, asin, asinh, atan, atan2, atanh, cbrt, cos, cosh, exp, exp2, exp10, expm1, log, log2, log10, log1p, pow, sin, sinh, tan, tanh.

It looks to me that these use FP32 internally to meet accuracy requirements. Current strategy in NumPy is to do that exactly: we convert to FP32, use the FP32 SVML functions and recovert back to FP16 which can all be done using the base AVX512 SKX ISA using vcvtph2ps (which doesn't need AVX512_FP16).

Functions added: acos, acosh, asin, asinh, atan, atan2, atanh, cbrt,
cos, cosh, exp, exp2, exp10, expm1, log, log2, log10, log1p, pow,
sin, sinh, tan, tanh
Add .section .note.GNU-stack,"",@progbits to all 23 FP16 HA
assembly files.
- Add endbr64 at every function entry point for IBT (Indirect Branch
  Tracking) support
- Add .note.gnu.property section declaring IBT (0xc0000002) and
  shadow stack (0x00000003) compatibility flags
@r-devulap r-devulap changed the title Adding new shared SVML Float16 HA imlementation Adding newly shared SVML Float16 HA imlementation Aug 21, 2026
@r-devulap
r-devulap requested a review from seberg August 21, 2026 05:13
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