Skip to content

w64_graphics: the wave32 VS run is the halves of the wave64 waves, not a repacking (gfx1036, GFX1201) - #7354

Open
sperm wants to merge 1 commit into
ItsNotRexed:mainfrom
sperm:docs-w64-vs-lane-grouping
Open

sperm wants to merge 1 commit into
ItsNotRexed:mainfrom
sperm:docs-w64-vs-lane-grouping

Conversation

@sperm

@sperm sperm commented Nov 23, 2026

Copy link
Copy Markdown

Claim: #7231 comment. It's the GFX12 measurement @sskver asked for in their finding, plus the docstring fix that follows from it.

What and why

runtime/test/shaders/w64_graphics.py says RADV's 32-lane VS run "is a repacking, not the two halves of the 64-lane waves: a stricter test of tiers A and B". @sskver measured the halves on gfx1036 and asked whether GFX12 differs. It doesn't.

vs_w64_c_lane_id over 960 vertices on an RX 9070 XT (GFX1201, RDNA4), RADV, Mesa 26.2.6, Linux, with and without RADV_PERFTEST=gewave32:

wave sizes starts (vertex) largest lane id
wave64 64, 62, 64, 62 … (17 waves) 0, 64, 126, 190, 252, 316 … 63
wave32 32, 32, 32, 30 … (32 waves) 0, 32, 64, 96, 126, 158 … 31

Every wave32 wave lies inside one wave64 wave, and inside one half of it (lanes 0–31 or 32–63). The period is 126 vertices both ways, the same as @sskver's gfx1036 numbers. A wave is a run of vertices with distinct lane ids, split where a lane id repeats; record word 2 checks that each vertex index matches.

The docstring now states the packing and the two GPUs it was measured on. It says the 32-lane run tests tiers A and B the same way the pixel fixtures' halves do, not more strictly. It also carries @sskver's trap for the next fixture: a 62-vertex wave doesn't start on a multiple of 64, so lane ^ 1 stays inside the wave, but ^ 2, ^ 3 and ^ 16 can cross it.

Tested

  • runtime/test/shaders/build.py (vs_ids, vs_w64_c_lane_id, ps_w64_a_skip): 3 translated, 3 pass spirv-val.

  • Native Linux vk_harness (cmake -S runtime -B runtime/build/linux -G Ninja), run as the fixture's header describes, both ways. Results above.

  • w64_graphics.py ... vs_w64_c_lane_id: C ok.

  • tests/test_wave64_halves_fixtures.py 10 passed, tests/test_docs_repeated_lines.py 2 passed, compileall clean.

  • Docstring only: no behaviour changes. Not run on RDNA3.

  • No game data in this PR.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

…t a repacking (measured, gfx1036 and GFX1201)

The docstring said RADV's 32-lane VS run repacks the vertices, so it was "a stricter test of tiers A and B".
@sskver measured otherwise on gfx1036 (Mesa 26.3.1), and the same vs_w64_c_lane_id probe on an RX 9070 XT
(GFX1201, RDNA4, Mesa 26.2.6) gives the same packing: wave64 waves of 64, 62, 64, 62 ... from vertices 0, 64,
126, 190; wave32 waves of 32, 32, 32, 30 ... from 0, 32, 64, 96, 126; every wave32 wave inside one half of a
wave64 wave. The docstring now says so, with the GPUs it quotes, and warns that a 62-vertex wave puts `^ 2`,
`^ 3` and `^ 16` lane reads across a wave boundary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rojasruiz

Copy link
Copy Markdown

Tested 11ce092 merged onto main 5cf3daf (clean merge) on NVIDIA GeForce RTX 3080, driver 615.78.08, Linux 7.2.15: pass. This adds no RDNA3 data: NVIDIA can only require 32-wide subgroups and can't switch the VS wave size, so it only checks that the edited file still runs end to end on a non-RADV device.

  • runtime/test/shaders/build.py then w64_graphics.py <build> <build> (native vk_harness from this tree): exit 0. Every tier A and B fixture is ok (PS 7 A + 5 B, VS 1 A + 3 B, GS 1 A). Every tier C fixture, including vs_w64_c_lane_id, is a SKIP ("tier C needs a device that can require both 64 and 32, or W64G_REF"), as the docstring describes for NVIDIA.
  • tests/test_wave64_halves_fixtures.py + tests/test_docs_repeated_lines.py: 12 passed.
  • scripts/run_gpu_tests.py: 190/239, 48 skipped, identical to main (the known ms_wave_info_s3 is the one failure on both).
  • check_no_game_data.py on w64_graphics.py: clean.

