GPU tests: give cs_pk_mul_lo_const its 128 words, keep the exit message of a dump row (TEST-GPU-OOB-AND-HARNESS-MSG) #2453

Open
github-bot wants to merge 1 commit from github-bot/gh-2453 into main AGit
Owner

@⁠Tyrannys on GitHub · 2026-11-27 10:40 UTC · original
Tyrannys:test-gpu-oob-harness-msg → main · +75 −16 · 5 files · 1 commits · open

Claimed in the coordination issue as: TEST-GPU-OOB-AND-HARNESS-MSG (#1608)

What and why

From @⁠kevincommits' finding in #1608 (sections 2 and 3, under GPU-AV with LunarG SDK 1.4.363).

  • cs_pk_mul_lo_const wrote past its buffer. It runs 32 lanes that each store 16 bytes, which is 128 words. scripts/run_gpu_tests.py and runtime/test/shaders/check.py ran it without VKC_OUT_WORDS, so vk_compute_test gave it the default 64 words. Lanes 16-31 then wrote past the end through the buffer's device address (VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819). This is the same kind of bug that 446270b08 and b9864d274 fixed. Both runners now pass VKC_OUT_WORDS=128 (check.PK_MUL_LO_ENV), and the fixture's Run: line says so. The expected words are unchanged.
  • run_gpu_tests.py dropped the failure message. The dump rows (the bounds group, cs_heap_init, cs_user_sgprs) showed the printed words whenever there were any. Under LEONIDA_VK_VALIDATION=1 the program prints the right words and then exits 1 for the validation errors, so the row said FAIL with the expected words and no reason. The new dump_result reports exit N: <program output> for a non-zero exit.

Not included: section 3, the s_barrier for the 8 single-lane LDS-atomic fixtures. The SDK on this PC (1.4.341) has no GPU-AV shared-memory data-race check: all 8 run with 0 validation errors under GPU-AV, before and after. So I can't show here that a change clears anything. It stays open for someone with SDK 1.4.363 or newer.

Tested

On Windows 11 with an RTX 4070 SUPER (NVIDIA 621.01) and Vulkan SDK 1.4.341. vk_compute_test, vk_store_test and vk_harness were built from this branch. The run used VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1, VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true and LEONIDA_VK_VALIDATION=1.

  • vk_compute_test cs_pk_mul_lo_const.spv 1 dump, as on main: exit 1, 6 validation errors, all VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819 (out-of-bounds writes from lanes 16+). With VKC_OUT_WORDS=128: exit 0, no validation errors, and exact words out[0..7] = 0x9e88 0x3675433 0x230000 0x77f6c twice.
  • run_gpu_tests.py --filter cs_pk_mul_lo_const:
    • on main: FAIL cs_pk_mul_lo_const 0x9e88 0x3675433 ..., the expected words with no reason, which is the reported bug;
    • with this change: PASS, 1/1.
  • CPU tests: tests/test_run_gpu_tests.py (74 OK) has a new DumpRowThatExitsNonZero with a fake process result. With main's run_gpu_tests.py and check.py it fails (3 failures). tests/test_shader_checks.py (88 OK) now checks that check.py passes VKC_OUT_WORDS=128.
  • Also run: tests/test_run_gpu_*.py (the other 6 files), tests/test_regen_fixtures.py and tests/test_text_write_line_endings.py all OK, and scripts/check_no_game_data.py on the changed files is clean.

GPUs tested: NVIDIA GeForce RTX 4070 SUPER (profile M, 12 GB desktop), driver 621.01, Windows 11, Vulkan SDK 1.4.341 validation layer with GPU-AV

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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. (n/a, no translator change)

🤖 Generated with Claude Code

**@⁠Tyrannys** on GitHub · 2026-11-27 10:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2453) `Tyrannys:test-gpu-oob-harness-msg` → `main` · +75 −16 · 5 files · 1 commits · open Claimed in the coordination issue as: TEST-GPU-OOB-AND-HARNESS-MSG (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why From @⁠kevincommits' finding in #1608 (sections 2 and 3, under GPU-AV with LunarG SDK 1.4.363). - **`cs_pk_mul_lo_const` wrote past its buffer.** It runs 32 lanes that each store 16 bytes, which is 128 words. `scripts/run_gpu_tests.py` and `runtime/test/shaders/check.py` ran it without `VKC_OUT_WORDS`, so `vk_compute_test` gave it the default 64 words. Lanes 16-31 then wrote past the end through the buffer's device address (`VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819`). This is the same kind of bug that 446270b08 and b9864d274 fixed. Both runners now pass `VKC_OUT_WORDS=128` (`check.PK_MUL_LO_ENV`), and the fixture's `Run:` line says so. The expected words are unchanged. - **`run_gpu_tests.py` dropped the failure message.** The dump rows (the bounds group, `cs_heap_init`, `cs_user_sgprs`) showed the printed words whenever there were any. Under `LEONIDA_VK_VALIDATION=1` the program prints the right words and then exits 1 for the validation errors, so the row said `FAIL` with the expected words and no reason. The new `dump_result` reports `exit N: <program output>` for a non-zero exit. Not included: section 3, the `s_barrier` for the 8 single-lane LDS-atomic fixtures. The SDK on this PC (1.4.341) has no GPU-AV shared-memory data-race check: all 8 run with 0 validation errors under GPU-AV, before and after. So I can't show here that a change clears anything. It stays open for someone with SDK 1.4.363 or newer. ### Tested On Windows 11 with an RTX 4070 SUPER (NVIDIA 621.01) and Vulkan SDK 1.4.341. `vk_compute_test`, `vk_store_test` and `vk_harness` were built from this branch. The run used `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1`, `VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true` and `LEONIDA_VK_VALIDATION=1`. - `vk_compute_test cs_pk_mul_lo_const.spv 1 dump`, as on `main`: exit 1, `6 validation errors`, all `VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819` (out-of-bounds writes from lanes 16+). With `VKC_OUT_WORDS=128`: exit 0, no validation errors, and exact words `out[0..7] = 0x9e88 0x3675433 0x230000 0x77f6c` twice. - `run_gpu_tests.py --filter cs_pk_mul_lo_const`: - on `main`: `FAIL cs_pk_mul_lo_const 0x9e88 0x3675433 ...`, the expected words with no reason, which is the reported bug; - with this change: `PASS`, 1/1. - CPU tests: `tests/test_run_gpu_tests.py` (74 OK) has a new `DumpRowThatExitsNonZero` with a fake process result. With `main`'s `run_gpu_tests.py` and `check.py` it fails (3 failures). `tests/test_shader_checks.py` (88 OK) now checks that `check.py` passes `VKC_OUT_WORDS=128`. - Also run: `tests/test_run_gpu_*.py` (the other 6 files), `tests/test_regen_fixtures.py` and `tests/test_text_write_line_endings.py` all OK, and `scripts/check_no_game_data.py` on the changed files is clean. GPUs tested: NVIDIA GeForce RTX 4070 SUPER (profile M, 12 GB desktop), driver 621.01, Windows 11, Vulkan SDK 1.4.341 validation layer with GPU-AV AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] 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. (n/a, no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cs_pk_mul_lo_const runs 32 lanes that each store 16 bytes, 128 words, but
run_gpu_tests.py and check.py ran it without VKC_OUT_WORDS, so
vk_compute_test gave it the default 64 and lanes 16-31 wrote past the
buffer through its device address (GPU-AV:
VUID-RuntimeSpirv-PhysicalStorageBuffer64-11819). Both runners now pass
VKC_OUT_WORDS=128 (check.PK_MUL_LO_ENV), and the fixture's Run line
says so.

run_gpu_tests.py's dump rows (the bounds group, cs_heap_init,
cs_user_sgprs) showed the printed words whenever there were any. A run
that printed the right words and then exited non-zero (validation
errors) was a FAIL that showed only the expected words. dump_result now
reports "exit N: <output>" for a non-zero exit.

