Repository navigation
feat: lower group-uniform any-lane SCC branch in mesh programs - #2142
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6fa78fc62e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Draw run on hardware — RX 9070 XT, driver 32.0.32029.2010: The six thresholds each draw the full quad when a wave has a live lane, and all 1024 pixels match; the three mutants are rejected, so the check separates the any-lane flag from a per-lane one. Limits: AMD only, no NVIDIA; mesh pipelines are the one path WARP does not implement, so there is no second adapter to compare against here. AI-assisted. |
b11224a to
d39d763
Compare
d39d763 to
8b77c25
Compare
|
I replayed the same 32 local mesh-stage samples through The shared pattern is a single-lane LDS store in one wave and a read in another, with distinct static barrier instructions on the two branches. This makes the existing cross-wave LDS scheduling valuable to the slot 57 follow-up. A source-built control for the observed dependency-counter wait and barrier pair would test the next step without adding a broad wait-as-no-op fallback. Runtime tracking |
Model LDS publish, s_barrier and SCC branches (s_cbranch_scc0/scc1, 64-bit s_cmp) in the two-wave64 mesh interpreter, with precise refusals. Adds a CPU check and a WARP/hardware draw check with mutant controls.
…in mesh lowering Check all waves against all staged stores before clearing any, validate the final interval, and refuse vector destinations with an unwaited LDS read.
|
Follow-up to the two-wave LDS review above. I published the wait and barrier follow-up on an integration branch with #2253 and both commits from this PR, preserving their authorship. The follow-up depends on both PRs and main's retired-wave handling from #2241. For gfx1013,
|
8b77c25 to
8c02061
Compare
|
I merged main into the PR branch at |
Part of #1998
What this unblocks: mesh programs that branch on "any lane active" across both waves (Item A, about 1,190 programs) can now be lowered instead of refused.
What changed
ds_write_b32),s_barrier,ds_read_b32,v_readfirstlane_b32and SCC branches (s_cbranch_scc0,s_cbranch_scc1).s_cmp_lg_u64,s_cmp_eq_u64) ands_cmp_lg_u32are accepted. Unsupported widths are refused by name.tests/mesh_scc_any_lane.swith embedded bytes.mesh_scc_any_lane_cpu,mesh_scc_any_lane_draw_{hardware,warp}.docs/experiments.md.Verification
Executed locally (Linux, CPU only):
All passed. A dry run of the lowering gave (4,2) for T in {0,64,100,127} and (3,1) for T in {128,200}. The three mutants (own flag only, flipped branch, 32-bit mask compare) give (3,1) at T=100.
NOT run yet (needs Win2025, Stage 2):
The D3D12 WARP readback test and the LLVM reassembly check of the hand-encoded bytes are pending. Draft until they pass.
AI-assisted; commands listed were executed locally.