diff options
| author | Shadman PC <iamanthonytony@gmail.com> | 2026-11-22 20:03:17 +0600 |
|---|---|---|
| committer | Shadman PC <iamanthonytony@gmail.com> | 2026-11-22 20:03:17 +0600 |
| commit | 383c68bb6414e1f643d9d502d738f01025667b5a (patch) | |
| tree | 96b58ea4b830d7915a9045a68c1fb04f845d6f91 /runtime/src/pe_loader.cpp | |
| parent | 89b047cd8fab50675a43d76722a6a8a881f55dc2 (diff) | |
fix(translator): round v_fma_mixlo/hi_f16 once to f16 (SHADER-297)
Hardware measurement on RDNA2 (gfx1036, finding 7079901079) confirms that
v_fma_mixlo_f16 / v_fma_mixhi_f16 round the exact fma once, straight to
f16, across all rounding modes (7 of 7 discriminating cases in
tools/fma_mix_probe.py match single rounding). The translator previously
double-rounded in nearest-even mode (f32 Fma then f16 narrow).
Change v_fma_mixlo_f16 / v_fma_mixhi_f16 to use Gen.fma_mix_odd across all
modes, which rounds to odd at f32 so that narrowing to f16 gives the
exact single-rounded result in both nearest-even and toward-zero modes.
Update tests/test_fma_mix_probe.py and docs/shader_validation.md to reflect
the RDNA2 hardware measurement, and add discriminating semantic tests in
tests/semantic/test_valu_fma_mix.py.
AI-assisted.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions