Commit Graph

9 Commits

Author SHA1 Message Date
c4bee344ef Merge pull request #2399 from AAyberkU 2026-11-22 13:14:44 -05:00
0dd29b21c7 Merge pull request #2344 from Alex Arenas 2026-11-22 13:14:03 -05:00
a1343528f7 scripts, viewer: a redirected stdout no longer dies on a path outside the code page
Under `python -I` on Windows a redirected stdout is strict ANSI, so printing a path with a character outside the
code page raised UnicodeEncodeError. tools/ guards against it at the start of every __main__ block and
tests/test_tool_stdout_encoding.py enforces that, but only for tools/. viewer/serve.py died before it started
serving and scripts/audit_shader4_regs.py exited 1 after writing its report; bench_wave64.py and run_gpu_tests.py
print the same kind of output unguarded. All four get the guard, and the check now covers scripts/ and viewer/.

Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
2026-11-22 19:55:36 +03:00
ee376e5723 scripts/bench_wave64.py: match Linux Mesa RADV (*amd*,*radeon*) in VK_LOADER_DRIVERS_SELECT
Use a comma-separated glob list (*amd*,*radeon*) for the AMD configurations in scripts/bench_wave64.py so the Vulkan Loader selects Linux Mesa RADV (radeon_icd.x86_64.json) in addition to Windows AMD (amd-vulkan64.json) and AMDVLK (amd_icd64.json).

Addresses @ddm-j's finding in #2300.
2026-11-22 17:43:25 +01:00
0316d855bc fix(bench): report incomplete wave64 comparisons
A failed GPU configuration already makes the benchmark exit unsuccessfully, but the final line still claims all outputs match. Identify missing results in the summary so the text agrees with the outcome.
2026-11-22 16:58:07 +01:00
50179c110b bench_wave64.py: require positive launch counts 2026-11-22 12:58:28 +01:00
2a802ec630 bench_wave64.py: a configuration that fails partway is a failure
Each process added its output hash to `hashes` before a later process of
the same configuration could fail. The failed configuration got no row,
but its partial hashes stayed, so the "every configuration ran" check
passed, it was compared as if it had run, and the script could print
"emulated output equals the reference" and exit 0. A reference that
failed after its first process was used as the reference all the same.

Hashes are now kept only for a configuration whose every process ran.
The test replaces the builds and the GPU runs with stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 21:01:32 -03:00
047d4d9b60 Wave64 emulation: guard the chained voted branch, more tests, bench reference
Raise Unsupported when a voted branch's segment was not started by the vote's
own round. New tests cs_w64x_mask_reuse2 (EXEC reuse, read after a store,
half of a mask pair rewritten, chained successor starting with a conflicting
load) and cs_w64x_chain_barrier (chained successor starting with s_barrier),
plus a translation test counting mask exchanges. bench_wave64.py reports a
missing bench line readably and compares against the native AMD output.
design.md: how the rules were confirmed, current GPU counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:52:35 +01:00
cdaef79a7d Wave64 emulation: fewer rounds (reuse mask exchanges, chain voted branches), benchmark
A whole-mask read of a register value already exchanged in the block reuses
the exchange; a block ending in a voted branch runs its successor in the
round that reads the vote. Adds scripts/bench_wave64.py, cs_bench_mix,
VKC_BENCH timing in vk_compute_test and the cs_w64x_mask_reuse test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 22:52:35 +01:00