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

Open
opened 2026-11-26 21:21:03 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2379
Author: @syfyra
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: feat/gpu-results-overview


📝 Commits (1)

  • 346117c tools: gpu_results.py reads the GPU test records into one overview (GPU-RESULTS-OVERVIEW)

📊 Changes

3 files changed (+746 additions, -0 deletions)

View changed files

➕ gpu-test-results/README.md (+37 -0)
➕ tests/test_gpu_results.py (+354 -0)
➕ tools/gpu_results.py (+355 -0)

📄 Description

Claimed in the coordination issue as: GPU-RESULTS-OVERVIEW (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7197591142)

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2379 **Author:** [@syfyra](https://github.com/syfyra) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/gpu-results-overview` --- ### 📝 Commits (1) - [`346117c`](https://github.com/ubiquitarianism/leonida/commit/346117c243ff42d9db567ad0875c46747d2f6f30) tools: gpu_results.py reads the GPU test records into one overview (GPU-RESULTS-OVERVIEW) ### 📊 Changes **3 files changed** (+746 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `gpu-test-results/README.md` (+37 -0) ➕ `tests/test_gpu_results.py` (+354 -0) ➕ `tools/gpu_results.py` (+355 -0) </details> ### 📄 Description Claimed in the coordination issue as: GPU-RESULTS-OVERVIEW (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7197591142) 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2382
No description provided.