tests: GPU fixture cs_w32_saveexec_ext for extended saveexec/wrexec kinds (OLD-9904) #654

Open
github-bot wants to merge 3 commits from github-bot/gh-654 into main AGit
Owner

@⁠TanmaySatyam on GitHub · 2026-11-24 11:01 UTC · original
TanmaySatyam:test/old-9904-gpu-saveexec-ext → main · +269 −4 · 5 files · 3 commits · open

Claimed in the coordination issue as: OLD-9904

AI-assisted.

What and why

Carries forward old-pr/9904 (draft #169, original author LouisRiverstone / Luiz Neves) onto main (21625bca8), preserving both original author commits and adding one follow-up commit to mark runtime/test/shaders/cs_w32_saveexec_ext.asm for tests/semantic/regen_fixtures.py (main's marker-based discovery):

  1. Preserved commits (Luiz Neves): Adds the wave32 GPU fixture runtime/test/shaders/cs_w32_saveexec_ext.asm (covering s_xor_saveexec, s_andn1_saveexec, s_orn1_saveexec, s_orn2_saveexec, s_nand_saveexec, s_nor_saveexec, s_xnor_saveexec, and s_andn1_wrexec), registers it in runtime/test/shaders/check.py and scripts/run_gpu_tests.py, and adds CPU semantic tests (tests/semantic/test_saveexec_ext_fixture.py).
  2. Rebase adaptation commit: Adds the ; regen_fixtures: header marker to runtime/test/shaders/cs_w32_saveexec_ext.asm so tests/test_regen_fixtures.py passes on current main.

Testing & Verification

  • GPUs tested: NVIDIA GeForce RTX 5070 (Blackwell, Driver 591.74, Windows 11, Vulkan validation enabled, VKC_SUBGROUP_SIZE=32):
    • vk_compute_test cs_w32_saveexec_ext.spv 1 dump → 1 groups x 64: 0 mismatches, out[0..7] = 4096 2560 6656 5642 4608 542 4106 2560 (0x1000, 0xA00, 0x1A00, 0x160A, 0x1200, 0x21E, 0x100A, 0xA00, 0 validation errors).
  • python -I tests/semantic/test_saveexec_ext_fixture.py -v (3/3 OK)
  • python -I tests/test_regen_fixtures.py (7/7 OK)
  • python -I tests/test_text_write_line_endings.py (3/3 OK)
  • Clean-room verified: python -I scripts/check_no_game_data.py exited 0 on all modified/added files.
**@⁠TanmaySatyam** on GitHub · 2026-11-24 11:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/654) `TanmaySatyam:test/old-9904-gpu-saveexec-ext` → `main` · +269 −4 · 5 files · 3 commits · open Claimed in the coordination issue as: OLD-9904 AI-assisted. ### What and why Carries forward `old-pr/9904` (draft #169, original author `LouisRiverstone` / Luiz Neves) onto `main` (`21625bca8`), preserving both original author commits and adding one follow-up commit to mark `runtime/test/shaders/cs_w32_saveexec_ext.asm` for `tests/semantic/regen_fixtures.py` (`main`'s marker-based discovery): 1. **Preserved commits (`Luiz Neves`):** Adds the wave32 GPU fixture `runtime/test/shaders/cs_w32_saveexec_ext.asm` (covering `s_xor_saveexec`, `s_andn1_saveexec`, `s_orn1_saveexec`, `s_orn2_saveexec`, `s_nand_saveexec`, `s_nor_saveexec`, `s_xnor_saveexec`, and `s_andn1_wrexec`), registers it in `runtime/test/shaders/check.py` and `scripts/run_gpu_tests.py`, and adds CPU semantic tests (`tests/semantic/test_saveexec_ext_fixture.py`). 2. **Rebase adaptation commit:** Adds the `; regen_fixtures:` header marker to `runtime/test/shaders/cs_w32_saveexec_ext.asm` so `tests/test_regen_fixtures.py` passes on current `main`. ### Testing & Verification - **GPUs tested:** NVIDIA GeForce RTX 5070 (Blackwell, Driver 591.74, Windows 11, Vulkan validation enabled, `VKC_SUBGROUP_SIZE=32`): - `vk_compute_test cs_w32_saveexec_ext.spv 1 dump` → `1 groups x 64: 0 mismatches`, `out[0..7] = 4096 2560 6656 5642 4608 542 4106 2560` (`0x1000, 0xA00, 0x1A00, 0x160A, 0x1200, 0x21E, 0x100A, 0xA00`, 0 validation errors). - `python -I tests/semantic/test_saveexec_ext_fixture.py -v` (3/3 OK) - `python -I tests/test_regen_fixtures.py` (7/7 OK) - `python -I tests/test_text_write_line_endings.py` (3/3 OK) - Clean-room verified: `python -I scripts/check_no_game_data.py` exited 0 on all modified/added files.
s_xor/andn1/orn1/orn2/nand/nor/xnor_saveexec_b32 and s_andn1_wrexec_b32
were merged with CPU checks only. cs_w32_saveexec_ext.asm runs each with
EXEC = lanes 0..23 and S0 = lanes 10..29 (from compares) and stores
(s_bcnt1 << 8) | s_ff1 of the new EXEC, a whole-wave word. It is a wave32
lane-mask dump (WAVE32_LANE_DUMPS), skipped below 32 lanes.

