diff options
Diffstat (limited to 'docs/testing.md')
| -rw-r--r-- | docs/testing.md | 12 |
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 |
| 272 | operands taken from user SGPRs so the driver cannot fold them. It passes with the default translation (`--fma glsl`, | 272 | operands taken from user SGPRs so the driver cannot fold them. Run it with default `--fma glsl` (GLSL.std.450 `Fma`) or |
| 273 | GLSL.std.450 `Fma`) and with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. | 273 | with `LEONIDA_FMA=khr` **for `build.py`** (or for `run_gpu_tests.py`), which emits `OpFmaKHR`. |
| 274 | That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit | 274 | That needs `VK_KHR_shader_fma` with `shaderFmaFloat32`; the test programs enable it when the device has it and exit |
| 275 | 77 (a SKIP) for a module that needs it on a device without it. The Vulkan specification allows a driver to split GLSL | 275 | 77 (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 |
| 277 | does, so `cs_fma_fused` passing with `glsl` is not evidence that every driver is safe. | 277 | fused, 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 | ||
| 280 | the 7 f32 outputs while still requiring exact f16 round-to-odd (`0x00007351`); under `LEONIDA_FMA=khr`, all 8 words | ||
| 281 | must be strictly fused. | ||
| 278 | 282 | ||
| 279 | ## Hardware oracle (optional, AMD) | 283 | ## Hardware oracle (optional, AMD) |
| 280 | 284 | ||