tools: gpu_results.py reads the GPU test records into one overview (carry of #2379) #3095
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3095"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T10:31:34Z.
Claimed in the coordination issue as: GPU-RESULTS-OVERVIEW (claimed by syfyra, https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7197591142)
Depends on: none.
What and why
Carry of #2379 (syfyra), unchanged since 2026-11-26 (one commit,
346117c24; the author has not pushed or commented since). Branch =main(80910637f) + the author's head with its commit kept + a merge that needed no conflict resolution + one commit of mine.The change:
tools/gpu_results.pyreads theKey: valuefields of the records ingpu-test-results/and prints one overview (a row per record with GPU, driver, commits behindmain, native and wave64-emulated counts and failed fixtures; each failing fixture with the records and vendors it fails on).--markdown,--jsonand--checkare the other outputs.tests/test_gpu_results.pytests it on synthetic records and on the repository's own records, andgpu-test-results/README.mdstates the record format.Review defects of #2379 that were still present on current
mainand are fixed in my commit:run_gpu_tests.py, 256 fixtures; ...:andFailed in all runs, ...:(the layout ofV100-SXM2.txt) started no field, so that record lost its three runs and its failed fixture while--checkexited 0 (reported by wavehs, akimfomin and merzleckeier). Those two headings are now read before the comma rule.Failed (in both profiles):(RTX5070-61692-Windows.txt) was skipped, so the Markdown overview showednone(reported by andrew-ai). A key that starts with the wordFailedis read now, and a record whose runs report failures but whose fixtures could not be read showsunparsed.--checkfailed on three records of currentmain(reported by imShangLi and aslan2142; the third,RadeonProVegaII-RADV.txt, was found while reproducing).OS/host:andBaseline:are read as OS and Commit when those are missing, andPR1608-Radeon860M-RTX5060Laptop-Win11.txt, which holds two adapters in one file, is noted instead of failed. No record is edited. The README says so.Not changed: the two notes
--checkprints for records where fewer fixture names than failures can be read (the tool reports the gap rather than inventing names).Tested
Windows 11, no GPU, no game files, Python 3.14.0, on
main80910637fplus this branch:python -I tests/test_gpu_results.py: 23 tests, OK (19 of the author's plus 4 new ones for the headings, the older keys, the two-adapter record andunparsed).mainthe test file does not exist and the tool is absent (ModuleNotFoundError: No module named 'gpu_results'withtools/gpu_results.pyremoved). With the author's version of the tool plus my tests (the tool as in the merge commitc32f35ab9): FAILED (failures=6, errors=79), includingtest_a_heading_may_hold_a_comma_or_a_qualifier,test_older_records_name_the_os_and_the_commit_differently,test_a_record_of_two_adapters_is_noted_not_failed,test_failures_without_a_name_are_not_shown_as_cleanand the repository tests. The tool was restored afterwards (git statusclean).main, the author's 19 tests: 4 failures (three records and the default-folder test).python -I tools/gpu_results.py --check:80 record(s) checked, 0 to fix.--no-gitnow lists 3 runs forV100-SXM2.txt(193/256, 224/256, and 237/256 under "Other runs", 1 failure each) withcs_imgstore_cube, andcs_imgatomic_ext, cs_texture_uavforRTX5070-61692-Windows.txt.python -Ion the 13tests/test_docs_*.py,tests/test_i18n_index.py,tests/test_tool_stdout_encoding.py,tests/test_text_write_line_endings.pyandtests/test_ci_registration.py: all OK.python -I scripts/check_no_game_data.pyon the three changed files: clean.GPUs tested: n/a (unit tests only)
AI-assisted: yes. Models: Claude Opus 5.5 in Claude Code (carry, conflict resolution, fixes, tests); separate read-only reviewer agent: Claude Opus 5.5.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (Not applicable: no translator rule.)Supersedes #2379 once merged; the original stays open until a maintainer decides.
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T12:18:59Z.
Verified by OreoFR (oreofr-agent, AI-assisted; third-party red/green). Head
e039bcd8e53fd62703af48967cf36e3c288c18ffmerged into mainf6dd2242e02b5f579d245f1c19dd5150d42e00a1with no conflicts. Windows 11, Python 3.12, CPU only.tests/test_gpu_results.pyOK.python -I tools/gpu_results.py --check: 80 records checked, 0 to fix. It prints two notes, about RTX5070.txt and RadeonProVegaII-RADV.txt fixture names, as the description says.tools/gpu_results.py. Without it, the test file fails (ModuleNotFoundError: No module named 'gpu_results').Safe to merge: it merges cleanly, CI is green, and it adds a new tool, its test and a README. Not merged by me.
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T12:55:31Z.
Ran natively on Windows 11, Python 3.13, head
e039bcd8emerged into currentmain(23a51c494, no conflicts).py -3.13 -I tests/test_gpu_results.pyOK.py -3.13 -I tools/gpu_results.py --checkon currentmain: 80 records, 0 to fix, but now 7 notes rather than the 2 reported earlier, since records added tomainsince then also get notes (RTX2060SUPER.txtandAppleM5.txt"N failed in a run, 1 fixture name(s) read",RTX4080-Windows-62101-validated.txt"no run_gpu_tests.py line withN/M passed", plus the two-adapter record). Notes only, exit 0.One Windows thing: how the record file is encoded. I took
GTX1080.txtand rewrote it (throwaway copies, not committed) the ways Windows editors and shells usually save text:GTX1080.txt--check --no-gitSet-Content -Encoding utf8)no GPU field, 1 to fix, exit 1>/Out-File)no GPU field,no Driver field,no OS field,no Commit field, exit 1CRLF is fine. With a BOM the first key is read as
GPU, so a record that does have aGPU:line is reported as missing it, and in the overview it gets an empty GPU column and counts under vendorother. The message points at the wrong problem. Opening withencoding="utf-8-sig"inparse_recordfixes the BOM case: same copy then gives 0 to fix, and the test file still passes. For UTF-16, a clear "not UTF-8" message when the file starts withFF FE/FE FFwould be enough; the README could also say records are UTF-8. No record onmainhas a BOM or CRLF today, so nothing in the repository is affected yet.Not checked: Linux and macOS, records with non-ASCII GPU names, the Markdown output beyond a quick look.
GPUs tested: n/a (CPU-only tests).
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T13:51:22Z.
Review: COMMENTED
Independent Linux review on main
21843cef0+ heade039bcd8e, Python 3.14.10. All 23 tests passed. Two additional CLI cases with synthetic records:--checkexits 0 for an empty file namedPR1608-Radeon860M-RTX5060Laptop-Win11.txtand reports zero records to fix, even though all four required fields are missing. The same empty file namedempty.txtexits 1. Inparse_record, the basename exception currently clears every missing field. The checked-in multi-adapter record still has OS and Commit, so those two real requirements can be validated even for it.--markdownemits[Radeon test record.txt](../gpu-test-results/Radeon test record.txt)for a valid synthetic file with spaces. markdown-it renders the cell as literal text. Encoding the filename in the link target would keep the visible filename and make it clickable.CPU only. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-12-02T14:38:25Z.
Verification — VERIFY-3095
e039bcd8e5; MERGEABLE against current main (acc350745)tests/test_gpu_results.pyrun standalone in a scratch worktree: (a) PR test file against plain main, (b) PR test file against the PR headModuleNotFoundError: No module named 'gpu_results'— this PR adds a new tool, so absence on main is the red stateAI-assisted: yes (Muse Wonder, Muse by Meta)
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-02T23:33:47Z.
VERIFY-3095 — Windows nativo: las suites pasan; no establecí un control, y la rama trae la pila entera
98e04359a—tools/gpu_results.py, 2 lines (a rename of its reader)mainis the wholegpu_results.pytool, not two linesRan at the head
The change: the tool's reader is named
read_record_text, which is what the documentation/encoding checks look for in a tool that reads text records.read_record_textis present twice in the file, and both suites are green.The control, and why I have none: I renamed it back to
read_recordin the tool and both suites stayed green — so the check that motivated the rename is not one of these two, and I did not find the one it is. Saying "verified" without a control would be exactly the mistake I spent tonight pointing out in other people's work, so: the rename is harmless and the tool's tests pass; whether it satisfies the check it was made for, I did not demonstrate.What I did confirm: the tool's own 24 tests pass and the encoding check passes on that head.
What I could not test: the check the rename is for; and the tool against the real
gpu-test-results/corpus (its tests use fixtures).Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T23:42:50Z.
@fiestorra thanks. The check the rename is for is
tests/test_text_encoding.py(test_every_text_file_call_pins_its_encoding), nottest_docs_encoding.py: it flags every call namedread_textas a text read withoutencoding=, because it cannot tellpathlib'sread_textfrom a local helper of the same name. That is why renaming toread_recordstays green too.Control on this head: rename the helper back to
read_text(definition and the one call inparse_record) and runpython -I tests/test_text_encoding.py: it fails withtools/gpu_results.py:189, the same failure as CI job 143660351800 onf80aa50b. Withread_record_textit passes. The helper itself opens the file in"rb"and decodesutf-8-sig, so no locale is involved.On the stack: yes, this PR carries #2379 whole (it is its carry), so the diff against
mainis the full tool by design.AI-assisted: Claude Opus (Claude Code).
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T03:51:42Z.
Review: COMMENTED
Rechecked
98e04359amerged with516c9eaaon Linux. All 24 tests pass, and--checkaccepts all 80 records. I found two differences between the generated overview and checked-in records.parse_recordtakes the firstCommitfield but collectsFailedfields across the whole file.RTX5060Laptop.txthas a current5fab93967block with one failure,cs_imgatomic_ext, and explicitly says thecs_imgload_tfepair now passes. The Markdown row for5fab93967still lists both older failures. The JSON fixture summary also assigns the newer commit distance to those failures because it uses the distance of the entire record. Please scope the current row and last-seen calculation to its measurement, or retain each historical measurement with its own commit. This checked-in record makes a useful regression case.RadeonProVegaII-RADV.txt,--jsonlabels thecheck.pyresult (159/234) and the dedicatedw64_graphics.pyresult (18/30) as additional runs ofrun_gpu_tests.py --require-pass --assembler spirv-as (unfiltered). Those headings occur in the same parsed field because they are not recognized as new top-level sections. Please stop the current runner section at the next standalone heading or retain the runner for each count.CPU-only parser checks. AI-assisted with OpenAI Codex.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T08:06:16Z.
@merzleckeier both addressed in
1f77464d, thanks: both were real on the checked-in records.parse_recordnow counts runs and failures only from the block of the firstCommit:field; earlier blocks are noted ("earlier measurement(s) not counted, at21625bca8"). Only IntelARL, RTX5060Laptop and RX7900XTX have more than oneCommit:, and all three put the newest block first. RTX5060Laptop now showscs_imgatomic_extonly, with the 208/268 and 243/268 runs; thecs_imgload*pair drops out of those three rows and its last seen failure moves to NvidiaPascal4GB.parse_fieldsstarts a new field at an unindented line ending in:after a blank line; a wrapped line without a blank line before it still continues its field. RadeonProVegaII now has one runner run (209/268) instead of four. ItsLEONIDA_BARY_FALLBACK=1re-run (213/268), under its own heading, is no longer counted as a default run either.Two new tests (synthetic records with the same layout) fail with the old
tools/gpu_results.pyand pass with it; 26 tests OK.--check gpu-test-results: 80 records, 0 to fix. Over all 80 records,--markdown/--jsonchange only for those four. Not fixed, older: IntelARL namescs_imgatomic_extafter a;mid-line, so it is still not read; the record now gets a note ("3 failed in a run, 2 fixture name(s) read").AI-assisted: Claude Opus (Claude Code), with a separate read-only Claude Opus reviewer.
Generated by Claude Code
Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T08:18:20Z.
Review: APPROVED
Rechecked
1f77464donmaind9b618f1. Both findings from my previous review are resolved. Both new tests fail against the previous checker at98e04359and pass here. All 26 tests passed, and--checkaccepted all 80 records.In the JSON comparison on the same records,
RTX5060Laptop.txtat5fab93967contains the 208/268 and 243/268 runs and lists onlycs_imgatomic_ext.RadeonProVegaII-RADV.txtcontains just its 209/268run_gpu_tests.pyresult. Exactly four records changed. This was a CPU-only check of the report tool and its test fixtures. AI-assisted with OpenAI Codex.