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:
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md43
1 files changed, 25 insertions, 18 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 743d7b640..f8246f888 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -2,13 +2,14 @@
2 2
3The GPU tests are small hand-written RDNA2 programs in `runtime/test/shaders`. They are translated to SPIR-V and run 3The GPU tests are small hand-written RDNA2 programs in `runtime/test/shaders`. They are translated to SPIR-V and run
4on your GPU, and the results are compared with what the RDNA2 hardware gives. They need no game files, and every 4on your GPU, and the results are compared with what the RDNA2 hardware gives. They need no game files, and every
5result helps: post it in [#166](https://github.com/ItsNotRexed/Leonida/issues/166), one comment per GPU and driver. 5result helps: submit a pull request adding a record under [`gpu-test-results/`](../gpu-test-results), following
6the existing files there and [CONTRIBUTING.md](../CONTRIBUTING.md).
6If your GPU is already covered there, testing an open pull request from the review queue in the [coordination 7If your GPU is already covered there, testing an open pull request from the review queue in the [coordination
7issue][claims] helps more. 8issue][claims] helps more.
8 9
9This page collects the setup steps and the problems testers have run into so far. 10This page collects the setup steps and the problems testers have run into so far.
10 11
11[claims]: https://github.com/ItsNotRexed/Leonida/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22 12[claims]: https://github.com/ubiquitarianism/leonida/issues/14
12 13
13## What you need 14## What you need
14 15
@@ -143,7 +144,7 @@ Write-Output "Test exit code: $LASTEXITCODE"
143``` 144```
144 145
145Report the executable name, the workflow run and its commit, your GPU and driver, 146Report the executable name, the workflow run and its commit, your GPU and driver,
146the exit code, and the test summary in [#166](https://github.com/ItsNotRexed/Leonida/issues/166). 147the exit code, and the test summary in your `gpu-test-results/` record.
147Label it as a single-test run so the result is easy to distinguish from a full suite run. 148Label it as a single-test run so the result is easy to distinguish from a full suite run.
148 149
149## Run them 150## Run them
@@ -170,16 +171,6 @@ python -I runtime/test/shaders/build.py <out dir>
170python -I runtime/test/shaders/check.py <out dir> <folder with the test programs> 171python -I runtime/test/shaders/check.py <out dir> <folder with the test programs>
171``` 172```
172 173
173For the standalone `v_mullit_f32` readback, build the full-screen triangle and the
174hand-written semantic fixture, then run 120 draws with runtime SGPR inputs.
175The driver checks every pixel against an integer product rounded to 24 bits.
176It reports the input words, pixel and channel on the first mismatch.
177
178```sh
179python -I runtime/test/shaders/build.py <out-dir> vs_ids ps_mullit
180python -I runtime/test/shaders/mullit_readback.py <out-dir> <harness-directory>
181```
182
183For D3D12/runtime tests, `LEONIDA_VK_VALIDATION=1` enables `VK_LAYER_KHRONOS_validation`. When running with validation, set `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` if MSI Afterburner (RivaTuner) or OBS is installed: their overlay layers can add unsupported swapchain usage, and in an elevated (administrator) terminal the loader ignores `VK_LOADER_LAYERS_DISABLE=~implicit~` (see "Known problems"). 174For D3D12/runtime tests, `LEONIDA_VK_VALIDATION=1` enables `VK_LAYER_KHRONOS_validation`. When running with validation, set `DISABLE_RTSS_LAYER=1` and `DISABLE_VULKAN_OBS_CAPTURE=1` if MSI Afterburner (RivaTuner) or OBS is installed: their overlay layers can add unsupported swapchain usage, and in an elevated (administrator) terminal the loader ignores `VK_LOADER_LAYERS_DISABLE=~implicit~` (see "Known problems").
184 175
185`vk_compute_test`, `vk_bindless_test` and `vk_image_fuzz` read `LEONIDA_VK_VALIDATION` too (`vk_compute_test` 176`vk_compute_test`, `vk_bindless_test` and `vk_image_fuzz` read `LEONIDA_VK_VALIDATION` too (`vk_compute_test`
@@ -345,6 +336,17 @@ on an Apple M3 Max (MoltenVK 1.4.2 and 1.4.3): 17 workgroup shapes from 1 to 102
345subgroups, with and without full subgroups and register pressure, all 32 lanes in order. A device whose default 336subgroups, with and without full subgroups and register pressure, all 32 lanes in order. A device whose default
346isn't the requested size still prints `not available`, and those tests skip. 337isn't the requested size still prints `not available`, and those tests skip.
347 338
339`cs_w32_shift64` checks `v_lshlrev_b64`, `v_lshrrev_b64` and `v_ashrrev_i64` with 64 memory-fed cases:
340eight boundary values crossed with counts 0, 1, 31, 32, 33, 63, 64 and 65. The expected values come from Python
341integers using the low six count bits, as specified by the [RDNA2 ISA, VOP3 opcodes 767–769](https://docs.amd.com/api/khub/documents/Et~wpu9g~Ffl7d9q0QZ~Og/content).
342It also overlaps the destination with the count, one source word or the entire source pair. Both GPU runners
343compare all 640 heap words (384 results and 256 unchanged input words); the operands are loaded at runtime so
344the driver cannot replace the tested operations with constant-folded answers. Run it alone with
345`python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_shift64 --require-pass`.
346It needs shader Int64 support; a device that lacks it reports a skip. This is a wave32 test of 64-bit values,
347independent of wave64 emulation. On RTX 3080 Ti (616.92, Windows 11), all 640 words matched; replacing the count
348mask with 31 or the arithmetic shift with a logical shift made the test fail at words 66 and 251 respectively.
349
348## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) 350## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`)
349 351
350Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the 352Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the
@@ -708,9 +710,14 @@ CS, 10,974 PS).
708 710
709## Posting your result 711## Posting your result
710 712
711Use the template at the top of [#166](https://github.com/ItsNotRexed/Leonida/issues/166): GPU, driver, subgroup 713Submit a pull request adding a file under [`gpu-test-results/`](../gpu-test-results), using the existing files
712range, OS, the commit you built, the tool versions and the counts each script printed. Post counts and pass/fail 714there as format examples. Follow [CONTRIBUTING.md](../CONTRIBUTING.md) and claim the work in the
713lines only, never shaders or logs from the game. A failure that isn't in the table above gets its own issue, linked 715[coordination issue][claims] before opening the pull request.
714from your entry. 716
717Include your GPU, driver, subgroup range, OS, the commit you built, the tool versions, and the pass, skip and fail
718counts each script printed. Label a single-test run clearly instead of presenting it as a full suite run.
719Post counts and pass/fail lines only, never shaders or logs from the game. A failure that is not in the table
720above gets its own issue, linked from your record.
715 721
716Use your system's detected CPU, GPU, VRAM and RAM model names in the #166 entry, not benchmark scores. For a rough browser-based check against reference profiles, you can use [Can I Run Leonida](https://assttro.github.io/can-i-run-leonida/). 722Use your system's detected CPU, GPU, VRAM and RAM model names in your result record, not benchmark scores.
723For a rough browser-based check against reference profiles, you can use [Can I Run Leonida](https://assttro.github.io/can-i-run-leonida/).