GPU: preserve NaN and round normal ties to even in primitive::f32_to_half #335
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!335
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/335/head"
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?
@towiice on GitHub · 2026-11-24 23:34 UTC · original
towiice:fix/primitive-fp16-nan-and-ties-to-even→main· +53 −4 · 1 files · 1 commits · closed without mergingSummary
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 \
@towiice on GitHub · 2026-11-25 00:36 UTC · original
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