Commit Graph

4 Commits

Author SHA1 Message Date
8ceb5ef4b3 chain_check: read the slow compute pipeline line as the runtime prints it now
The line says where the pipeline came from since 7acf84d38, so the pin in
tests/test_chain_check.py failed on main. Only a compile counts as a build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:09:06 +01:00
2dd72a4536 chain_check: name the UTF-8 reader read_utf8, not read_text
tests/test_text_encoding.py flagged tools/chain_check.py:230, 425 and 624
(DadaCap asked for this fix on #2231). The calls go to the file's own
helper, which opens with encoding="utf-8-sig", but the test takes any
call named read_text for pathlib's unpinned method. The helper is now
read_utf8; nothing else changes.

Tested: test_text_encoding.py names no chain_check line any more (its one
remaining failure, scripts/windows-boot/test_crash_monitor.py:37 and :90,
is red on main too); test_chain_check.py 24 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDMsHtPdJ5kt8t7A5i2fzu
2026-11-29 09:50:25 +00:00
044e27122f chain_check: close the free-text filters and pin the runtime lines it 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>
2026-11-26 09:31:57 +01:00
d41d6a16bb tools: chain_check.py, one page of counts for the whole shader chain (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>
2026-11-26 09:05:37 +01:00