GPU test runners: report failed compute dumps after subgroup warnings (DRAFT-125) #1326

Closed
leonida/mandy
fin-github wants to merge 0 commits from codex/draft-125 into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

fin-github commented 2026-11-24 21:54:46 +00:00

Claimed in the coordination issue as: DRAFT-125 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145519617).

What and why

Supersedes draft #125 (old PR 9859 by WebIdentity1) and preserves the original commit author. A requested subgroup size can be unavailable, yet the fallback dispatch can still run. In dump mode, both GPU test runners now require a complete eight-word dump, no validation errors, and status 0 or 1 before treating an unpinned dispatch as a skip. The reserved exit-77 path still handles unsupported devices.

Tested

  • Added regression cases reproduced on upstream main at 4a50cafc7. The two runners incorrectly skipped synthetic child failures with an unpinned subgroup warning.
  • Windows 11, CPython 3.14.4: python -I tests/test_run_gpu_tests.py (65 passed) and python -I tests/test_shader_checks.py (88 passed). The cases also exercise legitimate unpinned and exit-77 skips.
  • python -I -m py_compile runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/test_run_gpu_tests.py tests/test_shader_checks.py, python -I scripts/run_gpu_tests.py --help, python -I scripts/check_no_game_data.py runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/test_run_gpu_tests.py tests/test_shader_checks.py, and git diff --check upstream/main...HEAD passed.

GPUs tested: N/A (synthetic child output, CPU only).

AI-assisted: yes (Codex).

Checklist

  • Based on upstream main; the original commit applied cleanly.
  • One topic.
  • No game data, keys, or decryption.

Translator contract: N/A.

Claimed in the coordination issue as: DRAFT-125 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7145519617). ### What and why Supersedes draft #125 (old PR 9859 by WebIdentity1) and preserves the original commit author. A requested subgroup size can be unavailable, yet the fallback dispatch can still run. In dump mode, both GPU test runners now require a complete eight-word dump, no validation errors, and status 0 or 1 before treating an unpinned dispatch as a skip. The reserved exit-77 path still handles unsupported devices. ### Tested - Added regression cases reproduced on upstream `main` at `4a50cafc7`. The two runners incorrectly skipped synthetic child failures with an unpinned subgroup warning. - Windows 11, CPython 3.14.4: `python -I tests/test_run_gpu_tests.py` (65 passed) and `python -I tests/test_shader_checks.py` (88 passed). The cases also exercise legitimate unpinned and exit-77 skips. - `python -I -m py_compile runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/test_run_gpu_tests.py tests/test_shader_checks.py`, `python -I scripts/run_gpu_tests.py --help`, `python -I scripts/check_no_game_data.py runtime/test/shaders/check.py scripts/run_gpu_tests.py tests/test_run_gpu_tests.py tests/test_shader_checks.py`, and `git diff --check upstream/main...HEAD` passed. GPUs tested: N/A (synthetic child output, CPU only). AI-assisted: yes (Codex). ### Checklist - [x] Based on upstream `main`; the original commit applied cleanly. - [x] One topic. - [x] No game data, keys, or decryption. Translator contract: N/A.
whoalin1 commented 2026-11-24 23:29:25 +00:00

Independent verification (AI-assisted, overnight review batch):

  • Checked out d646d67; diff touches runtime/test/shaders/check.py (new unpinned_compute_dump_skip, used for dump mode), scripts/run_gpu_tests.py (subgroup_pin_skip now takes the exit code), and both test files.
  • Logic reviewed: skip now requires exit code 0/1, no N validation errors line (matches the %u validation errors format printed by vk_validation.h:72 only when count > 0), and a complete out[0..7] line before unpinned_subgroup_skip can skip. Non-dump modes keep the old rule.
  • python -I -m pytest tests/test_run_gpu_tests.py tests/test_shader_checks.py: 157 passed + 458 subtests (includes the new synthetic-child regression cases for exit 0/1/2/77, validation-error and incomplete-dump variants).
  • python -I scripts/check_no_game_data.py on all four changed files: clean. py -3.14 -m compileall -q tools tests make_game.py: clean.
  • No GPU needed (all tests stub the child process); no game files.
  • One observation, non-blocking: for NON-dump compute modes the unpinned-subgroup skip still applies before the code != 0 failure check, so an exotic exit code (e.g. 2) plus the warning would still skip there. vk_compute_test only exits 0/1/77 in practice, so this is theoretical; possibly worth a follow-up note.
  • LGTM.
Independent verification (AI-assisted, overnight review batch): - Checked out d646d67; diff touches `runtime/test/shaders/check.py` (new `unpinned_compute_dump_skip`, used for dump mode), `scripts/run_gpu_tests.py` (`subgroup_pin_skip` now takes the exit code), and both test files. - Logic reviewed: skip now requires exit code 0/1, no `N validation errors` line (matches the `%u validation errors` format printed by vk_validation.h:72 only when count > 0), and a complete `out[0..7]` line before `unpinned_subgroup_skip` can skip. Non-dump modes keep the old rule. - `python -I -m pytest tests/test_run_gpu_tests.py tests/test_shader_checks.py`: 157 passed + 458 subtests (includes the new synthetic-child regression cases for exit 0/1/2/77, validation-error and incomplete-dump variants). - `python -I scripts/check_no_game_data.py` on all four changed files: clean. `py -3.14 -m compileall -q tools tests make_game.py`: clean. - No GPU needed (all tests stub the child process); no game files. - One observation, non-blocking: for NON-dump compute modes the unpinned-subgroup skip still applies before the `code != 0` failure check, so an exotic exit code (e.g. 2) plus the warning would still skip there. vk_compute_test only exits 0/1/77 in practice, so this is theoretical; possibly worth a follow-up note. - LGTM.
MoonEyes commented 2026-11-28 02:50:17 +00:00

Hi @fin-github, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/test/shaders/check.py, tests/test_shader_checks.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

Hi @fin-github, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/test/shaders/check.py`, `tests/test_shader_checks.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 reviewed 2026-12-01 11:53:52 +00:00
aslan2142 left a comment
No description provided.
Reviewed against current `main`: reporting failed compute dumps after subgroup warnings in `runtime/test/shaders/check.py` and `scripts/run_gpu_tests.py` looks good, but this branch conflicts with `main` in `runtime/test/shaders/check.py` and has failing CI. Please rebase onto current `main` so CI runs cleanly. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 16:34:52 +00:00

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.
Sign in to join this conversation.
No description provided.