Repository navigation
tests: a GPU fixture and whole-corpus counts for one-register wave64 mask destinations (TEST-W64-SDST-PAIR-GPU) - #1090
Conversation
…mask destinations (TEST-W64-SDST-PAIR-GPU) SHADER-W64-SDST-PAIR makes the SGPR a wave64 VALU instruction names for a lane mask the pair it is on hardware. Its own test compares the two printed forms on the interpreter; this adds what it does not have. cs_w64x_cmp_sdst is written like the game's listings (no mattr line, so llvm-mc prints one register): six compares and a carry-out whose pairs are read back across both halves by s_and_b64, s_or_b64, s_xor_b64, s_andn2_b64, s_and_saveexec_b64, s_mov_b64 exec, s_bcnt1 / s_ff1 and SCC. RTX 4070 Ti (620.70.06, subgroup 32) under LEONIDA_W64_EMULATE=1: the eight words its header derives; main before the rule gave none of them. docs/design.md gets the counts over all 26,503 shaders: every one of the 292,733 one-register compares in wave64 code names an even register, 13,314 wave64 shaders read such a pair back, the rule's full translation passes spirv-val 26,503 of 26,503, and 504 wave64 VS/PS leave SHADER-10 tier C (8,245 to 7,741). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
KernelSmoker
left a comment
There was a problem hiding this comment.
Independently checked exact head 9f1a072. The focused fixture suite passes 8/8. On an RTX 3090 (NVIDIA subgroup 32), LEONIDA_W64_EMULATE=1 with run_gpu_tests.py --filter cs_w64x_cmp_sdst passed 1/1 and returned the expected eight words: 10240 6144 2053 8224 7714 6184 4144 5. The generated module also passed spirv-val --target-env vulkan1.2 in the Fedora tool container (the host runner itself skipped validation because spirv-val is not installed on the host). This is an independent subgroup-32 emulation result, not native wave64 hardware validation. Upstream changes since the PR's base do not touch its changed files; GitHub reports this head mergeable.
|
The new
Each cell is the number of readback words matching the fixture's ISA-derived reference on each of three independent dispatches. Used the same PR fixture and Windows Vulkan harness throughout, switching only the translator revision and execution mode. The harness confirmed the selected adapter and subgroup size. All four translated modules passed This exercises the translated Vulkan path on hardware. The expected words come from the fixture's reference calculation. Only the repo's synthetic fixture was used. AI-assisted: yes (OpenAI Codex). |
|
Independently verified Both modules passed |
|
Tested
This runs translated SPIR-V, not native RDNA2 code. Not tested: game corpus. AI-assisted (Claude Code) |
Brings the branch up to date with main 68d1331. No conflicts; the merged tree was tested before the push (every standalone test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since ProjectLeonida#930). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main now holds ProjectLeonida#1021 (SHADER-W64-SDST-PAIR), which this branch was stacked on. No conflict by hand: the TEST-W64-SDST-PAIR-GPU row stays right under ProjectLeonida#1021's row in docs/design.md. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Fourteen commits main gained after ProjectLeonida#968: ProjectLeonida#413, ProjectLeonida#1114, ProjectLeonida#1090 and ProjectLeonida#1491. Two conflicts, both in the shader check lists: scripts/run_gpu_tests.py imports both sides' cases, and tests/test_shader_checks.py counts eight cases next to COMPUTE (main's cs_w32_salu_ext) and ProjectLeonida#939's IMAGE_STORE_CASES table in place of main's fixed seven store shaders. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting). Tested:
This pull request's fixture, The two pytest failures are Not covered: the Windows and macOS jobs. Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with AI-assisted (Claude Code). |
Item: TEST-W64-SDST-PAIR-GPU
Depends on: #1021 (its commit is the first one in this branch; only the second is this change)
#1021 makes the SGPR a wave64 VALU instruction names for a lane mask the pair it is on hardware. Its own test compares the two printed forms on the interpreter. This adds a GPU fixture and the counts over the whole corpus.
What is in it
runtime/test/shaders/cs_w64x_cmp_sdst.asm: written like the game's listings. It has nomattrline, so llvm-mc printsv_cmp_gt_u32_e64 s4, ...for the pair, as it does for the game; every other wave64 fixture names the pair, which is why none of them saw the stale high register. Six compares and a carry-out, each with lanes on both sides of lane 32, read back bys_and_b64,s_or_b64,s_xor_b64,s_andn2_b64,s_and_saveexec_b64,s_mov_b64 exec,s_bcnt1_i32_b64/s_ff1_i32_b64and SCC. The high register holds another mask, 0 or nothing beforehand. The eight expected words are derived from the ISA in the header. Registered incheck.pyandscripts/run_gpu_tests.py.tests/semantic/test_wave64_sdst_pair_fixture.py: the fixture on a 64-wide subgroup and under--wave64-emulate; the same program with pair destinations translates to the same SPIR-V text; wave32 code throughtranslate()keeps its single register; and whattools/wave64_halves.pymakes of the one-register form (the LLVM form of a uniform branch is tier A with equal words from one wave of 64 lanes and two of 32; the mask read as data is still tier C).docs/design.mdunder rdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR) #1021's, with the counts below.Counts (1.0.2.1, all 26,503 listings, llvm-mc backend)
mainspirv-val; 19,453 modules change, all wave64main-> #1021Tested
LEONIDA_W64_EMULATE=1 scripts/run_gpu_tests.py --filter cs_w64x_cmp_sdst: PASS with rdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR) #1021 (10240 6144 2053 8224 7714 6184 4144 5);main1504c1af6stores16384 16384, five times0xffffffffand1. This confirms the translated SPIR-V against the ISA reference, not native RDNA2 behaviour. This card has no 64-wide subgroup (--require-wave64skips here).--require-wave64): 0 of 8 words with the translator before rdna2spirv: a wave64 VALU mask operand printed as one SGPR is the pair (SHADER-W64-SDST-PAIR) #1021, 8 of 8 with it, on each of three dispatches; thesubtleties on gfx1036 (RADV, Mesa 26.3.1): passes with native 64-wide subgroups and under emulation, and withmain's translator fails with the same eight wrong words as above.python -I scripts/run_semantic_tests.py tests/semantic: 472 files, 6,176 tests, 0 files failed.tests/semantic/regen_fixtures.py --check,tests/test_regen_fixtures.py,test_run_gpu_tests.py,test_shader_checks.py,test_design_contract_rows.py,test_docs_design_rows.py: pass.No game data: counts and opcode names only. AI-assisted (Claude Code).
🤖 Generated with Claude Code