Repository navigation
test(agc): accept any NaN where the f16 fma and fma_mix tests expect one - #7093
Conversation
agc_driver_f16_fma_denormal_modes and agc_driver_fma_mix_f16_denormal_modes compared NaN results (inf * 0) bit for bit with the RX 6700 XT's, but the NaN bits of f16 arithmetic and of v_fma_mix_f32 with f16 sources are left to the driver, so the tests fail on NVIDIA (0x7fff for 0xfe00). Rows whose expected value is a NaN now accept any NaN; every other row is still exact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ran this on Linux, With |
|
Validation on a second NVIDIA device, since the only NVIDIA datapoint so far is the RTX 5080 failure report: RTX 3070 (driver 617.42), Windows 11, MinGW (WinLibs GCC 15.2.0), Release, head
Independent confirmation that the NaN-relaxed checks accept NVIDIA's encodings. I had opened #7109 with the same approach before noticing this PR predates the issue itself; closing mine as the duplicate. The |
What
agc_driver_f16_fma_denormal_modes(#7034) andagc_driver_fma_mix_f16_denormal_modes(#7040) compare every result bit for bit with the values the RX 6700 XT wrote, including rows whose result is a NaN (inf * 0). The technical debt entry on NaN results says the NaN bits of f16 arithmetic and ofv_fma_mix_f32with f16 sources "are left to the driver", so those rows depend on the driver: on an RTX 5080 (driver 32.0.16.1062)agc_driver_f16_fma_denormal_modesfails onmainwithv_fma_f16 without a known float mode of 0x7c00, 0x0000, 0x0000 is 0x7fff, expected 0xfe00(report on #7034), and thev_fma_mix_f32test has the same kind of row (0xffc00000on AMD,0x7fffffffreported on NVIDIA in #6976).Both checks now accept any NaN where the expected value is a NaN; the f16 one still requires the high half of the register to be zero. Every other row is still compared bit for bit, so the tests keep catching the denormal handling they were written for.
Tested
Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.5002, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,ANYPS5_REQUIRE_VULKAN=1,main864729dc0:core/shader/recompilerreverted to6a32550fd(before fix(shader): flush v_fma_f16 family denormals by the f16 denormal field #7034 and fix(shader): flush v_fma_mix_f32 f16 sources by the f16 denormal field #7040) both still fail on non-NaN rows:v_fma_f16 f16 denormal mode 0, IEEE mode on of 0x3bff, 0x0400, 0x0000 is 0x0400, expected 0x0000andv_fma_mix_f32 of three f16 sources f32 denormals flushed, f16 denormal mode 0, IEEE mode off of 0x00010000, 0x00000000, 0x3f800000 is 0x33800000, expected 0x00000000.python tools/check_conventions.py --base origin/mainwith this title and body passes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code