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

Closed
fin-github wants to merge 1 commit from upstream-pr/1326 into main
fin-github commented 2026-11-24 21:54:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fin-github on 2026-11-24T21:54:46Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480975962 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1326). Originally posted by [fin-github](https://github.com/fin-github) on 2026-11-24T21:54:46Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T23:29:25Z.


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7147458494 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1326#issuecomment-7147458494). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-24T23:29:25Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T02:50:17Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232625610 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1326#issuecomment-7232625610). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T02:50:17Z. --- 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 commented 2026-12-01 11:53:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:53:52Z.

Review: CHANGES_REQUESTED


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.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130727978 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1326#pullrequestreview-6130727978). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:53:52Z. **Review:** CHANGES_REQUESTED --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:34:52Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317842220 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1326#issuecomment-7317842220). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:34:52Z. --- 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.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1326
No description provided.