[PR #481] TEST-PK-MUL-GPUAV: size and verify the packed-multiply fixture for all lanes #530

Open
opened 2026-11-26 20:18:11 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/481
Author: @csmith105
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: codex/pk-mul-gpuav-buffer


📝 Commits (1)

  • b402eca Fix packed-multiply GPU fixture allocation and full-lane checks

📊 Changes

4 files changed (+130 additions, -6 deletions)

View changed files

📝 runtime/test/shaders/check.py (+11 -2)
📝 scripts/run_gpu_tests.py (+7 -4)
➕ tests/test_pk_mul_lo_gpu_fixture.py (+110 -0)
📝 tests/test_shader_checks.py (+2 -0)

📄 Description

Claimed in the coordination issue as: TEST-PK-MUL-GPUAV

What and why

cs_pk_mul_lo_const dispatches 32 lanes that each read/write four words, requiring 512 bytes. Both GPU runners used the harness default 256-byte output buffer and checked only the first eight console words. With GPU-assisted validation, stores from lane 16 onward go out of bounds even though those first words match the oracle (the outstanding finding reported with #382).

Use one shared fixture helper in both runners to allocate 128 words and compare every lane's readback. Keep nonzero harness exits and missing, short, or corrupt readbacks as failures. Shader translation, the synthetic shader, and global harness defaults are unchanged.

Tested

Native Windows 11, NVIDIA RTX 3080 10 GB, driver 610.88, SPIRV-Tools 2026.4, Khronos validation layer 1.4.357.0; wave64 emulation and GPU-assisted validation enabled:

  • Baseline default allocation: exit 1 with an out-of-bounds store at invocation 16, buffer size 256 bytes.
  • Same SPIR-V with the required allocation: exit 0; all 128 words match the fixture's recorded RDNA2 oracle.
  • Patched run_gpu_tests.py --filter cs_pk_mul_lo_const --require-pass using checked-in disassembly: 1/1 translated, 1/1 passed spirv-val, GPU pass with 128/128 exact words. Before/after SPIR-V is byte-identical.
  • Legacy shared fixture helper also passes on the GPU under the same settings.
  • Focused Python tests pass: fixture regression (3), shader checks (87), GPU runner (62), readback checks (1). They cover full allocation, validation environment/subgroup forwarding, corrupted final lane, incomplete/missing dump, and nonzero harness status.
  • Full translator semantic suite: 465 files / 6,104 tests, zero failed files in 393 seconds (python -I scripts/run_semantic_tests.py tests/semantic -j 8, SPIRV-Tools available). Compilation, CLI smoke, no-game-data checks and git diff --check also pass. Independent source review found no blockers.

GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 610.88, Windows 11 build 26300.

AI-assisted: yes, OpenAI Codex, supervised through csmith105's session.

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption, including in quoted logs.
  • Translator contract table: not applicable; no translator rule changes.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/481 **Author:** [@csmith105](https://github.com/csmith105) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/pk-mul-gpuav-buffer` --- ### 📝 Commits (1) - [`b402eca`](https://github.com/ubiquitarianism/leonida/commit/b402eca924ec5f650aed0e3e5aeeff265a580cae) Fix packed-multiply GPU fixture allocation and full-lane checks ### 📊 Changes **4 files changed** (+130 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/shaders/check.py` (+11 -2) 📝 `scripts/run_gpu_tests.py` (+7 -4) ➕ `tests/test_pk_mul_lo_gpu_fixture.py` (+110 -0) 📝 `tests/test_shader_checks.py` (+2 -0) </details> ### 📄 Description Claimed in the coordination issue as: [TEST-PK-MUL-GPUAV](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123460735) ### What and why `cs_pk_mul_lo_const` dispatches 32 lanes that each read/write four words, requiring 512 bytes. Both GPU runners used the harness default 256-byte output buffer and checked only the first eight console words. With GPU-assisted validation, stores from lane 16 onward go out of bounds even though those first words match the oracle (the outstanding finding reported with #382). Use one shared fixture helper in both runners to allocate 128 words and compare every lane's readback. Keep nonzero harness exits and missing, short, or corrupt readbacks as failures. Shader translation, the synthetic shader, and global harness defaults are unchanged. ### Tested Native Windows 11, NVIDIA RTX 3080 10 GB, driver 610.88, SPIRV-Tools 2026.4, Khronos validation layer 1.4.357.0; wave64 emulation and GPU-assisted validation enabled: - Baseline default allocation: exit 1 with an out-of-bounds store at invocation 16, buffer size 256 bytes. - Same SPIR-V with the required allocation: exit 0; all 128 words match the fixture's recorded RDNA2 oracle. - Patched `run_gpu_tests.py --filter cs_pk_mul_lo_const --require-pass` using checked-in disassembly: 1/1 translated, 1/1 passed spirv-val, GPU pass with 128/128 exact words. Before/after SPIR-V is byte-identical. - Legacy shared fixture helper also passes on the GPU under the same settings. - Focused Python tests pass: fixture regression (3), shader checks (87), GPU runner (62), readback checks (1). They cover full allocation, validation environment/subgroup forwarding, corrupted final lane, incomplete/missing dump, and nonzero harness status. - Full translator semantic suite: 465 files / 6,104 tests, zero failed files in 393 seconds (`python -I scripts/run_semantic_tests.py tests/semantic -j 8`, SPIRV-Tools available). Compilation, CLI smoke, no-game-data checks and `git diff --check` also pass. Independent source review found no blockers. GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 610.88, Windows 11 build 26300. AI-assisted: yes, OpenAI Codex, supervised through csmith105's session. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption, including in quoted logs. - [x] Translator contract table: not applicable; no translator rule changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#530
No description provided.