Repository navigation
Conversation
|
Ran the mask tests on an NVIDIA Blackwell part at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. All six split-wave64 GPU tests pass here, including the new Not tested: native wave64 (not available on this GPU), RDNA2/RDNA4 and Intel GPUs, Wine, release profile, retail titles. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified. |
|
Test report for head Tested
Not tested: retail titles, benchmarks, RDNA3/RDNA4. AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output. |
|
Wine/RDNA3 datapoint for this fix: merged head Aggregate pass counts on this rig:
No cure observed on this axis: the exchange cluster from my #772 follow-up stays red, and the odd ok in Also worth knowing: this head and #1090 both rewrite Counts only, no game data. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Tested on NVIDIA RTX 5060 Ti (Blackwell, wave32 only, split wave64) at Tested
Regression run (60 s, networking off, no input). One warm-up run of the PR build came first so that both builds started with a warm DXIL cache (exit 0x0, no removal, no crash). That run compiled 38 shaders main's cache didn't have, so the title runs code this PR changes. Then main and this PR ran back to back. Main is at main: this PR: Frames 102 % of main, peak commit 100.1 % of main. Not tested: native wave64 (no AMD GPU), a release-build test run, this PR merged onto current AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and smoke runs and wrote this comment. |
|
Tested on NVIDIA Ampere (32-lane waves, split wave64): passes
Not tested: AMD, any title (no smoke run). AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
|
I'm stacking two split-wave64 changes on top of this PR. Your commit is cherry-picked onto
Both build on your
On the retail pack (all wave64 CS / MS programs, split form, 4 windows) the exchanged mask writes go 210 324 ( AI use: Claude Code (Claude Opus 5.5) wrote both PRs and this comment. |
|
Both AMD (RDNA2 iGPU + RDNA3 Wine) and NVIDIA (RTX 5070 Ti, RTX 5060 Ti, RTX 3060 Ti) test reports look solid on Remaining before merge: |
02d65c8 to
c29bbad
Compare
|
Rebased onto Verified locally on RTX 3060 Ti:
(AI use: Antigravity (Gemini 4 Neon) performed the rebase onto |
|
Rebased head Remaining before merge: one independent AMD (or second-vendor) verification pass on |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
��Reduces
xcl_x_ballot()cross-half exchanges in split-wave64 (docs/wave64-on-wave32.md) by propagating lane-local mask liveness through 64-bit bitwise SALU ops inx64_masks.rs.Why
x64_masks.rs,v_cmp*and carry outputs (v_add_co_u32/v_sub*_co_u32) already avoid a cross-halfxcl_x_ballot()exchange (xcl_x_ballot_local()) when they feed only per-lane readers (v_cndmask_b32,v_add_co_ci_u32,v_sub*_co_ci_u32).s_and_b64,s_or_b64,s_xor_b64,s_andn2_b64,s_orn2_b64,s_nand_b64,s_nor_b64,s_xnor_b64,s_not_b64,s_mov_b64,s_cselect_b64,s_cmov_b64) before feedingv_cndmask_b32(s_wqm_b64is excluded because it combines 4-lane quads and requires quad helper bits in pixel shaders). Previously,x64_maskstreated every SALU instruction as reading its source SGPR pairs whole, forcingxcl_x_ballot()on all upstream compares even when neither the result mask norsccwas ever read whole.xcl_x_ballot_local()leaves each 32-lane half's own word exact (low dword on half 0, high dword on half 1) and none of these 64-bit lane-wise ops crosses the 32-lane boundary, each half produces its own exact 32-lane result word without exchanging the inputs � provided:EXECis always whole-live, so writes toEXECstay exchanged);scc(all excepts_mov_b64/s_cmov_b64/s_cselect_b64),sccis dead afterward (tracked jointly in the backward liveness pass, includingLOOP_GUARDexits and kernel-mode end readback);vccz(251) /execz(252) still markVCC/EXECwhole-live.What is in it
crates/xcl/src/gpu/recomp/x64_masks.rs: tracksccliveness alongside whole-live SGPRs (reads_scc, conservativewrites_sccmatchingemit.rs,lane_wise_salu64, andflow()), propagate non-whole-live masks through even-aligned 64-bit lane-wise SALU ops, update three existing tests that used a deads_mov_b64 s[2:3], vccas a dummy whole-reader, and add 6 unit tests covering bitwise chains, live vs overwrittenscc,s_and_saveexec_b64/EXECwrites,s_cselect_b64/s_cmov_b64,vccz/ odd alignment, andLOOP_GUARDexits readingscc.crates/xcl/src/gpu/recomp/emit.rs: requiren & 1 == 0when emittingxcl_x_ballot_localintoDst::S(n)so low/high half alignment is guaranteed globally.crates/xcl/src/gpu/recomp/tests.rs: add GPU testgpu_split_wave64_bitwise_lane_masksverifying both 0-exchange bitwise mask chains (s_and_b64,s_andn2_b64,s_not_b64,s_or_b64,s_mov_b64,s_cselect_b64�!v_cndmask_b32) and kept exchanges whensccis read (s_and_b64matching upper half only �!s_cselect_b32).Measured impact (RTX 3060 Ti, split-wave64)
xcl_x_ballot()calls drop from 210,324 �! 170,561 (�"39,763 exchanges, �"18.9%).cs_6_6) and NVIDIA D3D12 PSO compile benchmarks on three retail compute shaders (before384f7f7�! after02d65c8):xcl_x_ballot513 �! 433(�"15.6%), DXIL834,160 �! 803,648 B(�"3.7%), DXC23,166 �! 14,804 ms(�"36.1%), cold PSO28,780 �! 21,316 ms(�"25.9%).xcl_x_ballot420 �! 370(�"11.9%), DXIL512,592 �! 494,064 B(�"3.6%), DXC12,011 �! 8,786 ms(�"26.9%), cold PSO16,405 �! 11,792 ms(�"28.1%).xcl_x_ballot135 �! 75(�"44.4%), DXIL152,752 �! 130,920 B(�"14.3%), DXC3,455 �! 1,874 ms(�"45.8%), cold PSO4,106 �! 3,108 ms(�"24.3%).Tested
x86_64-pc-windows-msvc), debug + release.c29bbad(ontomain0cdc896with#1090):cargo test -p xcl --lib -- gpu::recomp::x64_masks --test-threads=1: 25 passed, 0 failed, 1 ignored (includinguse_plan_matches_fallback_across_all_rdna2_instructionsandblock_liveness_matches_reference_bit_for_bit).cargo test -p xcl --lib -- gpu_split_wave64 --test-threads=1: 7 passed, 0 failed (includinggpu_split_wave64_bitwise_lane_masks).02d65c8: 744 passed, 0 failed, 41 ignored.Regression run
main:
PR:
Not tested
x64_masksonly runs whensplit_wave64is active on wave32-only GPUs or forced viaXCL_SPLIT_WAVE64=1).AI use
xcl_x_ballotconsumers across the shader corpus, designed and implemented thex64_masks.rsscc+ bitwise propagation pass, wrote unit/GPU tests, ran the DXC/PSO benchmarks, and drafted the PR description; all tests, benchmarks, and paired smoke runs were executed locally on the hardware above and the diff was reviewed line by line.