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 18:34:11 +0000
commit2426df3d5ed7bf419f8abfcbdd2a94bae9e1ae8f (patch)
tree9ce84db79dd17a65e62e104eb0b72e29e29656c5 /docs/testing.md
parentec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (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.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 060da9905..cb3dc69da 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -269,12 +269,16 @@ without it they're skipped, which is expected, not a failure. To test the fallba
269## Fused multiply-add: GLSL Fma or OpFmaKHR 269## Fused multiply-add: GLSL Fma or OpFmaKHR
270 270
271`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 271`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
272operands taken from user SGPRs so the driver cannot fold them. It passes with the default translation (`--fma glsl`, 272operands taken from user SGPRs so the driver cannot fold them. Run it with default `--fma glsl` (GLSL.std.450 `Fma`) or
273GLSL.std.450 `Fma`) and with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. 273with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`.
274That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit 274That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit
27577 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL 27577 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL
276`Fma` into two roundings, which is why `khr` exists. Neither the AMD (26.11.2) nor the NVIDIA (617.42) driver we tried 276`Fma` into two roundings, which is why `khr` exists: on AMD Windows (26.11.2) and NVIDIA (617.42) GLSL `Fma` stayed
277does, so `cs_fma_fused` passing with `glsl` is not evidence that every driver is safe. 277fused, whereas **Mesa RADV (26.2.6-arch3.1, AMD Radeon RX 6800, Linux)** splits 5 of the 7 f32 ops under `--fma glsl`
278(reusing the live `a * a` product in `v3`) and returns 8/8 fused exact under `LEONIDA_FMA=khr`. Under default
279`--fma glsl`, `check.py` and `run_gpu_tests.py` therefore accept either the fused or the exact split word for each of
280the 7 f32 outputs while still requiring exact f16 round-to-odd (`0x00007351`); under `LEONIDA_FMA=khr`, all 8 words
281must be strictly fused.
278 282
279## Hardware oracle (optional, AMD) 283## Hardware oracle (optional, AMD)
280 284