You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpu_geometry_wave32_prefix_count_over_a_mask: flaky on AMD (load-sensitive) - NVIDIA wave32 rigs skip it, so AMD is the only place it runs #847
2|
3|Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Wine = Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust 1.100.0 cross x86_64-pc-windows-gnu, release profile, XCL_NETWORK=0, native wave64. Same rig as my Linux rows in #42 / #718.
4|
5|gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask fails on this rig and looks untracked:
6|
7|- Isolated:cargo test -p xcl --lib --release -- gpu_geometry_wave32_prefix_count_over_a_mask at main beaa245, 20 separate runs: 5 failed, 15 passed (~25%). Each run is a fresh process, single test, no other tests running - so this is not cross-test interference and not the #718 trio.
8|- Full suite: 2 hits in 12 release full-suite runs since beaa245 (the beaa245 baseline itself and one PR-lane run); never seen at d5442d2 or e50836b in earlier runs.
9|- Not reliably reproducible yet: reruns on the same tree ~40 minutes later: 0/40 (15 plain beaa245, 25 on beaa245+PR #823). During the failing window my GPU also served local LLM inference; later windows were idle (16% busy). So the flake looks sensitive to GPU/system load rather than to the code under test - but note your PR rows always show it SKIPPED (no wave64) on NVIDIA, so AMD hardware is the only place this test ever executes, and on AMD it can eat a lane run at random.
10|- The failure output I captured before I started chasing it was truncated; I have not yet pinned the assertion text. Happy to rerun under load until it breaks with full stdout if that would help.
11|
12|Counts only, no game data.
13|AI use: Hermes agent (local Qwen-class) ran the loops and drafted this; I checked it before posting.
Tested:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, one exact test per fresh process, --exact --test-threads=1 --nocapture, XCL_REQUIRE_GPU=wave64, default split exchange. No skips.
Condition
Passed
Failed
RX GPU utilization sampled around launch
No added GPU workload
20
0
5–28% before each trial
Concurrent headless Vulkan scaling
20
0
100% before and after every trial
The Vulkan scaling control saturated the RX 9070 but does not reproduce an inference workload. No mismatch was captured on this stack, so the failing leg and cause remain unconfirmed. No runtime change is proposed from this result.
Not tested: RX 7900 XT, the original inference workload, native Windows, or a retail game.
AI use: omp (GPT-6.2 Sol) ran the checks and drafted this report.
Follow-up datapoint: in today's 19-PR lane sweep (mains beaa245 -> 1ec4c98, each full release suite, --test-threads=4) this test hit 0 times in 19 full-suite runs, same rig and load pattern as the earlier window where it failed 2/12. Consistent with the load-sensitive read in the issue body - leaving the issue open until it either repeats under load or stops being flaky outright.
AI use: Hermes agent (local Qwen-class) ran the sweep and drafted this; I checked it before posting.
A native Windows run on AMD (not reproduced), and what a failure of the split exchange's timeout looks like, so a captured failure can be matched against it.
Machine: RX 9070 XT (RDNA4, native wave64), driver 32.0.32029.2010, Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.100.0 MSVC, DXC 1.9.2602.17, main1ec4c98, release (cargo test -p xcl --lib --release). Each run is the exact test alone in a fresh process, --test-threads=1 --nocapture, XCL_REQUIRE_GPU=wave64, default exchange (XCL_WAVE64_SPIN unset). No skips.
Condition
Passed
Failed
Idle GPU
200
0
3 processes running the crate's other gpu_ tests (bursty, about 2 % 3D use)
200
0
3 processes each running a long ALU + global-atomic compute shader (3D engine 71–75 %)
200
0
6 such processes, heavier shader (each run took about 3 s instead of 0.7 s)
500
0
The load shader is a local probe I did not commit; it is not an inference workload.
What an exchange timeout looks like. In the split form, xcl_x_meet (emit.rs) polls the other half's arrival counter and gives up after 1 << 20 polls: xcl_x_dead is set and the other half's words read as 0. With that bound set locally to 0 (so the meet fails at once), the test fails the same way in 6 of 6 runs, in the first (split) leg, at tests.rs:3803:
Lanes 0–31 are right. Lanes 32–63 have vcc and exec 24 too low and s[10:11] stuck at 8: the upper half never got the lower half's mask word (24 bits of lane & 3 != 0, 32 bits of lane < 40). A failure with this pattern is the timeout; one with other lanes or other differences is something else.
How close normal runs come to the bound. With the bound read from a local environment variable (probe only):
Bound (polls)
Passed, idle
Passed, under the 3-process load
0
0 / 20
–
1, 4, 64
20 / 20 each
60 / 60 each
2, 8, 16, 32, 256, 1024, 1 << 20
20 / 20 each
–
So here the other half has always arrived by the first poll, even under load, and the real bound leaves a margin of about a million polls. On this stack the timeout looks out of reach. I could not test RADV / vkd3d-proton, or a workload like local inference that runs compute queues next to the test.
If it fails again on the Linux rig, the full assertion text would tell whether it is this pattern. #872's phase labels would also show which leg failed.
Not tested: Linux / RADV / vkd3d-proton, an inference workload, debug builds for the load runs, the full suite.
AI use: Claude Code (Claude Opus 5.5) wrote the loops and the local probes, ran them on my PC and drafted this comment. I have not reviewed the code.
A run on RDNA2 and on an integrated GPU (memory shared with the CPU), native Windows: not reproduced at the default bound in 2,761 runs. With the bound lowered, a compute load on the same GPU makes the other half arrive a few polls late here, unlike on the RX 9070 XT above.
Machine: AMD Radeon Graphics iGPU gfx1036 (RDNA2, 1 WGP, native wave64) in a Ryzen 7 9800X3D, driver 32.0.21030.2001, 32 GB DDR5-4800 dual channel shared with the CPU, Windows 11 Pro 26200, Rust 1.100.0 MSVC, DXC 1.9.2602.17, release (cargo test -p xcl --lib --release). The PC also has an RTX 5070 Ti; XCL_ADAPTER=radeon picks the iGPU. Built at main077ce40; emit.rs and tests.rs have not changed since, up to 6efdabc.
Each run is the exact test alone in a fresh process (the built test binary with --exact gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask --test-threads=1 --nocapture), XCL_ADAPTER=radeon, XCL_REQUIRE_GPU=wave64, XCL_WAVE64_SPIN unset. No skips.
Default bound (1 << 20)
Condition
Passed
Failed
No added load (two series, before and after a reboot)
600
0
3 processes looping the crate's other gpu_ tests (iGPU 3D about 2 %)
300
0
3 OpenCL processes running a long ALU + global-atomic kernel (iGPU compute about 100 %)
300
0
6 such OpenCL processes + 3 gpu_ test loops (3D about 88 %, compute about 100 %)
1 process copying 2 × 64 MiB half of the time (about 21 GiB/s)
300
0
1 OpenCL process + that RAM load
300
0
The probe build below with the bound left at default, no load
20
0
The load scripts are local probes I did not commit. The GPU load is OpenCL through the AMD driver, so it runs on a compute queue next to the test's direct queue. It is not an inference workload. The 8-process RAM series stopped at 441 because the PC hard-reset. This machine has done that before, and it is not a test failure.
How close the runs come to the bound here. The bound is read from a local environment variable (probe only). Each cell is failed / runs:
Bound (polls)
No load
1 OpenCL
1 RAM copy
1 OpenCL + 1 RAM copy
6 OpenCL + 3 gpu_ loops
0
20 / 20
–
–
–
–
1
0 / 100
42 / 50
0 / 50
85 / 100
23 / 50
4
0 / 50
10 / 50
0 / 50
10 / 50
1 / 50
16, 64, 256
–
–
–
0 / 50 each
0 / 50 each
1024, 4096, 16384, 65536
–
–
–
0 / 50 each
–
On the RX 9070 XT the other half was always there by the first poll, even under load. Here a compute load on the same GPU delays it by a few polls, and a memory-bandwidth load on its own does not. With every load I tried, 16 polls were always enough, so the default bound leaves a margin of about 65,000×.
The bound in time. I made a second local change that raises need out of reach, so the other half never arrives. The split leg then spins to the bound once. The test takes 0.57 s (median of 20) with the bound at 1 << 20 against 0.49 s with it at 0, and 0.60 s against 0.51 s under 1 OpenCL process. 2^18 polls add about 30 ms, the same order. So on this iGPU 1 << 20 polls take about 80–90 ms, about 0.08 µs per poll. For a timeout at the default bound, one wave32 half of the 64-thread group has to fall that far behind the other. Here, under load, the gap was a few polls, about 1 µs.
Two shapes of the same failure. Every failure whose output was saved was at tests.rs:3803 in the split leg. All of them ran with the bound at 4 or less, or with the never-arrive change. Each had one of two shapes:
A: the same as the one posted above (vcc and exec 24 too low and s[10:11] stuck at 8 in lanes 32–63). 290 failures had this shape, including all forced ones.
B: only s[10:11] is wrong in lanes 32–63, and vcc and exec are right. 41 failures had this shape, all of them under load with the bound at 1 or 4:
B fits a timeout at the exchange of the v_cmp into s[10:11], after the earlier exchanges made it. exec is exchanged at the start, and the saved exec is computed from the whole vcc and exec. So a captured failure with only s[10:11] wrong in lanes 32–63 is this timeout too.
The timeline is consistent with this.#798 made the bounded spin the default for one-wave64 groups like this test's, which met through GroupMemoryBarrierWithGroupSync() (no timeout) before. It was merged at 05:57 UTC, just before beaa245, the first commit with failures in the issue body. The clean commits named there (d5442d2, e50836b) do not contain it. The later 0 / 40 and 0 / 19 at and after beaa245 show that load still matters. A cheap check on the Linux rig: rerun under the load that failed with XCL_WAVE64_SPIN=0 (group barriers, no timeout). If it never fails that way and still fails with the default, the timeout is the cause.
Not tested: Linux / RADV / vkd3d-proton, RDNA3, an inference workload, a D3D12 compute-queue load (mine was OpenCL), debug builds, the full suite.
AI use: Claude Code (Claude Opus 5.5) wrote the loops, the load scripts and the local probe changes, ran them on my PC and drafted this comment. I have not reviewed the code.
XCL_NETWORK=0, XCL_REQUIRE_GPU=wave64 (the test runs, not SKIPPED)
Each run is a new process of the lib test binary: <xcl lib test exe> gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask --exact --nocapture --test-threads=1; a run counted as passed only when it printed 1 passed
Condition
Runs
Passed
Failed
idle GPU, default exchange
300
300
0
load, default exchange
300
300
0
load, XCL_WAVE64_SPIN=0
150
150
0
Load: two concurrent loops of the other GPU tests in the same binary (gpu_ --skip wave32_prefix_count --test-threads=8, 94 tests, ~4.2 s per pass) for the whole window.
Not tested
Heavy non-XCL load (LLM inference / OpenCL), which is what the original failing window and the low-bound runs above had; this load is lighter
Full-suite runs, Linux / vkd3d-proton, a lowered xcl_x_meet bound
No failure captured, so no assertion text to add
AI use: Claude Code (Claude Opus 5.5) installed the toolchain, ran the loops and wrote this report; the runs are real, on the hardware above.
Reproduced on Linux / Mesa RADV + vkd3d-proton (66 / 80 failed under Vulkan async compute load, 0 / 80 with XCL_WAVE64_SPIN=0), on the same physical RX 9070 and exact same release binary that passed 290 / 290 on native Windows 11. RADV_DEBUG=spirv and RADV_DEBUG=shaders show the cause: Mesa NIR lowers InterlockedAdd(shared, 0u, c) to a read-only @load_shared (access=atomic) and eliminates the loop-body poll, leaving zero LDS reads inside xcl_x_meet()'s 1 << 20 spin loop.
Setup. AMD Radeon RX 9070 (RDNA4 / GFX1201, native wave64, 15.81 GiB VRAM), Ryzen 7 7700, 31.4 GiB RAM (dual-boot). Exact same binary from main1ec4c98 (xcl-331cdc890787b29f.exe, release MSVC, DXC/DXIL 1.9.2602.17), one fresh process per run (gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask --exact --test-threads=1 --nocapture), XCL_REQUIRE_GPU=wave64, XCL_NETWORK=0, no skips.
Windows: Windows 11 Pro 26200, AMD driver 32.0.32029.2010, rustc 1.100.0 MSVC.
Windows 11: idle + D3D12 compute/direct/VRAM burners (up to 4x25 parallel, 13.86 GiB VRAM)
default (1)
290
0
3D up to 100%, Compute 99.6%
Linux / RADV: idle
default (1)
20
0
busy 6-13%, VRAM 1.52 GiB
Linux / RADV: single gfx queue (6.5 ms dispatches, 32 KiB LDS, 1 GiB VRAM)
default (1)
20
0
busy med 100%, VRAM 2.91 GiB
Linux / RADV: single async compute queue (same 6.5 ms shader, 32 KiB LDS, 1 GiB VRAM)
default (1)
1
29
busy med 99%, VRAM 2.94 GiB
Linux / RADV: same single async 6.5 ms load
0
30
0
busy med 99%, VRAM 2.93 GiB
Linux / RADV: dual queue (async + gfx, ~83 ms dispatches, 32 KiB LDS, 12 GiB VRAM)
default (1)
13
37
busy med 100%, VRAM 14.07 GiB
Linux / RADV: same dual-queue load
0
50
0
busy med 100%, VRAM 14.02 GiB
All 66 failures panicked at crates\xcl\src\gpu\recomp\tests.rs:3803:9 with the two timeout shapes posted above: 53 shape A (vcc, s[10:11], exec wrong in lanes 32-63) and 13 shape B (only s[10:11] wrong in lanes 32-63), 0 other shapes.
Why it fails on RADV. In emit.rs:5428-5433, xcl_x_meet() polls with InterlockedAdd(XCL_XC(...), 0u, c). DXC peels iteration 0 before the loop, so vkd3d-proton emits two OpAtomicIAdd ops with value 0 and None (Relaxed) memory semantics (%183 before the loop, %225 inside it in RADV_DEBUG=spirv). Mesa 26.2.5 NIR lowers both to @load_shared (%41) (base=32756, access=atomic) and eliminates the loop-body load, reusing the pre-loop result for all 1 << 20 iterations (verified at all three exchanges in the split shader: -32, -64, -96). In the generated RDNA4 ISA, ds_load_b32 runs once before the loop and the loop body has no LDS read:
Why queue type matters. Standalone 1 << 20 LDS reads take 36.8 ms on this card under RADV (44.98 ms on Windows 11), but the hoisted loop effectively has a bound of 1 poll. Idle (20/20) and gfx-only load on queue family 0 (20/20, matching @Abuudiii's 20/20 under Vulkan scaling on the same RX 9070 + Mesa 26.2.5) serialize on the GFX ring with xcl's D3D12 DIRECT queue, so both wave32 halves start together and the single pre-loop read succeeds. An async compute queue (family 1, like local LLM inference or the 6.5 ms burner above: 29/30 failed) runs waves concurrently on the WGPs, so small arrival skew misses the single read and spins out to timeout.
Fix check (standalone compiler tests only). A minimal peeled GLSL compute shader with atomicAdd(xc[1], 0u) reproduces the same NIR elimination on Mesa 26.2.5 (one pre-loop ds_load_b32, 14.8 ms register spin). Checking two options in both dxc.exe 1.9.2602.17 -T cs_6_6 (DXIL) and standalone GLSL -> Mesa 26.2.5 RADV (RADV_DEBUG=shaders):
InterlockedCompareExchange(XCL_XC(...), 0u, 0u, c) (atomicCompSwap(xc[1], 0u, 0u)): DXC emits cmpxchg ... i32 0, i32 0 seq_cst in the loop; Mesa NIR keeps @shared_atomic_swap (ds_cmpstore_rtn_b32) inside the loop (43.8 ms).
GroupMemoryBarrier() (memoryBarrierShared()) inside the loop before InterlockedAdd: DXC emits @dx.op.barrier(i32 80, i32 8) + atomicrmw add ... 0 in the loop; Mesa NIR keeps ds_load_b32 inside the loop (42.6 ms).
(No local game files for smoke.ps1, so no runtime PR opened.)
Not tested: RX 7900 XT (RDNA3), a real local LLM workload, end-to-end build of xcl with modified emit.rs, or retail game titles.
AI use: Antigravity (Gemini 4 Neon) wrote the local Vulkan stress/benchmark harness, ran the Linux/RADV matrix and RADV_DEBUG dumps on my machine, inspected the SPIR-V/NIR/ISA output, and drafted this comment; I reviewed the results before posting.
Correction + sharpening of this flake log, because the forced-split axis re-behaved under controlled re-testing today.
The red/green flips in this thread's later runs were partly a mode mismatch, not time of day: on this RDNA3 rig (native wave64 hardware) the cluster fails deterministically with XCL_SPLIT_WAVE64=1 --test-threads=1 and passes without the env var. Today's forced runs:
47efa2e: waves_diverge, local_and_exchanged_masks, masks_read_whole all 3/3 FAILED (matches this morning's 0/3 + 0/6 floor, same commit).
b8b1f49 (current main): waves_diverge 3/3 ok, lane_local_masks 3/3 ok, but local_and_exchanged_masks + masks_read_whole still 3/3 FAILED.
And the axis part that matters: five independent runs on #1193 today, all NVIDIA wave32 parts (Blackwell/Ampere/Turing, one via Linux+vkd3d-proton), report these same tests fully green, including a 745 passed / 0 failed full-workspace run on Ampere where split-wave64 emulation is the only path. So this cluster does not reproduce on real wave32 hardware at all; it reproduces on native wave64 hardware with the split path forced, deterministically at 3/3.
Implication for the cure-chasing PRs (#1090, #1111, #1126, #1193, #1244): validate on an AMD forced-split rig, not NVIDIA - NVIDIA passes with the bug still present. Failure signature on our side is ds_bpermute value loss (got 0, expected 65 at group 0 thread 96 on waves_diverge). Green runs on NVIDIA cannot clear any of these PRs against this cluster.
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, release profile. My Linux rows: #42 / #718.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
@SlopTart PR #1244 (71d3a38) has already been tested on AMD + Mesa 26.2.5 with XCL_SPLIT_WAVE64=1 (RX 9070 / RDNA4): #1244 (comment). All four failing gpu_split_wave64_* tests went from 0/5 on main to 3/3 idle and 10/10 under async compute load (0/146 total under load), with ds_cmpstore_rtn_b32 confirmed inside the spin loop in RADV_DEBUG=shaders.
The difference between NVIDIA Linux (vkd3d-proton) and AMD Linux fits NVIDIA's proprietary Vulkan compiler vs Mesa NIR (which hoists InterlockedAdd(..., 0u, c) out of xcl_x_meet() on RADV, while Windows AMD Adrenalin and NVIDIA keep the poll in the loop) rather than wave32 vs wave64 hardware. A confirmation of #1244 on your RX 7900 XT (RDNA3) would still be useful to close the loop on RDNA3.
AI use: Antigravity (Gemini 4 Neon) drafted this reply from our #1244 test results; I reviewed it before posting.
Floor update for this issue on current main 9e3831e1, now that the split tests were renamed to the gpu_split_wave64_* family (from merged #67/#94). This is the first report of that family on a native wave64 card forced into split mode; the NVIDIA rows are all green natively.
unforced on the same card: 6/6 green, so this is split-path specific
The failing set is not stable across runs (that is itself a signal: gpu_split_wave64_masks_read_whole_after_partial_writes fails 3/3; gpu_split_wave64_local_and_exchanged_masks_in_diverging_waves 2/3 with left 157 right 164; gpu_split_wave64_waves_diverge 1/3; gpu_split_wave64_cross_half_operations also seen red in a separate control run). Only gpu_split_wave64_lane_local_masks is green every run. A flaky composition points at mask state leaking between halves rather than one deterministic translation bug.
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, release profile. See my Linux rows in #42 / #718.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Follow-up to my floor comment above: same main 9e3831e1, still forced split mode, but each failing test run solo in its own process (--exact, 3 runs each). This separates "the test itself is broken" from "state leaks between tests in one process":
gpu_split_wave64_local_and_exchanged_masks_in_diverging_waves: FAILED 2/3 solo, self-flaky (same 157 vs 164 delta)
gpu_split_wave64_waves_diverge: ok 3/3 solo, yet it went red inside the family run above: only fails after the other split tests have run in the same process
So two of the three are genuine single-test bugs on native-wave64 hardware in split mode, and waves_diverge is a cross-test state leak: something in the earlier split tests leaves mask state behind that flips a otherwise-green test. Both signals point at half/mask bookkeeping not being reset per program, consistent with the mask-semantics theme of this issue.
Counts only, no game data. Same machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, release profile.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Found the source of the unstable composition reported above: gpu_split_wave64_cross_half_operations is the polluter.
Order-pair runs on the same commit, forced split mode, 2 runs per pair:
waves_diverge after local_and_exchanged_masks_in_diverging_waves: ok, ok
waves_diverge after masks_read_whole_after_partial_writes: ok, ok
waves_diverge after cross_half_operations: FAILED, FAILED
waves_diverge solo: ok 3/3 (from the previous comment)
cross_half_operations solo: FAILED 2/2 (a genuine single-test failure too)
That also explains the shifting family results: alphabetical order inside one process puts cross_half_operations first, so waves_diverge only goes red in the family run, and masks_read_whole / local_and_exchanged fail on their own merits regardless of order.
Summary for this axis: 3 broken split-mode tests on native wave64 hardware (cross_half_operations, masks_read_whole_after_partial_writes, local_and_exchanged_masks_in_diverging_waves), plus one cross-test state leak from cross_half_operations that flips an otherwise-green waves_diverge.
Counts only, no game data. Same machine and stack as my comments above.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Activity
Abuudiii commentedon Nov 24, 2026
Independent game-free run at
beaa245ca04e212f064efc7cafcdce104bc5c0a2: Arch Linux, RX 9070 (RADV GFX1201 / Mesa 26.2.5), GE-Proton 11-7 + vkd3d-proton 3.1, DXC/DXIL 1.9.2609.5, Rust 1.99.1x86_64-pc-windows-gnu, release.Tested:
gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, one exact test per fresh process,--exact --test-threads=1 --nocapture,XCL_REQUIRE_GPU=wave64, default split exchange. No skips.The Vulkan scaling control saturated the RX 9070 but does not reproduce an inference workload. No mismatch was captured on this stack, so the failing leg and cause remain unconfirmed. No runtime change is proposed from this result.
Not tested: RX 7900 XT, the original inference workload, native Windows, or a retail game.
AI use: omp (GPT-6.2 Sol) ran the checks and drafted this report.
SlopTart commentedon Nov 24, 2026
Follow-up datapoint: in today's 19-PR lane sweep (mains
beaa245->1ec4c98, each full release suite,--test-threads=4) this test hit 0 times in 19 full-suite runs, same rig and load pattern as the earlier window where it failed 2/12. Consistent with the load-sensitive read in the issue body - leaving the issue open until it either repeats under load or stops being flaky outright.AI use: Hermes agent (local Qwen-class) ran the sweep and drafted this; I checked it before posting.
4usphs commentedon Nov 24, 2026
A native Windows run on AMD (not reproduced), and what a failure of the split exchange's timeout looks like, so a captured failure can be matched against it.
Machine: RX 9070 XT (RDNA4, native wave64), driver 32.0.32029.2010, Ryzen 7 9800X3D, Windows 11 Pro 26200, Rust 1.100.0 MSVC, DXC 1.9.2602.17,
main1ec4c98, release (cargo test -p xcl --lib --release). Each run is the exact test alone in a fresh process,--test-threads=1 --nocapture,XCL_REQUIRE_GPU=wave64, default exchange (XCL_WAVE64_SPINunset). No skips.gpu_tests (bursty, about 2 % 3D use)The load shader is a local probe I did not commit; it is not an inference workload.
What an exchange timeout looks like. In the split form,
xcl_x_meet(emit.rs) polls the other half's arrival counter and gives up after1 << 20polls:xcl_x_deadis set and the other half's words read as 0. With that bound set locally to 0 (so the meet fails at once), the test fails the same way in 6 of 6 runs, in the first (split) leg, attests.rs:3803:Lanes 0–31 are right. Lanes 32–63 have
vccandexec24 too low ands[10:11]stuck at 8: the upper half never got the lower half's mask word (24 bits oflane & 3 != 0, 32 bits oflane < 40). A failure with this pattern is the timeout; one with other lanes or other differences is something else.How close normal runs come to the bound. With the bound read from a local environment variable (probe only):
1 << 20So here the other half has always arrived by the first poll, even under load, and the real bound leaves a margin of about a million polls. On this stack the timeout looks out of reach. I could not test RADV / vkd3d-proton, or a workload like local inference that runs compute queues next to the test.
If it fails again on the Linux rig, the full assertion text would tell whether it is this pattern. #872's phase labels would also show which leg failed.
Not tested: Linux / RADV / vkd3d-proton, an inference workload, debug builds for the load runs, the full suite.
AI use: Claude Code (Claude Opus 5.5) wrote the loops and the local probes, ran them on my PC and drafted this comment. I have not reviewed the code.
KENAJBBY commentedon Nov 24, 2026
A run on RDNA2 and on an integrated GPU (memory shared with the CPU), native Windows: not reproduced at the default bound in 2,761 runs. With the bound lowered, a compute load on the same GPU makes the other half arrive a few polls late here, unlike on the RX 9070 XT above.
Machine: AMD Radeon Graphics iGPU
gfx1036(RDNA2, 1 WGP, native wave64) in a Ryzen 7 9800X3D, driver 32.0.21030.2001, 32 GB DDR5-4800 dual channel shared with the CPU, Windows 11 Pro 26200, Rust 1.100.0 MSVC, DXC 1.9.2602.17, release (cargo test -p xcl --lib --release). The PC also has an RTX 5070 Ti;XCL_ADAPTER=radeonpicks the iGPU. Built atmain077ce40;emit.rsandtests.rshave not changed since, up to6efdabc.Each run is the exact test alone in a fresh process (the built test binary with
--exact gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask --test-threads=1 --nocapture),XCL_ADAPTER=radeon,XCL_REQUIRE_GPU=wave64,XCL_WAVE64_SPINunset. No skips.Default bound (
1 << 20)gpu_tests (iGPU 3D about 2 %)gpu_test loops (3D about 88 %, compute about 100 %)The load scripts are local probes I did not commit. The GPU load is OpenCL through the AMD driver, so it runs on a compute queue next to the test's direct queue. It is not an inference workload. The 8-process RAM series stopped at 441 because the PC hard-reset. This machine has done that before, and it is not a test failure.
How close the runs come to the bound here. The bound is read from a local environment variable (probe only). Each cell is failed / runs:
gpu_loopsOn the RX 9070 XT the other half was always there by the first poll, even under load. Here a compute load on the same GPU delays it by a few polls, and a memory-bandwidth load on its own does not. With every load I tried, 16 polls were always enough, so the default bound leaves a margin of about 65,000×.
The bound in time. I made a second local change that raises
needout of reach, so the other half never arrives. The split leg then spins to the bound once. The test takes 0.57 s (median of 20) with the bound at1 << 20against 0.49 s with it at 0, and 0.60 s against 0.51 s under 1 OpenCL process.2^18polls add about 30 ms, the same order. So on this iGPU1 << 20polls take about 80–90 ms, about 0.08 µs per poll. For a timeout at the default bound, one wave32 half of the 64-thread group has to fall that far behind the other. Here, under load, the gap was a few polls, about 1 µs.Two shapes of the same failure. Every failure whose output was saved was at
tests.rs:3803in the split leg. All of them ran with the bound at 4 or less, or with the never-arrive change. Each had one of two shapes:vccandexec24 too low ands[10:11]stuck at 8 in lanes 32–63). 290 failures had this shape, including all forced ones.s[10:11]is wrong in lanes 32–63, andvccandexecare right. 41 failures had this shape, all of them under load with the bound at 1 or 4:v_cmpintos[10:11], after the earlier exchanges made it.execis exchanged at the start, and the savedexecis computed from the wholevccandexec. So a captured failure with onlys[10:11]wrong in lanes 32–63 is this timeout too.The timeline is consistent with this. #798 made the bounded spin the default for one-wave64 groups like this test's, which met through
GroupMemoryBarrierWithGroupSync()(no timeout) before. It was merged at 05:57 UTC, just beforebeaa245, the first commit with failures in the issue body. The clean commits named there (d5442d2,e50836b) do not contain it. The later 0 / 40 and 0 / 19 at and afterbeaa245show that load still matters. A cheap check on the Linux rig: rerun under the load that failed withXCL_WAVE64_SPIN=0(group barriers, no timeout). If it never fails that way and still fails with the default, the timeout is the cause.Not tested: Linux / RADV / vkd3d-proton, RDNA3, an inference workload, a D3D12 compute-queue load (mine was OpenCL), debug builds, the full suite.
AI use: Claude Code (Claude Opus 5.5) wrote the loops, the load scripts and the local probe changes, ran them on my PC and drafted this comment. I have not reviewed the code.
AlexandreSchuelter commentedon Nov 24, 2026
Not reproduced on a discrete RDNA2 card (native Windows): 0 failures in 750 fresh-process runs.
Tested
mainat67a3735stable-x86_64-pc-windows-msvc, release; DXC 1.9.2602.17 (Windows SDK 10.0.26100)XCL_NETWORK=0,XCL_REQUIRE_GPU=wave64(the test runs, not SKIPPED)<xcl lib test exe> gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask --exact --nocapture --test-threads=1; a run counted as passed only when it printed1 passedXCL_WAVE64_SPIN=0Load: two concurrent loops of the other GPU tests in the same binary (
gpu_ --skip wave32_prefix_count --test-threads=8, 94 tests, ~4.2 s per pass) for the whole window.Not tested
xcl_x_meetboundAI use: Claude Code (Claude Opus 5.5) installed the toolchain, ran the loops and wrote this report; the runs are real, on the hardware above.
SzczepanGrela commentedon Nov 24, 2026
Reproduced on Linux / Mesa RADV +
vkd3d-proton(66 / 80 failed under Vulkan async compute load, 0 / 80 withXCL_WAVE64_SPIN=0), on the same physical RX 9070 and exact same release binary that passed 290 / 290 on native Windows 11.RADV_DEBUG=spirvandRADV_DEBUG=shadersshow the cause: Mesa NIR lowersInterlockedAdd(shared, 0u, c)to a read-only@load_shared (access=atomic)and eliminates the loop-body poll, leaving zero LDS reads insidexcl_x_meet()'s1 << 20spin loop.Setup. AMD Radeon RX 9070 (RDNA4 /
GFX1201, native wave64, 15.81 GiB VRAM), Ryzen 7 7700, 31.4 GiB RAM (dual-boot). Exact same binary frommain1ec4c98(xcl-331cdc890787b29f.exe, release MSVC, DXC/DXIL1.9.2602.17), one fresh process per run (gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask --exact --test-threads=1 --nocapture),XCL_REQUIRE_GPU=wave64,XCL_NETWORK=0, no skips.26200, AMD driver32.0.32029.2010,rustc 1.100.0MSVC.7.3.0-5-cachyos, Mesa26.2.5-arch3.1(radv, Vulkan1.4.354),GE-Proton11-12(Wine Staging 11.0 +ntsync),vkd3d-protonv3.1-1-g8293130eb, DXVKv3.1.1-174-gf8637768.XCL_WAVE64_SPIN1)1)gfxqueue (6.5 ms dispatches, 32 KiB LDS, 1 GiB VRAM)1)asynccompute queue (same 6.5 ms shader, 32 KiB LDS, 1 GiB VRAM)1)async6.5 ms load0async+gfx, ~83 ms dispatches, 32 KiB LDS, 12 GiB VRAM)1)0All 66 failures panicked at
crates\xcl\src\gpu\recomp\tests.rs:3803:9with the two timeout shapes posted above: 53 shape A (vcc,s[10:11],execwrong in lanes 32-63) and 13 shape B (onlys[10:11]wrong in lanes 32-63), 0 other shapes.Why it fails on RADV. In
emit.rs:5428-5433,xcl_x_meet()polls withInterlockedAdd(XCL_XC(...), 0u, c). DXC peels iteration 0 before the loop, sovkd3d-protonemits twoOpAtomicIAddops with value0andNone(Relaxed) memory semantics (%183before the loop,%225inside it inRADV_DEBUG=spirv). Mesa26.2.5NIR lowers both to@load_shared (%41) (base=32756, access=atomic)and eliminates the loop-body load, reusing the pre-loop result for all1 << 20iterations (verified at all three exchanges in the split shader:-32,-64,-96). In the generated RDNA4 ISA,ds_load_b32runs once before the loop and the loop body has no LDS read:Why queue type matters. Standalone
1 << 20LDS reads take36.8 mson this card under RADV (44.98 mson Windows 11), but the hoisted loop effectively has a bound of 1 poll. Idle (20/20) andgfx-only load on queue family 0 (20/20, matching @Abuudiii's20/20under Vulkan scaling on the same RX 9070 + Mesa26.2.5) serialize on the GFX ring withxcl's D3D12 DIRECT queue, so both wave32 halves start together and the single pre-loop read succeeds. Anasynccompute queue (family 1, like local LLM inference or the 6.5 ms burner above:29/30failed) runs waves concurrently on the WGPs, so small arrival skew misses the single read and spins out to timeout.Fix check (standalone compiler tests only). A minimal peeled GLSL compute shader with
atomicAdd(xc[1], 0u)reproduces the same NIR elimination on Mesa26.2.5(one pre-loopds_load_b32,14.8 msregister spin). Checking two options in bothdxc.exe 1.9.2602.17 -T cs_6_6(DXIL) and standalone GLSL -> Mesa26.2.5RADV (RADV_DEBUG=shaders):InterlockedCompareExchange(XCL_XC(...), 0u, 0u, c)(atomicCompSwap(xc[1], 0u, 0u)): DXC emitscmpxchg ... i32 0, i32 0 seq_cstin the loop; Mesa NIR keeps@shared_atomic_swap(ds_cmpstore_rtn_b32) inside the loop (43.8 ms).GroupMemoryBarrier()(memoryBarrierShared()) inside the loop beforeInterlockedAdd: DXC emits@dx.op.barrier(i32 80, i32 8)+atomicrmw add ... 0in the loop; Mesa NIR keepsds_load_b32inside the loop (42.6 ms).(No local game files for
smoke.ps1, so no runtime PR opened.)Not tested: RX 7900 XT (RDNA3), a real local LLM workload, end-to-end build of
xclwith modifiedemit.rs, or retail game titles.AI use: Antigravity (Gemini 4 Neon) wrote the local Vulkan stress/benchmark harness, ran the Linux/RADV matrix and
RADV_DEBUGdumps on my machine, inspected the SPIR-V/NIR/ISA output, and drafted this comment; I reviewed the results before posting.SlopTart commentedon Nov 24, 2026
Correction + sharpening of this flake log, because the forced-split axis re-behaved under controlled re-testing today.
The red/green flips in this thread's later runs were partly a mode mismatch, not time of day: on this RDNA3 rig (native wave64 hardware) the cluster fails deterministically with
XCL_SPLIT_WAVE64=1 --test-threads=1and passes without the env var. Today's forced runs:47efa2e:waves_diverge,local_and_exchanged_masks,masks_read_wholeall 3/3 FAILED (matches this morning's 0/3 + 0/6 floor, same commit).b8b1f49(current main):waves_diverge3/3 ok,lane_local_masks3/3 ok, butlocal_and_exchanged_masks+masks_read_wholestill 3/3 FAILED.And the axis part that matters: five independent runs on #1193 today, all NVIDIA wave32 parts (Blackwell/Ampere/Turing, one via Linux+vkd3d-proton), report these same tests fully green, including a 745 passed / 0 failed full-workspace run on Ampere where split-wave64 emulation is the only path. So this cluster does not reproduce on real wave32 hardware at all; it reproduces on native wave64 hardware with the split path forced, deterministically at 3/3.
Implication for the cure-chasing PRs (#1090, #1111, #1126, #1193, #1244): validate on an AMD forced-split rig, not NVIDIA - NVIDIA passes with the bug still present. Failure signature on our side is
ds_bpermutevalue loss (got 0, expected 65 at group 0 thread 96 onwaves_diverge). Green runs on NVIDIA cannot clear any of these PRs against this cluster.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, release profile. My Linux rows: #42 / #718.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
SzczepanGrela commentedon Nov 24, 2026
@SlopTart PR #1244 (
71d3a38) has already been tested on AMD + Mesa26.2.5withXCL_SPLIT_WAVE64=1(RX 9070 / RDNA4): #1244 (comment). All four failinggpu_split_wave64_*tests went from0/5onmainto3/3idle and10/10under async compute load (0/146total under load), withds_cmpstore_rtn_b32confirmed inside the spin loop inRADV_DEBUG=shaders.The difference between NVIDIA Linux (
vkd3d-proton) and AMD Linux fits NVIDIA's proprietary Vulkan compiler vs Mesa NIR (which hoistsInterlockedAdd(..., 0u, c)out ofxcl_x_meet()on RADV, while Windows AMD Adrenalin and NVIDIA keep the poll in the loop) rather than wave32 vs wave64 hardware. A confirmation of #1244 on your RX 7900 XT (RDNA3) would still be useful to close the loop on RDNA3.AI use: Antigravity (Gemini 4 Neon) drafted this reply from our #1244 test results; I reviewed it before posting.
SlopTart commentedon Nov 24, 2026
Floor update for this issue on current main
9e3831e1, now that the split tests were renamed to thegpu_split_wave64_*family (from merged #67/#94). This is the first report of that family on a native wave64 card forced into split mode; the NVIDIA rows are all green natively.XCL_SPLIT_WAVE64=1,--test-threads=1, RX 7900 XT (native wave64):The failing set is not stable across runs (that is itself a signal:
gpu_split_wave64_masks_read_whole_after_partial_writesfails 3/3;gpu_split_wave64_local_and_exchanged_masks_in_diverging_waves2/3 with left157right164;gpu_split_wave64_waves_diverge1/3;gpu_split_wave64_cross_half_operationsalso seen red in a separate control run). Onlygpu_split_wave64_lane_local_masksis green every run. A flaky composition points at mask state leaking between halves rather than one deterministic translation bug.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, release profile. See my Linux rows in #42 / #718.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
SlopTart commentedon Nov 24, 2026
Follow-up to my floor comment above: same main
9e3831e1, still forced split mode, but each failing test run solo in its own process (--exact, 3 runs each). This separates "the test itself is broken" from "state leaks between tests in one process":gpu_split_wave64_masks_read_whole_after_partial_writes: FAILED 3/3 solo, deterministicgpu_split_wave64_local_and_exchanged_masks_in_diverging_waves: FAILED 2/3 solo, self-flaky (same157vs164delta)gpu_split_wave64_waves_diverge: ok 3/3 solo, yet it went red inside the family run above: only fails after the other split tests have run in the same processSo two of the three are genuine single-test bugs on native-wave64 hardware in split mode, and
waves_divergeis a cross-test state leak: something in the earlier split tests leaves mask state behind that flips a otherwise-green test. Both signals point at half/mask bookkeeping not being reset per program, consistent with the mask-semantics theme of this issue.Counts only, no game data. Same machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, release profile.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
SlopTart commentedon Nov 24, 2026
Found the source of the unstable composition reported above:
gpu_split_wave64_cross_half_operationsis the polluter.Order-pair runs on the same commit, forced split mode, 2 runs per pair:
waves_divergeafterlocal_and_exchanged_masks_in_diverging_waves: ok, okwaves_divergeaftermasks_read_whole_after_partial_writes: ok, okwaves_divergeaftercross_half_operations: FAILED, FAILEDwaves_divergesolo: ok 3/3 (from the previous comment)cross_half_operationssolo: FAILED 2/2 (a genuine single-test failure too)That also explains the shifting family results: alphabetical order inside one process puts
cross_half_operationsfirst, sowaves_divergeonly goes red in the family run, andmasks_read_whole/local_and_exchangedfail on their own merits regardless of order.Summary for this axis: 3 broken split-mode tests on native wave64 hardware (
cross_half_operations,masks_read_whole_after_partial_writes,local_and_exchanged_masks_in_diverging_waves), plus one cross-test state leak fromcross_half_operationsthat flips an otherwise-greenwaves_diverge.Counts only, no game data. Same machine and stack as my comments above.
AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Tests: label geometry subgroup regression phases
Docs: the split-wave64 exchange spins by default, since PR xcl-dev#798
Recompiler: split wave64 spin loops poll with a compare-exchange, not…