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:
authorDadaCap <167002618+DadaCap@users.noreply.github.com>2026-11-28 09:03:36 +0100
committerGitHub <noreply@github.com>2026-11-28 09:03:36 +0100
commit6a5219f603be34bffb982a7646fc232b20742efd (patch)
tree52f72df1823af31fe6776cf9e9c44105a011a2b1 /docs/testing.md
parent11f6138b87f1304726e84447916c47a10355500c (diff)
parent59c128236442b80c39e4cf295258553fcd155d45 (diff)
Merge pull request #1727 from potatoe0100/claude/project-thread-es80ya
docs/testing: a Windows quick start and how to test someone else's PR (DOC-TESTING-WINDOWS-QUICKSTART)
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md72
1 files changed, 72 insertions, 0 deletions
diff --git a/docs/testing.md b/docs/testing.md
index c9cb336bd..ca17d790c 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -11,6 +11,78 @@ This page collects the setup steps and the problems testers have run into so far
11 11
12[claims]: https://github.com/ubiquitarianism/leonida/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22 12[claims]: https://github.com/ubiquitarianism/leonida/issues?q=is%3Aissue%20is%3Aopen%20in%3Atitle%20%22Coordinating%20who%20works%20on%20what%22
13 13
14## Quick start on Windows
15
16The shortest path from a fresh Windows PC to a result you can post. The rest of this page has the details and the
17problems testers have hit; the steps below link to them.
18
191. Install, in this order:
20 - Visual Studio 2022 (Community or Build Tools) with "Desktop development with C++", the "C++ CMake tools for
21 Windows" component and Windows SDK 10.0.26100 or newer.
22 - The [Vulkan SDK](https://vulkan.lunarg.com/). It sets `VULKAN_SDK` and puts `spirv-as`, `spirv-val`,
23 `glslangValidator` and `vulkaninfo` on `PATH`.
24 - [Python 3.12+](https://www.python.org/downloads/), with "Add python.exe to PATH" ticked, and git.
25 - Optional but needed for the full suite: `llvm-mc` with the AMDGPU target (see [What you need](#what-you-need)).
26 `powershell -ExecutionPolicy Bypass -File scripts\build_llvm_mc.ps1` builds one and sets `LLVM_MC` for you.
272. Open a new PowerShell window (so it sees the new `PATH`), clone the repository and build the test programs:
28
29 ```powershell
30 git clone --recursive https://github.com/ubiquitarianism/leonida
31 cd leonida
32 powershell -ExecutionPolicy Bypass -File scripts\build_runtime.ps1
33 ```
34
35 The script uses the newest Visual Studio it finds. If Visual Studio 2026 is also installed and the link step
36 fails there, build from a "Developer PowerShell for VS 2022" instead:
37 `cmake -S runtime -B runtime\build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON`, then
38 `cmake --build runtime\build`.
393. Run the suite twice, once as your GPU runs it and once with wave64 emulation (this matters on NVIDIA and Intel,
40 whose subgroups are 32 wide, see [GPUs with 32-wide subgroups](#gpus-with-32-wide-subgroups-nvidia-intel-apple)):
41
42 ```powershell
43 python -I scripts\run_gpu_tests.py
44 $env:LEONIDA_W64_EMULATE = "1"; python -I scripts\run_gpu_tests.py; Remove-Item Env:LEONIDA_W64_EMULATE
45 ```
46
47 Without `llvm-mc`, add `--disasm-dir tests/semantic/fixtures/disasm` to both commands. That runs the
48 pre-disassembled subset only, so say "subset" in your result.
49
50 Using a prebuilt `runtime-windows` artifact instead of building? Check out the commit that built it and read
51 this page at that commit (see [Without a compiler](#without-a-compiler-a-ci-built-runtime)): an older
52 `run_gpu_tests.py` may not take every option shown here. `python -I scripts\run_gpu_tests.py --help`, run from
53 that checkout, lists the options it does take.
544. Collect what the record needs:
55
56 ```powershell
57 git rev-parse HEAD # the commit you built
58 vulkaninfo --summary # GPU name, driver version, Vulkan version
59 python -I tools\vk_subgroup_info.py # subgroup range (min_subgroup_size, max_subgroup_size)
60 cmd /c ver # Windows build
61 ```
62
635. Copy a Windows file in [`gpu-test-results/`](../gpu-test-results) (`RTX3060Ti-Windows.txt` is a complete one), fill
64 in your GPU, driver, subgroup range, OS build, commit, tool versions and the last line each run printed
65 (`N/M passed, K skipped`), and list every `FAIL` line. Then follow [Posting your result](#posting-your-result).
66
67A `FAIL` is worth reporting, not a reason to stop: check [Known problems](#known-problems) first, and say in the
68record whether it matched a row there.
69
70### Testing someone else's pull request
71
72Once your GPU has a record, testing open pull requests on it helps more than a second record: review and testing
73are what most pull requests wait for. Pick one that changes the translator, the runtime or a GPU test, then:
74
75```powershell
76git fetch origin pull/<N>/head:pr-<N>
77git checkout pr-<N>
78powershell -ExecutionPolicy Bypass -File scripts\build_runtime.ps1 # always rebuild after switching
79python -I scripts\run_gpu_tests.py # add --filter <name> for the tests it touches
80```
81
82Run `main` the same way for comparison (`git checkout main`, rebuild, run). Then comment on the pull request with
83one line per mode, in the form `<GPU>, <driver>, Windows <build>: X of Y passed, K skipped, F failed (native);
84main at <commit>: ...`, plus any `FAIL` lines that differ from `main`.
85
14## What you need 86## What you need
15 87
16- **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so 88- **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so