mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1090] [MERGED] tests: a GPU fixture and whole-corpus counts for one-register wave64 mask destinations (TEST-W64-SDST-PAIR-GPU) #1126
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1126
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1090
Author: @milk4sale
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @ubiquitarianism
Base:
main← Head:test-w64-sdst-pair-gpu📝 Commits (3)
9f1a072tests: a GPU fixture and whole-corpus counts for one-register wave64 mask destinations (TEST-W64-SDST-PAIR-GPU)89f6c26Merge main into test-w64-sdst-pair-gpub57a5b8Merge main into test-w64-sdst-pair-gpu📊 Changes
6 files changed (+381 additions, -2 deletions)
View changed files
📝
docs/design.md(+1 -0)📝
runtime/test/shaders/check.py(+3 -1)➕
runtime/test/shaders/cs_w64x_cmp_sdst.asm(+131 -0)📝
scripts/run_gpu_tests.py(+2 -1)➕
tests/semantic/fixtures/disasm/cs_w64x_cmp_sdst.s(+89 -0)➕
tests/semantic/test_wave64_sdst_pair_fixture.py(+155 -0)📄 Description
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 #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 #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 #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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.