Skip to content

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

Open
TanmaySatyam wants to merge 3 commits into
ProjectLeonida:mainfrom
TanmaySatyam:test/old-9904-gpu-saveexec-ext
Open

TanmaySatyam wants to merge 3 commits into
ProjectLeonida:mainfrom
TanmaySatyam:test/old-9904-gpu-saveexec-ext

Conversation

@TanmaySatyam

Copy link
Copy Markdown
Contributor

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.

@trigger337

Copy link
Copy Markdown
Contributor

Hardware verification report for cs_w32_saveexec_ext on native AMD RDNA2 GPU:

Environment:

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

LouisRiverstone and others added 3 commits November 25, 2026 14:19
…eonida#1657

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.
@TanmaySatyam
TanmaySatyam force-pushed the test/old-9904-gpu-saveexec-ext branch from 7d667b0 to 72bc8d3 Compare November 25, 2026 08:49
@CodingRule

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot removed the needs rebase Conflicts with the base branch: rebase it on main label Nov 25, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants