GPU: preserve NaN and round normal ties to even in primitive::f32_to_half #335
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/335"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by towiice on 2026-11-24T23:34:57Z.
Summary
Fixes #245.
In \crates/victory-gpu/src/primitive.rs, \32_to_half\ previously checked \if exp >= 31 { return sign | 0x7c00; }\ without distinguishing an incoming \NaN\ (
aw_exp == 0xff && man != 0) from overflow/infinity, turning any \NaN\ produced during \F16\ rectangle corner expansion (\0 + v2 - v1, e.g. \inf - inf\ or an \
Imported from fxceless/victory-fork. Originally posted by towiice on 2026-11-25T00:36:58Z.
Closing: this duplicates my earlier #315 for #245, which I opened first and which has the fuller test and description. Sorry for the noise.
Pull request closed