Repository navigation
Read joined scalar lane masks across the two halves of a Wave64 group - #15
Open
MichaelSmithAI wants to merge 1 commit into
Open
MichaelSmithAI wants to merge 1 commit into
MichaelSmithAI wants to merge 1 commit into
Conversation
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.
On a 32-lane host, a Wave64 compute shader can reach a scalar register by two paths. One path writes a lane mask, and the other can keep a constant or write a different mask. At the join, reading either dword as a number currently stops translation with
a lane mask read as data.For a group of at most one console wave, the patch follows scalar phis with a mask incoming and lets a numeric read request the existing split console flow. At a join with no incoming back edge, that lowering takes the chosen predecessor's 64-lane ballot dword. The ordinary per-lane retry remains available. A join in a loop body is covered, while a loop-carried phi uses its existing lowering.
On the RTX 4090 under Wine/GE, two live groups independently checked both dwords when one group took the branch and the other skipped it. The fixtures cover initial values 0 and −1, both arms writing a mask, and a two-pass loop whose high dwords XOR to
0x1f00. The test matrix also checks emitted wave sizes or refusal reasons across Wave32 and Wave64 programs, two group sizes and three host lane ranges. The 128-thread control includes a separate lane read that already selects console flow.I compared the five 64-thread program shapes on
88b38e8and the scalar-state #14 headfb45f7f. Both refused them on a 32–32 target. Only those five cells change in the 60-case matrix against the base. This is independent of the ordinary first-lane read change in #12. Native 64-lane hardware and title output remain unmeasured.AI-assisted.