AI-assisted (Claude Code).

@crastinator

Copy link
Copy Markdown
Contributor

Same measurement on a discrete RDNA2 card: the packing matches yours and @sskver's, so the new docstring holds on a third GPU.

AMD Radeon RX 6700 XT (gfx1031, RDNA2), RADV Mesa 26.3.1, CachyOS, Linux 7.3.5, Python 3.14. #7354 (11ce092d) merged onto main 37398f98; build.py for vs_w64_c_lane_id, vs_ids, ps_w64_a_skip (3 translated, 3 pass spirv-val); vk_harness run as the fixture header says, with and without RADV_PERFTEST=gewave32:

wave sizes starts (vertex) largest lane id
default (wave64) 64, 62, 64, 62 … (16 waves) 0, 64, 126, 190, 252, 316 … 63
gewave32 32, 32, 32, 30 … (31 waves) 0, 32, 64, 96, 126, 158 … 31

Word 2 equals the vertex index for all 960 records in both runs. Every wave32 wave lies inside one wave64 wave and inside one 32-lane half of it, with a period of 126 vertices both ways. My wave counts (16 / 31) are one lower than your table's (17 / 32), probably because we split the 960-vertex tail differently; the sizes and starts match. w64_graphics.py ... vs_w64_c_lane_id: C ok.

The full run_gpu_tests.py gives the same per-test results as main (223/240 native and emulated). The only failure, ms_wave_info_s3, also fails on main here.

AI-assisted (Claude Code).

@GustawMatuszewski

Copy link
Copy Markdown

Tested 11ce092 on AMD Radeon RX 9060 XT (RDNA4, gfx1200), RADV Mesa 26.0.8, Ubuntu 26.04: pass. This is a second RDNA4 SKU on an older RADV than the RX 9070 XT / Mesa 26.2.6 point, and it reproduces the measured packing exactly.

  • runtime/test/shaders/build.py from this head (all 29 w64_graphics fixtures plus vs_ids and ps_live_width) into a fresh dir: 31 translated, 31 pass spirv-val.
  • w64_graphics.py <build> /home/gustaw/leonida/runtime/build/linux: 29/29 ok, 0 failures — tier A 9, tier B 8, tier C 12 (PS 7 A / 5 B / 8 C, VS 1 A / 3 B / 3 C, GS 1 A / 1 C). The A and B fixtures pass at both required 64 and required 32; the C fixtures differ between the two sizes as the detector expects.
  • Forced 32-wide: the runner sets VKH_SUBGROUP_SIZE=32 for its halves run itself and pops an inherited value; vk_harness reports the device as subgroup 32..64 and prints fragment subgroup size: 32. Re-running the suite with VKH_SUBGROUP_SIZE=32 exported gave byte-identical output, 29/29.
  • vs_w64_c_lane_id over 960 vertices, vs_ids plus the fixture as its header says, with and without RADV_PERFTEST=gewave32:
wave sizes starts (vertex) largest lane id
wave64 64, 62, 64, 62 … (17 waves) 0, 64, 126, 190, 252, 316 … 63
wave32 32, 32, 32, 30 … (32 waves) 0, 32, 64, 96, 126, 158 … 31

Word 2 equals the vertex index for all 960 records in both runs. Every wave32 wave lies inside one half of a wave64 wave (32/32), and each wave64 wave is exactly partitioned by its wave32 waves (17/17); the period is 126 vertices both ways, the same as the gfx1036 and GFX1201 numbers in the PR.

  • No failures to re-run; isolated positional runs of vs_w64_c_lane_id, ps_w64_b_ballot_atomic and ps_w64_c_lane_id are all ok (w64_graphics.py has no --filter; a fixture name after the build and tools arguments is its selector).
  • scripts/check_no_game_data.py runtime/test/shaders/w64_graphics.py: clean. No game data used.