tests/semantic/test_saveexec_ext_fixture.py runs the fixture on the CPU
against tools/cf_ref.py's _SAVEEXEC and checks both runners expect the
same words.
python -I on the file failed with ModuleNotFoundError: support, as the folder
was not on sys.path (@Yourrespawn noted it on this PR, @justr4mzi on #4323).
It is now inserted, as test_cs_shared_memory_limit does.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:14:08 +00:00
Author
Owner

@⁠trigger337 on GitHub · 2026-11-24 11:05 UTC · original

Hardware verification report for cs_w32_saveexec_ext on native AMD RDNA2 GPU:

Environment:

  • GPU: AMD Radeon RX 6900 XT (RADV NAVI21, RDNA2, subgroup size 32..64)
  • Driver: Mesa 26.2.5-cachyos1.1 (Vulkan 1.4.333)
  • Host: Linux CachyOS (x86_64, kernel 7.3.1-2-cachyos)
  • Python: 3.14.3
  • Tree: PR #654 (test/old-9904-gpu-saveexec-ext) based on upstream main

Results:

  1. python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_w32_saveexec_ext --require-pass:
    • Translation: 1/1 (100%)
    • SPIR-V validation: 1/1 pass (spirv-val)
    • GPU readback: PASS cs_w32_saveexec_ext 4096 2560 6656 5642 4608 542 4106 2560 (1/1 passed)
  2. Emulated run (LEONIDA_W64_EMULATE=1):
    • GPU readback: PASS cs_w32_saveexec_ext 4096 2560 6656 5642 4608 542 4106 2560 (1/1 passed)
  3. Semantic and fixture tests:
    • python3 tests/semantic/test_saveexec_ext_fixture.py: 3/3 OK
    • python3 -m unittest tests/test_regen_fixtures.py tests/test_text_write_line_endings.py: 10/10 OK
    • python3 scripts/check_no_game_data.py: clean.

Confirms correct hardware execution on native AMD RDNA2 hardware.

agent: yes
AI-assisted: yes

**@⁠trigger337** on GitHub · 2026-11-24 11:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/654#issuecomment-7129641878) Hardware verification report for `cs_w32_saveexec_ext` on native AMD RDNA2 GPU: **Environment:** - GPU: AMD Radeon RX 6900 XT (RADV NAVI21, RDNA2, subgroup size 32..64) - Driver: Mesa 26.2.5-cachyos1.1 (Vulkan 1.4.333) - Host: Linux CachyOS (x86_64, kernel 7.3.1-2-cachyos) - Python: 3.14.3 - Tree: PR #654 (`test/old-9904-gpu-saveexec-ext`) based on upstream `main` **Results:** 1. `python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_w32_saveexec_ext --require-pass`: - Translation: 1/1 (100%) - SPIR-V validation: 1/1 pass (`spirv-val`) - GPU readback: `PASS cs_w32_saveexec_ext 4096 2560 6656 5642 4608 542 4106 2560` (1/1 passed) 2. Emulated run (`LEONIDA_W64_EMULATE=1`): - GPU readback: `PASS cs_w32_saveexec_ext 4096 2560 6656 5642 4608 542 4106 2560` (1/1 passed) 3. Semantic and fixture tests: - `python3 tests/semantic/test_saveexec_ext_fixture.py`: 3/3 OK - `python3 -m unittest tests/test_regen_fixtures.py tests/test_text_write_line_endings.py`: 10/10 OK - `python3 scripts/check_no_game_data.py`: clean. Confirms correct hardware execution on native AMD RDNA2 hardware. agent: yes AI-assisted: yes
Author
Owner

@⁠CodingRule on GitHub · 2026-11-25 12:20 UTC · original

GPU test on an NVIDIA Ada card, for the record: this passes on an RTX 4090.

  • Tested: this branch's head 72bc8d3d merged onto main 0d80bc5d (clean merge), test programs built from that main with scripts\build_runtime.ps1.
  • Command: python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_saveexec_ext, once native and once with LEONIDA_W64_EMULATE=1.
  • Result: 1/1 translated and spirv-val clean, 1/1 passed in both modes, with the expected words/pixels from the fixture header. Nothing skipped.
  • Device: NVIDIA GeForce RTX 4090 (Ada / AD102), driver 591.86, Vulkan 1.4.325, subgroup 32..32, Windows 11 Pro build 26200. llvm-mc 21.1.8 (scripts\build_llvm_mc.ps1), SPIRV-Tools v2026.4, MSVC 14.44.35207.

Only the filtered fixture(s) were run for this PR, not the full suite or ctest; the full-suite baseline for this card on main is in #1777. Synthetic fixtures only, no game files. AI-assisted (Claude Code ran the tests and wrote this comment).

**@⁠CodingRule** on GitHub · 2026-11-25 12:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/654#issuecomment-7162234863) GPU test on an NVIDIA Ada card, for the record: this passes on an **RTX 4090**. - **Tested:** this branch's head `72bc8d3d` merged onto `main` `0d80bc5d` (clean merge), test programs built from that `main` with `scripts\build_runtime.ps1`. - **Command:** `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_saveexec_ext`, once native and once with `LEONIDA_W64_EMULATE=1`. - **Result:** 1/1 translated and `spirv-val` clean, 1/1 passed in both modes, with the expected words/pixels from the fixture header. Nothing skipped. - **Device:** NVIDIA GeForce RTX 4090 (Ada / AD102), driver 591.86, Vulkan 1.4.325, subgroup 32..32, Windows 11 Pro build 26200. llvm-mc 21.1.8 (`scripts\build_llvm_mc.ps1`), SPIRV-Tools v2026.4, MSVC 14.44.35207. Only the filtered fixture(s) were run for this PR, not the full suite or ctest; the full-suite baseline for this card on `main` is in #1777. Synthetic fixtures only, no game files. AI-assisted (Claude Code ran the tests and wrote this comment).
This pull request has changes conflicting with the target branch.
  • runtime/test/shaders/check.py
  • scripts/run_gpu_tests.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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