tools: gpu_results.py reads the GPU test records into one overview (GPU-RESULTS-OVERVIEW) #2379

Open
github-bot wants to merge 1 commit from github-bot/gh-2379 into main AGit
Owner

@⁠syfyra on GitHub · 2026-11-26 16:35 UTC · original
syfyra:feat/gpu-results-overview → main · +746 −0 · 3 files · 1 commits · draft

Claimed in the coordination issue as: GPU-RESULTS-OVERVIEW (#1608)

Depends on: none. No open pull request changes these three files (checked with the scripts/pr_overlap.py of #2349); it does not touch docs/gpu_test_results.md, which 33 open pull requests edit, or any record.

What and why

gpu-test-results/ holds 46 records and 35 open pull requests add 38 more, but nothing reads them. Which fixtures fail on which GPUs and drivers is only in their prose, and the hand-written table in docs/gpu_test_results.md lists 11 runs.

tools/gpu_results.py parses the Key: value fields the records share and prints one overview:

  • a row per record: GPU and family, driver, how many commits its commit is behind main, the native and the wave64-emulated run of run_gpu_tests.py as passed/total with skips and failures, and the fixtures it lists as failed;
  • each failing fixture with the records and vendors it fails on, the newest record that lists it, and how many records taken at newer commits do not. A fixture that fails across vendors points at the fixture or the translator, one that fails on a single driver at that driver;
  • runs of another kind (a validation run, a filtered run) and the records it could not read in full.

--markdown prints the record table for a document, --json everything as one object, and --check names each record that lacks GPU, Driver, OS or Commit, or whose Commit has no hash, and exits 1 when there is one. gpu-test-results/README.md states the format, which until now was "the format of the files there".

What is read from prose is a convention, not a grammar: a run is a line with N/M passed, labelled by what stands before it or after it in parentheses; a failed fixture is one the Failed: field opens with, or one that starts a line of its own as ps_c: .... A wrapped sentence that starts with a fixture that passes ("cs_d and cs_e pass with #N applied") is not counted.

On the 46 records of main (30 NVIDIA, 12 AMD, 2 Apple, 1 Intel, 1 llvmpipe), with main at 56bdd7e88:

  • cs_imgload_tfe and cs_imgload_d16_tfe are listed by 17 records on four vendors; the newest of them is 1,202 commits behind main, and 24 records taken at newer commits do not list them.
  • cs_imgatomic_ext is listed by 10 records (9 NVIDIA, 1 Apple), among them the newest record there is, so no newer record says it is gone.
  • All 46 pass --check. Of the 38 record files in open pull requests, 36 pass; the one in #2204 has no GPU and no Driver field and the one in #2238 no OS field.

One thing for the reviewer to decide: tests/test_gpu_results.py also reads the repository's own records and fails for one that lacks a required field, so a pull request that adds such a record fails that test. That is the point of --check, but it would turn the two pull requests above red once this is merged; the test class RepositoryRecordsTest can be dropped without touching the rest.

Tested

Windows 11, Python 3.14.7, git 2.55.0:

  • python -I tests/test_gpu_results.py: 19 tests on synthetic records in the layouts the real files use (invented devices and numbers): fields and continuation lines, the short names, the run labels in the spellings the records use, the failed fixtures with wrapped prose, problems and notes, the fixture table and its ordering, commit distances on a throwaway git repository, the text, Markdown and JSON output, --check, and the repository's own 46 records.
  • The test file fails on main, where the tool does not exist.
  • 62 small changes to the tool (a field pattern that takes sentences, a comma that ends a name inside parentheses, the wrapped-prose rule removed, <= for < in the newer-record count, and so on): 61 fail a test in a copy outside a git checkout, and the last one, which makes --no-git ask git anyway, fails two tests in the checkout.
  • python -I tools/gpu_results.py on this repository: 1.1 s for the 46 records including the commit distances; --check, --markdown and --json run on them too.
  • python -I on the 13 tests/test_docs_*.py, tests/test_i18n_index.py, tests/test_tool_stdout_encoding.py, tests/test_text_write_line_endings.py and tests/test_ci_registration.py; python -I scripts/check_no_game_data.py on the three files.
  • Not tested: Linux and macOS, Python 3.12, and no GPU test was run for this change (it reads records, it does not produce one).

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No translator rule in this change.)

🤖 Generated with Claude Code

**@⁠syfyra** on GitHub · 2026-11-26 16:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2379) `syfyra:feat/gpu-results-overview` → `main` · +746 −0 · 3 files · 1 commits · draft Claimed in the coordination issue as: GPU-RESULTS-OVERVIEW (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) Depends on: none. No open pull request changes these three files (checked with the `scripts/pr_overlap.py` of #2349); it does not touch `docs/gpu_test_results.md`, which 33 open pull requests edit, or any record. ### What and why `gpu-test-results/` holds 46 records and 35 open pull requests add 38 more, but nothing reads them. Which fixtures fail on which GPUs and drivers is only in their prose, and the hand-written table in `docs/gpu_test_results.md` lists 11 runs. `tools/gpu_results.py` parses the `Key: value` fields the records share and prints one overview: - a row per record: GPU and family, driver, how many commits its commit is behind `main`, the native and the wave64-emulated run of `run_gpu_tests.py` as passed/total with skips and failures, and the fixtures it lists as failed; - each failing fixture with the records and vendors it fails on, the newest record that lists it, and how many records taken at newer commits do not. A fixture that fails across vendors points at the fixture or the translator, one that fails on a single driver at that driver; - runs of another kind (a validation run, a filtered run) and the records it could not read in full. `--markdown` prints the record table for a document, `--json` everything as one object, and `--check` names each record that lacks `GPU`, `Driver`, `OS` or `Commit`, or whose `Commit` has no hash, and exits 1 when there is one. `gpu-test-results/README.md` states the format, which until now was "the format of the files there". What is read from prose is a convention, not a grammar: a run is a line with `N/M passed`, labelled by what stands before it or after it in parentheses; a failed fixture is one the `Failed:` field opens with, or one that starts a line of its own as `ps_c: ...`. A wrapped sentence that starts with a fixture that passes ("cs_d and cs_e pass with #N applied") is not counted. On the 46 records of `main` (30 NVIDIA, 12 AMD, 2 Apple, 1 Intel, 1 llvmpipe), with `main` at `56bdd7e88`: - `cs_imgload_tfe` and `cs_imgload_d16_tfe` are listed by 17 records on four vendors; the newest of them is 1,202 commits behind `main`, and 24 records taken at newer commits do not list them. - `cs_imgatomic_ext` is listed by 10 records (9 NVIDIA, 1 Apple), among them the newest record there is, so no newer record says it is gone. - All 46 pass `--check`. Of the 38 record files in open pull requests, 36 pass; the one in #2204 has no `GPU` and no `Driver` field and the one in #2238 no `OS` field. One thing for the reviewer to decide: `tests/test_gpu_results.py` also reads the repository's own records and fails for one that lacks a required field, so a pull request that adds such a record fails that test. That is the point of `--check`, but it would turn the two pull requests above red once this is merged; the test class `RepositoryRecordsTest` can be dropped without touching the rest. ### Tested Windows 11, Python 3.14.7, git 2.55.0: - `python -I tests/test_gpu_results.py`: 19 tests on synthetic records in the layouts the real files use (invented devices and numbers): fields and continuation lines, the short names, the run labels in the spellings the records use, the failed fixtures with wrapped prose, problems and notes, the fixture table and its ordering, commit distances on a throwaway git repository, the text, Markdown and JSON output, `--check`, and the repository's own 46 records. - The test file fails on `main`, where the tool does not exist. - 62 small changes to the tool (a field pattern that takes sentences, a comma that ends a name inside parentheses, the wrapped-prose rule removed, `<=` for `<` in the newer-record count, and so on): 61 fail a test in a copy outside a git checkout, and the last one, which makes `--no-git` ask git anyway, fails two tests in the checkout. - `python -I tools/gpu_results.py` on this repository: 1.1 s for the 46 records including the commit distances; `--check`, `--markdown` and `--json` run on them too. - `python -I` on the 13 `tests/test_docs_*.py`, `tests/test_i18n_index.py`, `tests/test_tool_stdout_encoding.py`, `tests/test_text_write_line_endings.py` and `tests/test_ci_registration.py`; `python -I scripts/check_no_game_data.py` on the three files. - Not tested: Linux and macOS, Python 3.12, and no GPU test was run for this change (it reads records, it does not produce one). GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No translator rule in this change.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
gpu-test-results/ holds 46 records and 35 open pull requests add more, but
nothing reads them: which fixtures fail on which GPUs and drivers is only
in their prose, and the hand-written table in docs/gpu_test_results.md
lists 11 runs.

tools/gpu_results.py parses the `Key: value` fields the records share and
prints a row per record (GPU, driver, how far its commit is behind main,
the native and the wave64-emulated run as passed/total with skips and
failures, the failed fixtures), then each failing fixture with the records
and vendors it fails on, where it was last seen failing and how many
records at newer commits no longer list it. --markdown prints the record
table for a document, --json everything, and --check names a record that
lacks GPU, Driver, OS or Commit.

gpu-test-results/README.md states the format the records use. The test
file also reads the repository's own records, so one that lacks a required
field fails there.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 16:35:58 +00:00
Author
Owner

@⁠wavehs on GitHub · 2026-11-26 18:43 UTC · original · reviewed

macOS arm64 check of #2379 (GPU-RESULTS-OVERVIEW). A new standard-library tool, its test, and a README; no GPU or build involved.

Tested head 346117c24 with its diff applied to a copy of main bdbc7e923 (branch 15 commits behind; git apply / git merge-tree clean).

Environment: Apple M3 Pro, arm64, macOS 27.2.1, CPython 3.15.2.

Result

  • python -I tests/test_gpu_results.py: 19 tests, OK.
  • Run over the repository's own 46 records: --check prints 46 record(s) checked, 0 to fix and exits 0 (three notes: two records with more failures than fixture names, one record with no readable run); --json and --markdown exit 0 and produce the expected shapes; the text table lists 46 records and the fixture section.
  • Negative control (new test kept, one rule at a time sabotaged in tools/gpu_results.py, then restored):
    • dropping the ENTRY_END condition in parse_failed - 4 failures (test_a_full_record, test_failed_fixtures_are_the_ones_the_field_opens_with_or_gives_a_line_of_their_own, and both report tests);
    • ignoring the distance in newer_without - 1 failure (test_newer_records_that_no_longer_list_a_fixture_are_counted);
    • reading Failed: none as fixture names - 1 failure (the parse_failed test).
      So the parsing and the report are pinned, not just the CLI.
  • python -I scripts/check_no_game_data.py tools/gpu_results.py tests/test_gpu_results.py gpu-test-results/README.md: clean.
  • tests/test_docs_*.py (links, CLI flags, table rows/ids, repo paths, repeated lines, list items, encoding): all OK on the applied tree.

Finding: one record in main is invisible to the tool, and --check passes it

gpu-test-results/V100-SXM2.txt (merged as 01bf18d94) opens its runs with

run_gpu_tests.py, 256 fixtures; 265 shaders translated, 264 pass spirv-val in every run:
            native:                                       193/256 passed, 62 skipped, 1 failed
            LEONIDA_W64_EMULATE=1:                        224/256 passed, 31 skipped, 1 failed

FIELD (tools/gpu_results.py:51) forbids a comma in the key, so that line starts no field; the three indented run lines become a continuation of the preceding Build: field, and parse_runs (:120-121) only looks at keys starting with run_gpu_tests.py. The overview therefore prints - / - for V100 and loses 256 fixtures of coverage, and the 1 failed in each run is never tied to a fixture (the record also has no Failed: field; it names cs_imgstore_cube in prose instead). --check reduces all of it to the note no run_gpu_tests.py line with N/M passed`` and exits 0, so a new record written this way would pass the check the PR adds for exactly this purpose.

The data is there and one line recovers it: treating any line that starts with run_gpu_tests.py as its own field (before the comma rule is applied) yields the three runs as intended - native 193/256 62s 1f, emulated 224/256 31s 1f, and the fallback run 237/256 18s 1f under "Other runs" - which is what the record says. I verified that patch on the merged tree; I did not change the repository.

Two smaller things, not defects:

  • --no-git (and any run outside a checkout) prints ? for every behind, with the legend line explaining it; correct, just worth knowing for the --markdown output pasted into a document without .git.
  • For RTX2060SUPER and RTX5070 the note 8 failed in a run, 1 fixture name(s) read from Failed is right: those records list one fixture and then prose. The tool reporting the gap instead of inventing names is the behaviour I want, so I would keep the note as a note.

No GPU fixtures were run: this PR touches no translator, runtime or harness code, so the same-main baseline stands (195 PASS / 3 FAIL / 70 SKIP MoltenVK, 190 / 5 / 73 KosmicKrisp).

No game files. AI-assisted.

**@⁠wavehs** on GitHub · 2026-11-26 18:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2379#pullrequestreview-6079117873) · **reviewed** **macOS arm64 check of #2379** (GPU-RESULTS-OVERVIEW). A new standard-library tool, its test, and a README; no GPU or build involved. Tested head `346117c24` with its diff applied to a copy of `main` `bdbc7e923` (branch 15 commits behind; `git apply` / `git merge-tree` clean). Environment: Apple M3 Pro, arm64, macOS 27.2.1, CPython 3.15.2. **Result** - `python -I tests/test_gpu_results.py`: 19 tests, OK. - Run over the repository's own 46 records: `--check` prints `46 record(s) checked, 0 to fix` and exits 0 (three notes: two records with more failures than fixture names, one record with no readable run); `--json` and `--markdown` exit 0 and produce the expected shapes; the text table lists 46 records and the fixture section. - Negative control (new test kept, one rule at a time sabotaged in `tools/gpu_results.py`, then restored): - dropping the `ENTRY_END` condition in `parse_failed` - 4 failures (`test_a_full_record`, `test_failed_fixtures_are_the_ones_the_field_opens_with_or_gives_a_line_of_their_own`, and both report tests); - ignoring the distance in `newer_without` - 1 failure (`test_newer_records_that_no_longer_list_a_fixture_are_counted`); - reading `Failed: none` as fixture names - 1 failure (the `parse_failed` test). So the parsing and the report are pinned, not just the CLI. - `python -I scripts/check_no_game_data.py tools/gpu_results.py tests/test_gpu_results.py gpu-test-results/README.md`: clean. - `tests/test_docs_*.py` (links, CLI flags, table rows/ids, repo paths, repeated lines, list items, encoding): all OK on the applied tree. **Finding: one record in `main` is invisible to the tool, and `--check` passes it** `gpu-test-results/V100-SXM2.txt` (merged as `01bf18d94`) opens its runs with ``` run_gpu_tests.py, 256 fixtures; 265 shaders translated, 264 pass spirv-val in every run: native: 193/256 passed, 62 skipped, 1 failed LEONIDA_W64_EMULATE=1: 224/256 passed, 31 skipped, 1 failed ``` `FIELD` (`tools/gpu_results.py:51`) forbids a comma in the key, so that line starts no field; the three indented run lines become a continuation of the preceding `Build:` field, and `parse_runs` (`:120-121`) only looks at keys starting with `run_gpu_tests.py`. The overview therefore prints `-` / `-` for V100 and loses 256 fixtures of coverage, and the `1 failed` in each run is never tied to a fixture (the record also has no `Failed:` field; it names `cs_imgstore_cube` in prose instead). `--check` reduces all of it to the note `no run_gpu_tests.py line with `N/M passed`` and exits 0, so a new record written this way would pass the check the PR adds for exactly this purpose. The data is there and one line recovers it: treating any line that starts with `run_gpu_tests.py` as its own field (before the comma rule is applied) yields the three runs as intended - `native 193/256 62s 1f`, `emulated 224/256 31s 1f`, and the fallback run `237/256 18s 1f` under "Other runs" - which is what the record says. I verified that patch on the merged tree; I did not change the repository. Two smaller things, not defects: - `--no-git` (and any run outside a checkout) prints `?` for every `behind`, with the legend line explaining it; correct, just worth knowing for the `--markdown` output pasted into a document without `.git`. - For RTX2060SUPER and RTX5070 the note `8 failed in a run, 1 fixture name(s) read from Failed` is right: those records list one fixture and then prose. The tool reporting the gap instead of inventing names is the behaviour I want, so I would keep the note as a note. No GPU fixtures were run: this PR touches no translator, runtime or harness code, so the same-main baseline stands (195 PASS / 3 FAIL / 70 SKIP MoltenVK, 190 / 5 / 73 KosmicKrisp). No game files. AI-assisted.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2379/head:github-bot/gh-2379'
git switch 'github-bot/gh-2379'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2379'
git switch 'github-bot/gh-2379'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2379'
git switch 'github-bot/gh-2379'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2379'
git switch 'main'
git merge --squash 'github-bot/gh-2379'
git switch 'main'
git merge --ff-only 'github-bot/gh-2379'
git switch 'main'
git merge 'github-bot/gh-2379'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.