Repository navigation
Conversation
…e (SHADER-821) A compiler's break loop ORs a v_cmp result into an SGPR pair and narrows EXEC with it. stale_uses() treated the pair as a scalar, so the loop was tier C tainted-exec although each bit belongs to one lane. A def that ORs (or AND-NOTs) a same-block v_cmp result into the pair leaves the off lanes' bits alone; a read that only uses the pair as a lane mask (an EXEC write, or the next such def) is no longer stale. Scalar uses (s_bcnt1, s_cmp) still are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…DER-821) After the rebase onto main, the kill-exit test from cc4231d that expected a conservative tier C for an exit whose live mask two kills define now gets A: both definitions are `s_andn2_b64 D, D, vcc` after a v_cmp, so the mask is lane-local. Run it on the emulator (64 lanes against two halves of 32, with the halves leaving at different votes) and the words match. Keep a C control where the second definition ORs in a scalar register. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…is tier A (SHADER-821) A wave64 pixel shader with two compiler-style break loops: the lanes that left are collected by s_or_b64 D, vcc, D after a v_cmp, the pair narrows EXEC inside the loop and widens it again behind it. w64_graphics.py runs it as tier A; every word is a function of the pixel's (x, y). With tools/wave64_halves.py from main the fixture is tier C (tainted-exec); with ItsNotRexed#4656 it is tier A. On an RTX 3070 (32-wide only, driver 617.14) all 4096 pixels give the derived words. Depends on: ItsNotRexed#4656 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Tested I ran To check the execution width, I repeated each draw with a diagnostic fragment module. It writes the SPIR-V I translated the checked-in fixture instructions with the PR translator. I supplied synthetic instruction lengths for the branch offsets and assembled the SPIR-V with the in-tree assembler. The PR classifies the break fixture as tier A. The merge-base translator at AI-assisted. |
|
Tested 05ee55e on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested 05ee55e on AMD Radeon 610M (RADV RAPHAEL_MENDOCINO, subgroup 32..64, Mesa 26.2.6), CachyOS Linux: pass.
Not checked: the claim that main classifies this fixture as tier C. AI-assisted. |
|
Verified merge with main 3faac55 (clean): test_wave64_halves.py (semantic) and test_wave64_halves_fixtures.py (9 under pytest, re-run) pass, as does the test_semantic_translator_use.py guard. The new fixture is a hand-written asm listing with the expected-words derivation in comments, and the detector extension is confined to lane-local SGPR-pair defs with a clear contract (only the s_or_b64/s_andn2_b32 shapes fed by a same-block v_cmp with no EXEC write since) — well-scoped. The GPU-side w64_graphics run needs hardware and was not executed here. Note: no CI checks reported on this branch. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
The 64-against-32 run you asked for, on an AMD Radeon RX 9070 XT (RDNA4, subgroup 32..64), Windows 11 23H2, AMD's |
|
Tested
|
… loop keeps the rule (SHADER-821) b3933dc made any non-narrowing EXEC write after the first vote turn the lane-local rule off for the rest of the shader. A break loop's restore (`s_or_b64 exec, exec, <left lanes>`) at its exit block is such a write, so every later loop's v_cmp stopped counting (two loops in a row: @CuteBooty, ItsNotRexed#4870, tier A before, C after). Track the open votes instead: a vote opens leaving its block and closes on entering a block that post-dominates it, where the halves are together again; only a widening while a vote is open counts against that vote. @shdann's counterexample (a restore inside the vote's region) stays tier C; a widening behind a later vote after a closed loop is tier C too. Two loops are tier A and run the same in the wave and in halves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claim: #4683 (comment)
Depends on: #4656 (the branch carries its commits; the fixture is the last commit,
05ee55e6; please land #4656 first)What and why
#4656 (SHADER-821) makes a lane mask that a compiler's
breakloop collects in an SGPR pair partition invariant, which moves such shaders from tier C to tier A. Its coverage is CPU only, and none of the existing GPU fixtures reaches the rule (check on #4656).ps_w64_a_breakis a wave64 pixel shader with two such loops, run byw64_graphics.pyas tier A:x(1..4 trips, lanes of one quad leave at different trips), with a counter behind the break;y(1..8 trips), so a half can close it in fewer trips than the wave;Every expected word is a function of the pixel's (x, y):
(x % 4 + 1, 1000 + x, 2000 + 5 * (y % 8 + 1), x % 4).Tested
NVIDIA GeForce RTX 3070 (32-wide only), driver 617.14, Windows 11 25H2, llvm-mc 23.1.5, on top of #4656
649260f0:build.py: 243/243 translated and valid;ps_w64_a_breakis tier A with no reasons. Withtools/wave64_halves.pyfrommain(98fa503f) it is tier C,tainted-exec, so the fixture needs the rule.w64_graphics.py:ps_w64_a_break A ok(all 4096 pixels give the derived words); the other 15 tier A/B fixtures still ok, tier C skipped (32-only device).check.py: 153/188 pass, 35 skipped, as before.python -m pytest tests/test_wave64_halves_fixtures.py: 9 passed (the fixture's tier is pinned inEXPECT).Not tested: a 64-lane run. This device can only require 32, so the 64-against-32 comparison needs an AMD GPU (or
W64G_SAVE_REF/W64G_REF).AI-assisted (Claude Code; an independent read-through of the branch offsets and derived words by Codex).
🤖 Generated with Claude Code