Repository navigation
Conversation
…t tell (SHADER-10) tools/wave64_halves.py classifies each wave64 VS/PS/GS by partition invariance: A exact as translated, B exact by construction (waterfall loops, wave-aggregated atomics up to slot order, readfirstlane/readlane of values that are the same in every lane), C not exact (lane counts/ranks/ids, readlane of varying data, stale scalars behind votes, masks as data, ...). index.json gets wave64_graphics, wave64_graphics_reasons and wave64_graphics_idioms; --wave64-graphics warn|error|off (error refuses tier C). One rewrite: readlane of a proven-uniform VGPR reads the own copy. --census prints tier counts from an index.json. ps_w64_* fixtures, w64_graphics.py (fragment subgroup size required 64 vs 32) and semantic tests; vk_harness gets VKH_HEAP_DUMP and a subgroup-size report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 22, 2026
Member
Author
Contributor
|
Tried 4b054af merged onto
So the suite goes from all-pass on Two ways out:
I didn't run AI-assisted (Claude Code). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
This is the implementation part of SHADER-10 (claimed in #1218; @kahlio76's first part, the documentation and flagging, stays theirs).
A wave64 VS/PS/GS on a 32-wide subgroup is exact only if its results don't change when the wave is cut into two 32-lane halves. The host forms graphics subgroups, so there is no partner half to exchange with.
tools/wave64_halves.pyclassifies each wave64 VS/PS/GS from its code:readfirstlane/readlaneof values proven to be the same in every lane. Wave-aggregated atomics are exact as a set of slots, but the order within a wave is not preserved.readlaneof varying data, scalar state defined behind a vote, masks read as data, and similar cases.Output and flags:
index.jsonaswave64_graphics,wave64_graphics_reasonsandwave64_graphics_idioms.--wave64-graphics warn|error|offmarks and counts tier C, refuses it, or skips the analysis.python tools/wave64_halves.py --census <index.json>prints tier counts without shader names.One rewrite:
v_readlaneof a proven-uniform VGPR reads the lane's own copy.This complements #1132 (
wave64_graphics_scan.py). Two independent adversarial reviews (about 100 probe programs) found soundness holes; each one is fixed and is now a test.Tested
ps_w64_*): run throughruntime/test/shaders/w64_graphics.pyon the Radeon 880M (AMD 26.11.2), with the fragment subgroup size required to 64 and to 32. Tiers A and B match; tier C differs. The RTX 5070 (617.42, 32 only) was compared against the 880M@64 images and agrees.tests/test_translate.py: 427 passed, 2 skipped (ms_f16_pack, no synthetic DXBC).tests/test_shader_checks.pypasses.main: 148 of 149 test shaders are identical. The only difference is the intendedreadlanerewrite (ps_w64_b_readlane_uniform).main):run_gpu_labon both GPUs passed (880M 121/124, 5070 93/124 with the 64-wide compute tests skipped), and full pytest gave 3384 passed.Honest limits
--census.ds_bpermute,v_permlane16,ds_swizzle,v_permlanex16).Checklist
docs/design.mdcontract table, with how it was confirmedAI-assisted (Claude Code).
🤖 Generated with Claude Code