Repository navigation
Conversation
In the split wave64 form (wave64 compute / mesh / ES+GS programs on GPUs with 32-lane waves only, e.g. NVIDIA) the half, the console wave and the other half's size were computed per lane from xcl_tid, which comes from WavePrefixCountBits. The values are the same in every lane of a hardware wave, but the GPU compiler cannot prove it, so everything derived from them was per-lane in its eyes: every exchanged mask (EXEC, VCC), every SGPR computed from one, and every branch on them (s_cbranch_execz / vccz / scc, loop exits). The native forms have none of that: there EXEC comes straight from WaveActiveBallot. The three values now come from the hardware wave's first console thread, WaveReadLaneFirst(xcl_tid) & ~31 (its console threads are 32-aligned), and the compute TG_SIZE wave index and the mesh s3 wave index use the console wave xcl_cw (= gi / 64 there). Same values; only the split HLSL changes, the native and wave32 HLSL is byte-identical (checked on 70 translations). Measured with a flow-insensitive divergence model of the generated main() (7 programs: ALU, memory, branchy, the bench_split_wave64 loop, the two gpu_split_wave64 test programs; kernel, CS 64 / 256 / 8x8x4 and MS 128 modes), assuming a groupshared load from a wave-uniform address is uniform: scalar registers the compiler must keep per lane 242/440 -> 0/440 (native: 2/440), divergent branches 108/129 -> 59/129 (native 66/131, the rest are per-lane store guards). If the driver treats every groupshared load as per-lane, 242 -> 226 only (a WaveReadLaneFirst on the exchanged word would close that; it is exchange code, left alone). CPU translation time unchanged (median 104.7 -> 102.2 us per program, noise). Not run on a GPU. Assisted-by: Claude Code (Claude Opus 5.5)
|
Verified on Windows 11 10.0.26300, NVIDIA GeForce RTX 5090 (driver 621.24), Rust 1.100.0 MSVC 14.44.35207, debug build, on clean Two more passing tests than main: the split wave64 scalar-state uniformity change is exercised here (this device is wave32-only, so the split path is what runs); nothing else changes verdict. Tree restored afterwards (md5 and a full diff against a clean checkout), hardware adapter, no Wine, no game data. AI-assisted (opencode): applied the patch to a built tree, ran the suite, reverted it. |
|
The AMD RDNA wave64 run from Not tested, with split wave64 forced. On RDNA4 under RADV this doesn't fix the cross-half failures, and two split tests fail more often with it. Native wave64 output is unaffected, as the description says. Tested
(1) Still failing with the PR (same messages as on Worse with the PR:
In the serial The base is unchanged after Not tested: RDNA2 / RDNA3, native Windows AMD, a retail title, the head rebased onto AI use: T3 Code (Claude Opus 5.5) built both trees, ran the tests and wrote this comment from the logs. The runs are real, on the hardware above, and I checked the report before posting. |
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. 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. |
|
Test report for head Setup
Tested: pass on both GPUs, including AMD RDNA hardware with native wave64.
Not tested: the retail smoke run this draft still needs (I have no retail run to give). |
|
Thanks @dcastell1, @hkgamingdk231-prog, @SlopTart, and @ClosetPie107 for all the hardware runs across RTX 5090, RTX 3060, RX 9070 XT (native wave64), RX 7900 XT, and RX 9070 (forced split on RADV)! Good note on the forced-split RADV GFX1201 behavior — glad native wave64 on RDNA4 and split wave64 on NVIDIA RTX 3060 / 5080 / 5090 all stay green. |
|
Regression run of Against the limits in CONTRIBUTING.md: 100 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
Arc A770 verification for XCL PR #900Tested
$exe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
& $exe gpu::recomp::tests::split_wave64_wave_uniform_half --exact --nocapture --test-threads=1
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
& $exe gpu::recomp::tests::gpu_split_wave64_partial_groups --exact --nocapture --test-threads=1
}
Not tested Other fixtures (including #2097's dispatch chain), workspace suite, retail-title smoke, other adapters or drivers, native-wave64 GPU execution, and performance. AI use T3 Code / Codex ( |
Speeds up split wave64 console shaders on 32-lane GPUs (NVIDIA):
xcl_tid, forcing the GPU compiler to treat exchangedEXEC/VCCvalues, derived SGPRs, and branches on them as per-lane and divergent.WaveReadLaneFirst(xcl_tid) & ~31uso scalar state stays wave-uniform across each 32-lane hardware wave.242/440 -> 0/440, divergent branches108/129 -> 59/129.Tested
617.42/32.0.16.1742), Windows 11 Pro 25H2 (26200.9974),rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC debug, DXC Windows SDK10.0.26100.0,d3d12SDKLayers.dllinstalled6b75595ae9113814289e0ab2e6a2915672b75431(HEAD2817c7c6ee17ba22453da5cd1a7f75cc0f3d0150has an identical tree; only commit author metadata was updated after GitHub account rename)cargo build --workspace: clean (no new warnings; only pre-existingfetch_updatedeprecation warning)cargo test --workspace -- --test-threads=4: 717 passed, 0 failed, 41 ignoredSKIPPEDGPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Not tested
scripts/smoke.ps1) not yet run (no retail title available in this clean-room environment); opened as Draft pending a smoke run.AI use