upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/testing.md
diff options
context:
space:
mode:
authorHenrique Vinagre <henriquevinagre@tecnico.ulisboa.pt>2026-11-22 11:53:45 +0000
committerHenrique Vinagre <henriquevinagre@tecnico.ulisboa.pt>2026-11-22 21:43:14 +0000
commit53bc2c4943b70fd094d7c1d95ca25116083f15be (patch)
treee1e087aecaff2d29c09f8b2acbe8a7f39ee05265 /docs/testing.md
parentf847748cc76bd3777f9c070c4034eb2fc1c04e64 (diff)
GPU tests: wire cs_fma_fused in run_gpu_tests and accept GLSL Fma split on RADV
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md14
1 files changed, 10 insertions, 4 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 86e0ed328..add373009 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -294,12 +294,18 @@ without it they're skipped, which is expected, not a failure. To test the fallba
294## Fused multiply-add: GLSL Fma or OpFmaKHR 294## Fused multiply-add: GLSL Fma or OpFmaKHR
295 295
296`cs_fma_fused` checks that `v_fma_f32`, `v_fmac_f32`, `v_fmaak_f32`, `v_fmamk_f32` (and one `v_fma_f16`) round once, on 296`cs_fma_fused` checks that `v_fma_f32`, `v_fmac_f32`, `v_fmaak_f32`, `v_fmamk_f32` (and one `v_fma_f16`) round once, on
297operands taken from user SGPRs so the driver cannot fold them. It passes with the default translation (`--fma glsl`, 297operands taken from user SGPRs so the driver cannot fold them. Run it with default `--fma glsl` (GLSL.std.450 `Fma`) or
298GLSL.std.450 `Fma`) and with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. 298with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`.
299That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit 299That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit
30077 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL 30077 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL
301`Fma` into two roundings, which is why `khr` exists. Neither the AMD (26.11.2) nor the NVIDIA (617.42) driver we tried 301`Fma` into two roundings, which is why `khr` exists: on AMD Windows (26.11.2) and NVIDIA (617.42) GLSL `Fma` stayed
302does, so `cs_fma_fused` passing with `glsl` is not evidence that every driver is safe. 302fused, whereas **Mesa RADV (Linux)** splits several of the 7 f32 ops under `--fma glsl` — the exact split count varies
303by GPU, Mesa/ACO version, and execution modes (4 of 7 on RX 6800 / Mesa 26.2.6-arch3.1 and RX 7600 / Mesa 27.0.0-devel
304with `SignedZeroInfNanPreserve 32`, 5 of 7 on RX 6800 before float controls, 7 of 7 on Radeon Pro V540 RDNA1 / Mesa
30525.2.8) — while returning 8/8 fused exact under `LEONIDA_FMA=khr` where supported. Under default `--fma glsl`,
306`check.py` and `run_gpu_tests.py` therefore accept either the fused or the exact split word independently for each of
307the 7 f32 outputs while still requiring exact f16 round-to-odd (`0x00007351`); under `LEONIDA_FMA=khr`, all 8 words
308must be strictly fused.
303 309
304## Hardware oracle (optional, AMD) 310## Hardware oracle (optional, AMD)
305 311