Recompiler: keep the split wave64 halves' scalar state wave-uniform #900
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!900
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-900"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mastrr9 on GitHub · 2026-11-24 08:00 UTC · original
mastrr9:perf/recomp-nvidia-wave-uniform-split64→main· +135 −6 · 2 files · 1 commits · openSpeeds 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 wave64Regression run
Smoke run by @Toons29 in comment below: #900
Contributed by a community tester; the PR author did not run it. Both blocks are pasted as posted.
main:
PR:
Tester's setup and limits: AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.Tester's AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; the tester checked the blocks before posting.Not tested
AI use
@dcastell1 on GitHub · 2026-11-24 08:16 UTC · original
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
main@beaa245(713 passed, 0 failed, 41 ignored on this box):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.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@ClosetPie107 on GitHub · 2026-11-24 08:45 UTC · original
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
experimental-11.0-20261112), vkd3d-proton v3.1 + #257's patch (-Db_ndebug=true, dxil-spirv53aac418), DXVKv3.1.1-209, DXC 1.9.2609.5. Rust 1.96.0,x86_64-pc-windows-gnu, release.2817c7cagainst its basemain1ec4c98. The lib test binary runs under Wine withVKD3D_CONFIG=ignore_shared_fence XCL_NETWORK=0 XCL_ADAPTER=9070, andXCL_SPLIT_WAVE64=1(this GPU runs wave64 natively, so split has to be forced).1ec4c98(passed / failed)2817c7c(passed / failed)gpu::recomp, split,--test-threads=1, 3 runs--test-threads=4, 2 runs (1)gpu::recomp, native wave64,--test-threads=1, 3 runsrsqand FMA-control failures this stack always has, #530 / #676)(1)
--skip write_buffer_immediate_on_open_existing_heap_visible_to_cpu --skip a_freed_block_is_decommitted_before_its_address_is_reused, the two tests that take the device down on this stack (#175, #913).Still failing with the PR (same messages as on
main, see the RDNA4 row in #42):gpu_split_wave64_cross_half_operations,…_local_and_exchanged_masks_in_diverging_waves,…_masks_read_whole_after_partial_writes,…_waves_diverge,gpu_valu_16_and_64_bit,gpu_format_stores_atomics_global_lds,gpu_grouped_loads_bounds_and_inactive_lanes. Examples: "the halves ended with different SGPRs",ds_bpermute left: 0.Worse with the PR:
--exact), 5 runs1ec4c982817c7cgpu_divergence_through_execthe halves ended with different SGPRs (lower / upper): s20: 0x11111111 / 0x0, s21: 0x0 / 0x11111111gpu_split_wave64_partial_groups40 threads, thread 0 (console wave 0, lane 0): s_bcnt1 of vcc left: 32In the serial
gpu::recompruns,gpu_split_wave64_partial_groupspassed 3 of 3 onmainand failed 3 of 3 with the PR.gpu_divergence_through_execpassed 3 of 3 onmainand failed 2 of 3 with the PR. So both were already order- or timing-sensitive on RADV in split mode, and the change makes them fail more consistently. I haven't checked whether the cause is theWaveReadLaneFirst(xcl_tid)base or something RADV / ACO does with it on GFX12.The base is unchanged after
mainmoved:077ce40gives the same 178 / 10 split result, with the same 10 tests (2 of 2).Not tested: RDNA2 / RDNA3, native Windows AMD, a retail title, the head rebased onto
077ce40.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.
@SlopTart on GitHub · 2026-11-24 09:34 UTC · original
Linux / AMD RDNA3 datapoint.
Merged state: head
2817c7conto main09940bb, clean merge.Full suite,
cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 707 passed, 11 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows plus this rig's title-textures flake family (see #718). wave-uniform split-half state green; mirror-upload flake hit.Not tested: retail titles (none here), Windows, RDNA4.
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
x86_64-pc-windows-gnu,XCL_NETWORK=0, release profile,--test-threads=4. My Linux rows: #42 / #718.AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@DarkPanda69 on GitHub · 2026-11-24 09:43 UTC · original
Test report for head
2817c7c6e.Setup
main077ce40(all applied cleanly), debug build, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --lib -- gpu::recomp --test-threads=4, once withXCL_ADAPTER=radeonand once withXCL_ADAPTER=3060.Tested: pass on both GPUs, including AMD RDNA hardware with native wave64.
gpu_split_wave64_partial_groupsok.gpu_split_wave64_partial_groupsok.Not tested: the retail smoke run this draft still needs (I have no retail run to give).
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@mastrr9 on GitHub · 2026-11-24 14:38 UTC · original
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.
@Toons29 on GitHub · 2026-11-25 03:07 UTC · original
Regression run of
2817c7c6on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon4178e888, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; I checked the blocks before posting.@JJAutoCompare on GitHub · 2026-11-25 04:12 UTC · original
Arc A770 verification for XCL PR #900
Tested
2817c7c6ee17ba22453da5cd1a7f75cc0f3d0150before and after testing. The existing worktree was clean and detached at this SHA. I readAGENTS.mdandCONTRIBUTING.mdfrom upstream maincbc296ab65a2661a61e3e2da109134bcd5319f60and verified they match the PR head. The live PR discussion and reviews, issues #42 and #1269, and the T3 thread list showed no equivalent same-head Arc run. The PR already has NVIDIA and AMD reports, including a forced-split RADV result.26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver32.0.101.9175, and Rust/Cargo1.100.0(x86_64-pc-windows-msvc). Both fixtures logged DXC1.9.2609.5(01b62ad4) and DXIL1.9.2609.5.cargo test --locked -p xcl --lib --no-runran outside the GPU lock, with two Cargo jobs,CARGO_INCREMENTAL=0, and dev/test debuginfo disabled. The target wasL:/XclTooling/pr1512-tiling-edges-fddfa267/target.TEMPandTMPused this run'stempdirectory.XCL_ADAPTER=A770andXCL_DXC_DIRpointed to the Arc adapter and%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64. The first build emitted the test executable in 30.30 s with one deprecation warning, but the launcher did not retain its exit code. The identical prebuild repeated against the same target exited 0.TG_SIZEand mesh wave indexing, and compiles all four split variants with DXC ascs_6_6.powershell.exe -NoProfile -ExecutionPolicy RemoteSignedprocess, 0.87 s). The adapter-selected split-wave64 compute fixture translated to HLSL and compiled with DXC ascs_6_6. It checks whole-wave and half-local ballot emission and dispatches three groups for each size40, 64, 96, 100, 160, 256. These include guest waves with a missing or partial upper half as well as complete waves. Readback matched all 2,864 expected dwords across the six sizes for VCC popcount, entry EXEC popcount,TG_SIZE, and the half-localV_CNDMASK_B32result. The three groups for a given size share output addresses, so the readback checks each output location once.2026-11-25T05:10:35.1077021+01:00. The target slot is available for reuse.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 (
gpt-6.2-sol) verified the revision, ran the checked-in fixtures, and wrote this report from the logs.@DavidM1911 on GitHub · 2026-11-25 09:41 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.