Skip to content
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

f16x8.demote_f64x2_zero #2

Open
SPY opened this issue Apr 2, 2024 · 0 comments
Open

f16x8.demote_f64x2_zero #2

SPY opened this issue Apr 2, 2024 · 0 comments

Comments

@SPY
Copy link
Collaborator

SPY commented Apr 2, 2024

Do we need direct conversion from F64 lanes to F16?
Recently, we discovered there is pure support on x64 for direct f64 -> f16 conversion.
F64 to F16 conversion with roundToEven semantic couldn't be efficiently implemented on x64 without AVX512-FP16(so, only Sapphire Rapids Xeon support it today).
We can introduce f16x8.demote_f64x2_zero with roundToZero rounding, so it will be composable with f64 -> f32 -> f16 conversions, but today roundToEven semantic is a default on the Web and such instruction could be easily emulated with f32x4.demote_f64x2_zero + f16x8.demote_f32x4_zero
On the other side Arm64 supports direct F64 -> F16 conversion with roundToEven rounding mode, but without f16x8.demote_f64x2_zero it won't be possible to use it.

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

No branches or pull requests

1 participant