Repository navigation
Conversation
…(TOOL-CHAIN-CHECK) The links between the game files and the GPU fail quietly: an llvm-mc whose gfx1013 decoder rejects words leaves pipeline library programs untranslated, a translation from older translator sources keeps loading after the module contract changed, and the runtime's slot-67 refusals sit in a large log. tools/chain_check.py reads a make_game.py work folder (and optionally one run's log) and prints one block per link with OK/WARN/FAIL and the most likely cause: llvm-mc and spirv-val versions and the translator digest against this checkout; unpacked, listed and translated programs per family with up to 5 refusal reasons; tagged/plain modules and runtime folders; loaded modules, failed slot and D3D12 calls, builds, gate waits, faults and the exit code. The last line names the weakest link. Counts and fixed words only: refusal reasons are matched against the messages rdna2spirv.py raises, anything else counts as "other", and paths appear only with --show-paths. Exit 0 by default, 1 with --strict on FAIL. Standard library only; documented in docs/dev-tools.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reads Review of TOOL-CHAIN-CHECK found three filters that were not closed: - a refusal reason's variable part is kept only when it is an instruction of tools/rdna2_isa_tables.py (_dpp/_sdwa/_e32/_e64 removed) or a built-in exception name; any other token is "#", a reason matching no translator message is "other"; - a [d3d12-trace] method is printed only when it is a string literal of runtime/shims or runtime/src, or Interface::Method / Interface::SlotN built from them; anything else counts as "(other)"; - boot.ps1's ending is accepted in its three forms only, else "other"; an exit code it names is used when the log has none. Also: "device-fault: submitted dispatch" lines are counted apart (a stall prints them) and the cause reads "device lost, faulted or stalled"; more modules than programs is WARN; amdgcn reads n/a without a record; a missing translated index with shard files reads "translation in progress or interrupted"; a UTF-16 log without BOM is detected from its zero bytes; the mixed and LEONIDA_DESCRIPTOR_TABLE-forced descriptor table lines are read. The test pins each runtime and boot.ps1 format string the regexes depend on, and covers the missing-.spv count, the 1% bound (99/100 WARN, 197/200 FAIL) and names slipped into trace, digest and reason lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ran the suite here rather than only reading it — Windows 11, CPython 3.14 (the author's runs were Linux/3.13), at head
Merge state as read today: VERDICT: OK on the evidence I could run — 23/23 local, gates clean, live runs reproduce the documented contract; CPython 3.14 on Windows reproduces the same counts as the author's Linux/3.13 run. I read ~520 of the 775 tool lines closely (helpers, repo side, blocks); the runtime-log tail I lean on the closed-set regexes plus |
|
Verified on main a73a57e (Ubuntu 24.04 x86-64, Python 3.13, no GPU, no game data). Merges cleanly. python -I tests/test_chain_check.py: 23 tests OK with this PR (the tool is new, so there is no main baseline to fail against). compileall clean. AI-assisted: yes (Claude Code) |
…e slot-57 line The trace test now feeds PS_Secret::Slot12 and expects one more "(other)"; the reasons test feeds "translator error SecretError" and expects "translator error #"; the runtime pins add the slot-57 failure fprintf of d3d12_xs_device.cpp. dev-tools.md says which trace names and digest endings are printed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lixonik
left a comment
There was a problem hiding this comment.
Windows 11: 23/23 chain check tests passed, including strict exit status, absent data and path/name redaction in counts-only output. Tested with synthetic fixtures. No findings.
AI-assisted.
|
Thanks for this! One page of counts for the whole shader chain makes a gap easy to spot. During maintainer testing (local, 2026-11-28) (head 1b1fb2d, merged on main b1619e0 / 6dfca64, Windows 11, Python tests via pytest/unittest) we found:
To get this merged:
AI-assisted (Claude Code), posted for DadaCap (maintainer). |
|
#2231 | head 1b1fb2d (merged cleanly onto origin/main 59e6584) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes Independent Verification (Windows 11)
|
timbot103
left a comment
There was a problem hiding this comment.
Static audit of head 1b1fb2db4 against b6bf3aa0b. I reviewed the diff, the build and runtime producers, and the relevant CI checks. No tests, builds, or GPU runs. I’d request changes for the following.
- Blocker at
tools/chain_check.py:230. The encoding check flags the three calls to the localread_texthelper, even though itsopen()already pins UTF-8. Rename the helper and its calls. - Major at
tools/chain_check.py:437. A malformed recorded translator digest can copy a path fragment or other free text into both report formats without--show-paths. Validate the entire digest as SHA-256 hex before displaying its prefix. - Minor at
tools/chain_check.py:762. Invalid work and log arguments echo their paths on stderr. Use fixed diagnostics by default and add the path only with--show-paths. - Major at
tools/chain_check.py:391. Work paths with spaces truncate the journal’s disassembly argument, so its translation summaries and reasons lose their family. Parse through the producer’s--outdelimiter. - Major at
tools/chain_check.py:412. The translator emits its optional wave64 tiers line between the summary and the refusal rows. That line stops reason collection. Keep collection active through the tiers line and exercise that sequence in a fixture. - Major at
tools/chain_check.py:422. The tool ignores the legacy LLVM marker accepted bymake_game.py:1268. A saved signature with a non-string version field also raises attools/chain_check.py:251. Accept both marker forms and validate signature fields before parsing. - Major at
tools/chain_check.py:513. A module with an error-only metadata row can make the BVH or executable family look complete even though the producer counts that program as missing. Match modules to the expected stems and require their runtime lookup metadata. - Major at
tools/chain_check.py:556.fspx_computeandfspx_gfxcan be present and loaded while contributing nothing to the local descriptor census or the expected boot total. Count all indexes the runtime reads using its metadata acceptance rules.
AI-assisted.
Claimed in the coordination issue as: TOOL-CHAIN-CHECK
What and why
The shader chain (game files → llvm-mc → translator → SPIR-V → runtime pipelines) fails quietly link by link. On one Windows machine, llvm-mc 21.1.8 left 840 of the 2,684 compute programs of the pipeline library untranslated (839 "fall-through into undecodable words", 1
s_sethalt; #1923 measures the same gap). At boot the runtime then logged 843slot 67 ... failed with 0x80070057lines. Today nothing connects those two counts: the build prints no "N of M" for the library, andboot.ps1's digest shows neither slot failures nor failedCreatePipelineStatecalls.tools/chain_check.pyprints one page with one block per link, each with OK / WARN / FAIL and its most likely cause, then the weakest link:disasm.done,<family>_build.json) and its AMDGPU target, spirv-val, and the recorded translator digest against the same digest recomputed frommake_game.py'sTRANSLATION_SOURCES(a test pins it equal totranslation_sources_digest());invalid_words), translated (index entries with their.spv), up to 5 refusal reasons fromlogs/shaders.log;fspx_compute...);--log: modules loaded, failed slot calls by slot and HRESULT, failed D3D12 calls, compute builds, compile-gate waits, device faults, exit code.Counts and fixed words only. A refusal reason is printed only when it matches a message
rdna2spirv.pyraises (read from its source), with a variable part kept only when it is a mnemonic oftools/rdna2_isa_tables.pyor a built-in exception name; everything else counts asother. A D3D12 method name from a trace is printed only when it is a string literal of the runtime's sources (orInterface::Methodwith such an interface), and the end of a boot digest only in the three formsboot.ps1writes. Paths appear only with--show-paths. Standard library only. It reads files; probing runs onlyllvm-mc --version,spirv-val --versionandgit rev-parse(--no-proberuns nothing). Exit 0 (a report), 1 with--stricton FAIL, 2 for bad arguments. Documented indocs/dev-tools.md.Not done here (possible follow-up, separate PR): making
make_game.pyprint "N of M translated" for the library and FSPX and warn on llvm-mc older than 23, and adding the slot failures, failedCreatePipelineStatecalls and tagged/plain count toscripts/windows-boot/boot.ps1's digest. The tool reports; it does not fix, retranslate or change any threshold of the build.Sample report (real work folder after a full build with llvm-mc 21.1.8, and one 783 s boot; work folder path removed):
(abridged: the cause lines of the tools, game, fspx, bvh, exe, contract and runtime blocks and the fspx reasons line are left out, and the bvh/exe count lines are shortened)
Tested
python -I tests/test_chain_check.py: 23 tests OK (synthetic work folders built by the test: broken and clean chains, mixed llvm-mc versions, refusal reasons and trace method names closed to what the sources contain, an index entry without its.spvis not counted, the 1% threshold on both sides, no names/paths without--show-paths, empty and partial folders give n/a or a verdict,--strict,--helpthresholds, digest equal tomake_game.translation_sources_digest(), UTF-16 log with and without BOM). One test reads the runtime sources andboot.ps1and checks the 21 format-string fragments the log patterns depend on, so a reworded log line fails the test instead of silently reporting zero.tests/test_runner_calls_all_tests.py3 OK,tests/test_ci_registration.py16 OK, all 13tests/test_docs_*.pyOK.python -I scripts/check_no_game_data.py tools/chain_check.py tests/test_chain_check.py docs/dev-tools.md: exit 0;git diff --check origin/main..HEADclean.GPUs tested: n/a for the tool; the sample report comes from an NVIDIA RTX 4060, driver 610.88
AI-assisted: yes (Claude Code, Claude Opus 5.5, wrote the tool and its test; a second agent reviewed it)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code