Found by kevincommits in the coordination issue (#1608).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:47:24 +00:00
Author
Owner

@⁠timbot103 on GitHub · 2026-11-27 11:41 UTC · original

Independently verified head e2377070d on Windows 11 Pro 26200 with LunarG Vulkan SDK 1.4.363.0 + GPU-AV (LEONIDA_VK_VALIDATION=1, VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1), WSL llvm-mc 21.1.8, across both NVIDIA GeForce RTX 5080 (616.64) and AMD Radeon(TM) Graphics (25.10.30.02), no game files:

  • Before (origin/main @ 50ce8f51a, GPU-AV on SDK 1.4.363.0):
    • scripts/run_gpu_tests.py --filter cs_pk_mul_lo_const: FAIL (0/1 passed) on BOTH RTX 5080 and AMD Radeon — and as described in the PR, run_gpu_tests.py printed the matching hex words (0x9e88 0x3675433 ...) while silently dropping the validation error reason (vk_compute_test exited 1 under GPU-AV with default 64 words).
  • After (PR #2453 @ e2377070d, GPU-AV on SDK 1.4.363.0):
    • scripts/run_gpu_tests.py --filter cs_pk_mul_lo_const: PASS (1/1 passed) on BOTH RTX 5080 and AMD Radeon, 0 validation errors.
  • Unit tests:
    • tests/test_run_gpu_tests.py: 74/74 OK
    • tests/test_shader_checks.py: 88/88 OK

Clean, surgical fix — confirmed before/after on SDK 1.4.363.0 GPU-AV on both NVIDIA Blackwell and AMD Radeon. AI-assisted.

**@⁠timbot103** on GitHub · 2026-11-27 11:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2453#issuecomment-7217360261) Independently verified head `e2377070d` on Windows 11 Pro 26200 with **LunarG Vulkan SDK `1.4.363.0`** + **GPU-AV** (`LEONIDA_VK_VALIDATION=1`, `VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1`), WSL `llvm-mc 21.1.8`, across both **NVIDIA GeForce RTX 5080** (`616.64`) and **AMD Radeon(TM) Graphics** (`25.10.30.02`), no game files: - **Before (`origin/main` @ `50ce8f51a`, GPU-AV on SDK `1.4.363.0`):** - `scripts/run_gpu_tests.py --filter cs_pk_mul_lo_const`: **FAIL (`0/1 passed`) on BOTH RTX 5080 and AMD Radeon** — and as described in the PR, `run_gpu_tests.py` printed the matching hex words (`0x9e88 0x3675433 ...`) while silently dropping the validation error reason (`vk_compute_test` exited 1 under GPU-AV with default 64 words). - **After (PR `#2453` @ `e2377070d`, GPU-AV on SDK `1.4.363.0`):** - `scripts/run_gpu_tests.py --filter cs_pk_mul_lo_const`: **PASS (`1/1 passed`) on BOTH RTX 5080 and AMD Radeon**, 0 validation errors. - **Unit tests:** - `tests/test_run_gpu_tests.py`: **74/74 OK** - `tests/test_shader_checks.py`: **88/88 OK** Clean, surgical fix — confirmed before/after on SDK `1.4.363.0` GPU-AV on both NVIDIA Blackwell and AMD Radeon. AI-assisted.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2453/head:github-bot/gh-2453'
git switch 'github-bot/gh-2453'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2453'
git switch 'github-bot/gh-2453'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2453'
git switch 'github-bot/gh-2453'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2453'
git switch 'main'
git merge --squash 'github-bot/gh-2453'
git switch 'main'
git merge --ff-only 'github-bot/gh-2453'
git switch 'main'
git merge 'github-bot/gh-2453'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.