Skip to content

fix(bench): report incomplete wave64 comparisons - #2102

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
Vonsek:codex/wave64-bench-incomplete
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
Vonsek:codex/wave64-bench-incomplete

Conversation

@Vonsek

@Vonsek Vonsek commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: incomplete wave64 benchmark comparison

What and why

Since #491, the benchmark returns exit 1 when an emulated configuration fails. Its final line could still say the outputs matched the reference even when a configuration had no complete result. The summary now names any missing configurations and prints the match confirmation only after all configurations complete and agree.

Tested

  • Windows, Python 3.12.10. The regression failed on 4eb6155d and passed with the change.
  • python -I tests/test_bench_wave64.py passed all four tests. Compile and diff checks passed.
  • The tests use stubbed benchmark processes. No GPU or driver was needed.

Checklist

  • 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. (Inapplicable to benchmark reporting.)

AI-assisted (Codex).

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.
@AvantBras

Copy link
Copy Markdown
Contributor

Independent check at 0316d855bcc6d7705a53ad0fcf0bd6579f54d318 on Pop!_OS 22.04 / Python 3.12. python -I tests/test_bench_wave64.py: 4/4, including the stubbed incomplete-emulated-configuration case. Also ran python -I scripts/bench_wave64.py --build <build> --groups 64 --reps 2 --procs 1 with the #2048 Linux vk_compute_test on an RTX 3060 (580.178.04), no AMD device. NVIDIA emulation ran; the AMD runs were unavailable, and the script exited 1 with no reference output from AMD native: cannot compare, without claiming an output match. This real run covers the missing-reference branch; the regression test covers the changed missing-emulated-result branch. No game files. AI-assisted verification.

@ddm-j

ddm-j commented Nov 22, 2026 •

Copy link
Copy Markdown

Tested 0316d85 on AMD Radeon 610M (RDNA2 iGPU, RADV Mesa 26.2.6) and NVIDIA RTX 4070 Ti (615.78.08), Fedora 45: pass

This is the first run with an AMD device. It reproduces the bug on real hardware. In the case where the AMD native reference completes and the NVIDIA configuration fails, run with LEONIDA_VK_DEVICE=RAPHAEL so that NVIDIA matches no device:

main 4eb6155 this PR
Last line emulated output equals the reference incomplete comparison: no complete result from NVIDIA --wave64-emulate
Exit code 1 1
All three configs complete emulated output equals the reference same

python -I tests/test_bench_wave64.py: 4/4 OK. run_gpu_tests.py gives the same as main on both GPUs: RADV 167/180, 13 skipped; NVIDIA 136/180, 44 skipped; NVIDIA with LEONIDA_W64_EMULATE=1 167/180, 13 skipped.

Pre-existing and unrelated to this PR: on Linux, CONFIGS' VK_LOADER_DRIVERS_SELECT='*amd*' matches no driver. RADV's manifest is radeon_icd.x86_64.json, so both AMD configurations fail with vkCreateInstance -> -9 on main too. The runs above used a local *radeon* substitution, not committed. Posted as a finding: #2300 (comment)

Commands
python3 -I scripts/bench_wave64.py --build runtime/build/linux --groups 64 --reps 2 --procs 1                          # complete case
LEONIDA_VK_DEVICE=RAPHAEL python3 -I scripts/bench_wave64.py --build runtime/build/linux --groups 64 --reps 2 --procs 1  # NVIDIA config fails

Test programs built from each commit (CMake/Ninja), llvm-mc 23.1.5, SPIRV-Tools 2026.2, Python 3.13.

AI-assisted (Claude Code); numbers copied from the run logs.

@zneel

zneel commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Tested 0316d855 on AMD Radeon RX 9070 XT (RDNA4, subgroup 32..64), AMD 26.11.2, Windows 11 Pro 10.0.26300, AMD Ryzen 7 9800X3D CPU (64 GB RAM), Python 3.12.10: pass. The bug reproduces on real hardware, and this head fixes it.

python -I scripts/bench_wave64.py --groups 4096 --reps 3 --procs 2 with vk_compute_test built from main. There's no NVIDIA GPU in this PC, so the "NVIDIA --wave64-emulate" configuration fails with vkCreateInstance -> -9 on both sides:

merge-base 4eb6155d this head
exit code 1 1
last line emulated output equals the reference incomplete comparison: no complete result from NVIDIA --wave64-emulate

AMD native and AMD --wave64-emulate completed on both, with reference hash a8a855ac. Before, the summary claimed a full match although one configuration never ran; now it names the missing one. The base run's timings are noisy because a build was running at the same time, but they don't affect the comparison.

python -I tests/test_bench_wave64.py: 4 OK. No game files.

AI-assisted (Claude Code); I checked the results.

@ItsNotRexed
ItsNotRexed merged commit 2d692a3 into ItsNotRexed:main Nov 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants