Repository navigation
wave64_halves: recognize UVOTE under non-zero EXEC and boolean UVOTE combinations (SHADER-10) - #805
Conversation
KernelSmoker
left a comment
There was a problem hiding this comment.
Linux CPU review of the Wave64 classifier change. On this exact head, these four focused modules passed: tests/semantic/test_wave64_halves.py (130), test_wave64_halves_soundness.py (33), test_wave64_halves_partial_dst.py (13), and test_wave64_halves_readlane_uniform.py (2), for 178/178 total. git diff --check also passed.
The new nz fact is propagated only along the non-empty branch of s_cbranch_execz / the taken branch of s_cbranch_execnz, and is intersected at joins. I found no issue in that flow by inspection.
tests/test_wave64_halves_fixtures.py was not run: it requires pytest, which is absent from the local Python/tool image; installing it in a temporary container stalled on network access. No GPU or game data was used, and no GPU result is claimed.
|
Tested
No GPU leg: no |
|
Follow-up on the latest PR head |
|
Tested 3f7e9f2 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass, GPU regression check Runtime built at this head with
This is the GPU leg the CPU checks above did not cover, but as noted there no |
3f7e9f2 to
62e5472
Compare
|
Rebased onto current
Verified after rebase (Python 3.14, Arch Linux):
AI-assisted: yes |
|
Tested the rebased head No game files. AI-assisted (Claude Code), run for a non-developer tester. |
|
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18). |
What and why
In
tools/wave64_halves.py, several wave-uniform compare/branch idioms in the retail 1.0.2.1 graphics corpus were conservatively marked Tier C (tainted-branch):s_cbranch_execz/s_cbranch_execnz(st["nz"]): when a block narrowsEXECand immediately skips empty halves withs_cbranch_execz(or enters the non-empty edge vias_cbranch_execnz), every 32-lane half reaching the non-zero edge hasEXEC != 0. A subsequent uniformv_cmp_*(all scalar/immediate non-tainted operands) ANDed withEXECproduces the exact same branch decision in each reaching half as in the full 64-lane wave.n=1: disassemblies often printv_cmp_*_e64 sN, ...with a single-register operand (n=1), whereas wave64v_cmpwrites the 64-bit pairs[N:N+1]. PropagateUVOTEand taint tos[N+1]as well sos_and_b64 vcc, exec, s[N:N+1]seesUVOTEon both halves of the pair.UVOTEcombinations:s_cselect_b64 dst, exec, 0(or0, exec) from an untaintedSCCunder launch/non-zeroEXEC, ands_and_b64/s_or_b64combiningUVOTEmasks (e.g., two uniform compares combined befores_and_b64 vcc, exec, ...), preserveUVOTE.Testing
tests/semantic/test_wave64_halves.py:test_a_uvote_under_nonzero_exectest_c_uvote_under_narrowed_exec_without_execz_guard(negative control: withouts_cbranch_execz, stays Tier C)test_a_uvote_and_or_combinetest_a_uvote_cselect_from_uniform_sccpython3 -m unittest tests/semantic/test_wave64_halves*.py tests/test_w64_graphics*.py: 190/190 passed.wave64_graphics_reasons == ['tainted-branch']: 276 shaders moved out of Tier C (11 Tier A, 265 Tier B).AI-assisted: yes