rdna2_silicon: compare f16 FMA NaN results as a class on hardware GPUs (fixes #194) #197
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
library
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/omonkeyz--xbox-emulator!197
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/197/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?
@SchmashinPrunes on GitHub · 2026-11-23 00:46 UTC · original
SchmashinPrunes:rdna2-silicon-nan-class→main· +29 −0 · 3 files · 1 commits · closed without mergingFixes #194, as proposed there.
Library / area: tombox-xshader tests (
exec_vop/rdna2_silicon.rs),tools/rdna2-hwprobe/verify_gen.py,docs/BLOCKERS.mdExports changed (exports.txt rows): none
Change
rdna2_silicon_results: whenTOMBOX_EXEC_HWis set, f16 FMA cases (v_fmac_f16,v_fmamk_f16,v_fmaak_f16) whose recorded gfx1036 result is a NaN compare as a NaN class. For each such case the test checks two things:v_cmp_class_f16with the signalling and quiet NaN classes (mask 3) gives 1;It prints how many cases took that path. Every other case, and every case on WARP, is still compared bit-exact.
Sign isn't part of the class check, because the NaN in #194 also differs in sign (
0x7ffffrom the RTX 3080,0xfe00recorded). IEEE leaves the sign of a propagated NaN unspecified.verify_gen.pywrites the new test body. The recordedCASEStable is byte-identical to main's, regenerated from the same recordings.docs/BLOCKERS.md: a new entry saying RDNA2 f16 FMA NaN propagation isn't modelled on non-AMD hosts. It also notes the signalling-NaN-unquieted behaviour that the recordings leave out.Tests (Windows 11 Pro, DXC 1.9.2609, on
c4e72f0)The 33 cases are the ones listed in #194. My hardware-mode GPU is AMD (RDNA4), so this shows the new path runs and passes, but not the NVIDIA failure itself. @kiwe147, could you rerun
TOMBOX_EXEC_HW=1 cargo test -p tombox-xshader --test exec rdna2_siliconon the RTX 3080 with this branch?cargo test -p tombox-xshaderpasses🤖 Generated with Claude Code
@omonkeyz on GitHub · 2026-11-23 00:53 UTC · original
Applied in
06110e0(merged in9e62058) with your authorship kept, thanks. Checked rdna2_silicon on WARP (bit-exact, unchanged) and with TOMBOX_EXEC_HW=1 (33 f16 FMA NaN cases compared as a class, all pass).Pull request closed