diff options
| author | Henrique Vinagre <henriquevinagre@tecnico.ulisboa.pt> | 2026-11-22 11:53:45 +0000 |
|---|---|---|
| committer | Henrique Vinagre <henriquevinagre@tecnico.ulisboa.pt> | 2026-11-22 21:43:14 +0000 |
| commit | 53bc2c4943b70fd094d7c1d95ca25116083f15be (patch) | |
| tree | e1e087aecaff2d29c09f8b2acbe8a7f39ee05265 /docs/testing.md | |
| parent | f847748cc76bd3777f9c070c4034eb2fc1c04e64 (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.md | 14 |
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 |
| 297 | operands taken from user SGPRs so the driver cannot fold them. It passes with the default translation (`--fma glsl`, | 297 | operands taken from user SGPRs so the driver cannot fold them. Run it with default `--fma glsl` (GLSL.std.450 `Fma`) or |
| 298 | GLSL.std.450 `Fma`) and with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. | 298 | with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. |
| 299 | That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit | 299 | That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit |
| 300 | 77 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL | 300 | 77 (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 |
| 302 | does, so `cs_fma_fused` passing with `glsl` is not evidence that every driver is safe. | 302 | fused, whereas **Mesa RADV (Linux)** splits several of the 7 f32 ops under `--fma glsl` — the exact split count varies |
| 303 | by 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 | ||
| 304 | with `SignedZeroInfNanPreserve 32`, 5 of 7 on RX 6800 before float controls, 7 of 7 on Radeon Pro V540 RDNA1 / Mesa | ||
| 305 | 25.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 | ||
| 307 | the 7 f32 outputs while still requiring exact f16 round-to-odd (`0x00007351`); under `LEONIDA_FMA=khr`, all 8 words | ||
| 308 | must be strictly fused. | ||
| 303 | 309 | ||
| 304 | ## Hardware oracle (optional, AMD) | 310 | ## Hardware oracle (optional, AMD) |
| 305 | 311 | ||