AI-assisted (Claude Code).

@javdc

javdc commented Nov 23, 2026

Copy link
Copy Markdown

Tested 11ce092 on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass

  • python3 -I runtime/test/shaders/w64_graphics.py <work> /home/deck/opencode/Leonida/runtime/build — 29 passed, 0 failed

AI-assisted (OpenCode).

@Cryserrrrr

Copy link
Copy Markdown

Windows data for the RDNA2 iGPU. It covers only the wave64 side; I could not measure wave32 on this driver. Setup: Ryzen 7 7800X3D Radeon iGPU (gfx1036), AMD driver 25.10.36, Windows 11, PR head 11ce092da merged onto main 7761680ea (clean).

  • This driver has no gewave32 equivalent (requiredSubgroupSizeStages = compute only), so tier C skips as designed. python -I runtime/test/shaders/w64_graphics.py <out> runtime/build: exit 0, 17 ok, 12 SKIP (tier C), 0 failed. That is identical to main and to an RTX 4080 SUPER (610.88).
  • I ran vs_w64_c_lane_id at the default VS size, 960 vertices, with the fixture header's vk_harness command. Word 2 equals the vertex index for all 960, and the largest lane id is 63. There are 16 waves of 64, 62, 64, 62 ..., starting at vertices 0, 64, 126, 190, 252, 316 ... That is the same wave64 packing as the RADV gfx1036 and GFX1201 numbers in the PR. On the 4080 the same probe gives a largest lane id of 29, in 32 waves of 30.

Synthetic tests only. AI-assisted (Claude Code).

@carlos-seiffert

Copy link
Copy Markdown

Tested 11ce092 (merged onto main 976b3ec) on NVIDIA GeForce RTX 2060 (Turing), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 (10.0.26300), subgroup size 32: pass (no regression; the case this PR changes is not reachable here)

What I ran: python -I scripts/run_gpu_tests.py with the Vulkan tools built from 976b3ec (llvm-mingw + Ninja, -DLEONIDA_BUILD_WINDOWS_RUNTIME=OFF, Vulkan-Headers 6802bb47), llvm-mc 23.1.6 and SPIRV-Tools from conda-forge.

main 976b3ec this PR on main
full GPU suite 192/241 passed, 48 skipped, 1 fail 192/241 passed, 48 skipped, 1 fail (same as main)

runtime/test/shaders/w64_graphics.py (after build.py), main 976b3ec: 17 ok, 12 SKIP. On NVIDIA the vertex and geometry subgroup size cannot be required, so only the default-size checks run and every tier C line is a SKIP; this does not compare a wave64 run with a wave32 one.

With this PR: unchanged (17 ok, 12 SKIP). The wave32 VS run this PR redefines only exists where the VS wave size can be switched (RADV with RADV_PERFTEST=gewave32), so this GPU cannot exercise it.

Overlap, for whoever merges: #7505 has the same title and touches w64_graphics.py too.

The one failure on both sides is ms_wave_info_s3, which fails on main on this GPU (10/10 runs) and is fixed by #7136 / #5741 / #5855; it is unrelated to this PR.

AI-assisted run (Claude Code); the numbers are from my machine.

@InCaseOf

Copy link
Copy Markdown

Tested 11ce092 on RX 5700 XT (RDNA1, gfx1010, RADV NAVI10), Mesa 26.3.1, Linux 6.18: pass

  • scripts/run_gpu_tests.py: 211/239 passed, 28 skipped, 0 failed.
  • w64_graphics.py over all fixtures: 29/29 ok.

LLVM llvm-mc 23.1.5, SPIRV-Tools v2026.4, Python 3.14; test programs built from main e36d4c4 unless rebuilt for the PR as noted. main e36d4c4 on the same GPU: run_gpu_tests.py 212/240, 28 skipped, 0 failed; w64_graphics.py 29/29; semantic suite 2 files failing (test_image_atomics_guard, test_image_store_d16). No game files.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants