Recompiler: split wave64 halves meet before each LDS access #1252
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!1252
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1252"
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?
@not-rex on GitHub · 2026-11-24 13:45 UTC · original
not-rex:w64-lds-order→main· +306 −5 · 5 files · 3 commits · openOn GPUs with 32-lane waves only, a console wave64 program runs as two hardware wave32s ("halves"), and nothing ordered their LDS accesses. A console wave runs an instruction in all 64 lanes before the next one, so a lane reads the LDS word another lane wrote an instruction earlier without an
s_barrier. Split, a read could run before the other half's write (it got a stale word) or after that half's later write. The halves now meet before every LDS access. Part of #675 (plan: https://github.com/ivall/xcl/issues/675#issuecomment-7130688157).To reproduce on a GPU with 64-lane waves (AMD):
XCL_SPLIT_WAVE64=1forces the split form there, socargo test -p xcl --lib split_wave64runs the same path as on NVIDIA.What is in it
crates/xcl/src/gpu/recomp/emit.rs(17 lines):x64_lds_meet()emitsxcl_x_meet();in the split form in kernel, compute and mesh mode. The DS handler calls it before each LDS access (ds_read*,ds_write*, the ADDTID forms, the 8 / 16-bit and d16 forms, the LDS atomics), once the access is known to be translated: a refused one (GDS, an unknown DS op) gets none. Nothing is exchanged: the meeting waits for the other half's arrival count (spin form) or is a group barrier (XCL_WAVE64_SPIN=0), so each half's earlier instructions are done before the access. Both halves run the same instruction stream, so their exchange counts stay in step. Geometry mode is unchanged.ds_bpermuteandds_swizzledo not touch LDS and are unchanged. Native wave64 and wave32 translations are unchanged.crates/xcl/src/gpu/recomp/tests.rs:split_wave64_meets_before_each_lds_access(no GPU, so CI and a wave64 machine run it): the emitted HLSL of the test program has sixxcl_x_meet();in the split form and none natively, as a wave32 program, or for a GDS access.gpu_split_wave64_lds_follows_instruction_order: a wave64 compute program in groups of one console wave (64 threads) and of four (256 threads, the counter-paired form), 1,024 groups each. Lanes 32..63 write a word each, lanes 0..31 read them and write a second bank, lanes 32..63 read that and overwrite the first bank, lanes 0..31 overwrite the second. The EXEC masks are constants, so no exchange lies between the accesses. The values carry the group, so a word another group left in the LDS does not pass. It runs natively where the GPU has 64-lane waves and skips without a GPU or DXC.docs/wave64-on-wave32.md: a row in the exchange table, hazard 6 (LDS order), and LDS accesses added to the cost paragraph. Hazard 6 also says what the meeting does not do: it orders instructions, not the lanes of one instruction, and geometry mode assumes ES code reads no other lane's item before thes_barrier.Follow-up commits (after the RTX 3060 report below; review asked for them as separate commits)
8a79b8eleaves out meetings that order nothing: a read right after a read in the same basic block, and any access with an exchange (itself a meeting) between it and the block's previous LDS access. Block starts, writes, atomics and reads after writes still meet.Em::newnow takes the block starts, so no caller can elide across blocks by leaving them empty. On a read-heavy test program the meetings go from 8 to 5; on the retail title's 370 wave64 compute and mesh programs with LDS (@erickbobd's census in the comments) from 11,127 to 6,694 statically (−39.8 %).2473e2faddsXCL_WAVE64_LDS_ORDER=0, which leaves the meetings out entirely (default on), so anyone can A/B them; set, it bypasses the translation caches likeXCL_WAVE64_SPIN.v_cmpinto VCC never read whole) is not a meeting, a loop head meets, and a read run with and without an exchange is checked on the GPU in 64- and 256-thread groups. Builds with a meeting wrongly elided fail them.Rebased again on
main0829441(headec00d67):mainnow reads the uniform lane throughfirst_lane_live; the meeting call stays after that line. The change is the same (+306/-5). Before that, onmain1a0bbe3a(headc483200): the conflicts were neighbours only (img_writesbesidex64_lds/block_startsinEm,XCL_DXIL_NO_OPTbesideXCL_WAVE64_LDS_ORDERin the cache-bypass list and its test); the change is the same (+306/-5). The RTX 3080 suite and smoke runs below are from this head. Before that, onmain8f5fca5b(head0141ee9): main moved the GDS check inds()above the ADDTID branch and rewrotewrite_mask; the meeting now sits after main's single GDS check, andx64_met()before the newballot_px_quadmatch. RTX 5070 Ti (Windows Sandbox, GPU-PV):split_wave6414 of 14; full suite 1100 passed, 8 failed, the same 8 that fail onmainthere.Not covered: the direct RDNA2-to-DXIL path (#1426,
gpu/dxil/lower_mem.rs, opt-in withXCL_DIRECT_DXIL) has its own split form and the same LDS ordering gap; this PR only changes the HLSL path.Tested
RTX 3080,
cargo test --workspace -- --test-threads=4at the headec00d67(onmain0829441): 1278 passed, 0 failed, 46 ignored; the SKIPPED lines are main's new lower/lower_dxil GPU agreement tests, the two no-wave64 tests andpso_measurement_compiles_an_exact_synthetic_record.NVIDIA GeForce RTX 3080 10 GB (driver 610.88 / 32.0.16.1088, 32-lane waves), AMD Ryzen 9 5900X, Windows 11 Pro 26200; Rust 1.100.0
stable-x86_64-pc-windows-msvc; tests in the default (debug) profile, smoke runs in release.cargo test --workspace -- --test-threads=4at the head2473e2f: 747 passed, 0 failed, 41 ignored (at77a8190: 743 passed, 0 failed, 41 ignored) (SKIPPED GPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_maskandgpu::recomp::tests::gpu_wave32_program_in_wave64_hardware, both "no wave64").RTX 3080, separate runs of each test, the final form of the test with the meetings taken out (same test file,
emit.rsas onmain) and at this commit:gpu_split_wave64_lds_follows_instruction_order, default (spin form)XCL_WAVE64_SPIN=0(barrier form)split_wave64_meets_before_each_lds_access(no GPU)RTX 5070 Ti through GPU-PV in Windows Sandbox (32-lane waves; the guest reports driver 10.0.26100.1150), Rust 1.100.0, debug,
cargo test --workspace --frozen --no-fail-fast -- <filter> --test-threads=4.First form of the GPU test (64-thread groups only) and of the change (the meeting one line earlier in the DS handler), 20 separate runs per variant:
XCL_WAVE64_SPIN=0(barrier form)split_wave64 --include-ignored(the five othergpu_split_wave64_*tests,mesh_split_wave64_formandbench_split_wave64in the same process, 4 threads)Wrong values seen: 0 (read before the other half's write) and the overwriting value (read after its later write).
This commit's tree, filter
split_wave64, 5 separate runs: 8 passed, 0 failed, 1 ignored in each. With the meetings taken out and only the 256-thread groups run: 0 of 5 pass, 237,824 to 239,936 of 262,144 threads wrong, andsplit_wave64_meets_before_each_lds_accessfails (0 meetings, not 6).Whole suite, this commit's tree: 741 passed, 2 failed, 41 ignored; SKIPPED
gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64). The failures arelauncher::tests::console_detection(it readsSystem32\notepad.exe; the sandbox image has none) andhle::d3d12x::fence_x::tests::the_cell_follows_the_fence(left 7, right 9), which did not fail in the run of the first form (741 passed, 1 failed).Cost, same GPU, first form: the test's program (6 LDS accesses in 28 instructions) goes from 1 exchange to 7. GPU time of a 16,384-group dispatch, median of 9, two rounds: 0.046 to 0.120 and 0.123 ms in the spin form (2.6 times), 0.035 to 0.035 and 0.036 ms in the barrier form.
Regression run
RTX 3080,
scripts/smoke.ps1, 300 s each, menus only (fresh data),main0829441(this PR's base) and then this PR's headec00d67:In the world (RTX 3080,
main930e8b4+ #1123 + #1254, warm data and caches,XCL_PSO_WAIT_MS=50, A at 30 and 40 s, 400 s; one run each):main77a81902473e2f)XCL_WAVE64_LDS_ORDER=0ListX #101#101GPU queue.Waittimeouts (first)0x887A0006168.5 s+0x23cf683178.4 s0xC0000005+0x2215c35158.5 s0x887A0006160.7 sE_OUTOFMEMORYAll four stop in the same GPU-side stall 35-55 s after
#101(GPU at 100 % until the end), with or without the meetings, so on this card the meetings don't change the world; the RTX 3060 regression report below is not reproduced here.Not tested
XCL_SPLIT_WAVE64=1there (since run by a reviewer on an RX 9070 XT, see the comments).split_wave64filter instead). On the RTX 3080: the run under load and the timing.xcl_x_dead) in a real run. More exchanges mean more places where a pair that is already out of step waits out its 2^20 polls.AI use
@DavidM1911 on GitHub · 2026-11-24 14:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:Thanks!
@upipibi on GitHub · 2026-11-24 14:11 UTC · original
I read the ordering argument through and it holds. With a meet before every access, a half can be at most one access ahead of the other, and the
GroupMemoryBarrier()on each side of the arrival count makes the earlier LDS writes visible. Three things to weigh:xcl_x_meetpolls withInterlockedAdd(…, 0u, c), and Mesa's NIR hoists that load out of the spin loop (#847: oneds_loadbefore the loop, none in it). So on RADV a half that arrives late is never seen: the waiting half spins out its 2^20 polls, setsxcl_x_dead, and runs on unordered. YourXCL_SPLIT_WAVE64=1reproduction on AMD would pass on Windows drivers and still fail under load on Linux. #1244 changes the poll to a compare-exchange; the two touch different parts ofemit.rsand merge cleanly.LOOP_GUARDbudget therefore costs about 15 ms more per wave for each LDS access in its body. #505's stalled programs are loops of that kind, with 3–4 exchanges already. Your test's 2.6x is the same effect.Not run here; read from the diff, plus the timing from #505.
AI-assisted (Claude Code).
@teidenzero on GitHub · 2026-11-24 14:16 UTC · original
RTX 4090 (Ada, 32-lane waves) at
77a8190: the 20-run matrix and the timing of the final formMachine: NVIDIA GeForce RTX 4090 24 GB, driver 621.24 (32.0.16.2124), 32-lane waves; AMD Ryzen 7 3700X; Windows 10 Pro 22H2 build 19045.6466 with the D3D12 Agility SDK 1.620.2; Rust 1.100.0
stable-x86_64-pc-windows-msvc, debug; DXC 1.8.2502.11 (Windows SDK 10.0.26100).Whole suite at this commit,
cargo test --workspace --no-fail-fast -- --test-threads=4: 743 passed, 0 failed, 41 ignored; SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.Matrix, 20 separate
cargo testprocesses per cell. "Without the meetings" is this commit withx64_lds_meet()emitting nothing (a local change, same test file). Without them the test stops at the 64-thread groups, so the 256-thread rows ran a local copy of the test with only those groups.gpu_split_wave64_lds_follows_instruction_order, spin form (default)XCL_WAVE64_SPIN=0XCL_WAVE64_SPIN=0split_wave64 -- --include-ignored --test-threads=4(9 tests, one process)Wrong values in the quoted examples: 0 (read before the other half's write) and the overwriting values (
3 << 28 | n,4 << 28 | n). In 2 of the 20 filter runs, two early reads returned0x1and0x9FF, which this program never writes (presumably LDS left by another test in the same process).GPU time of a 16,384-group dispatch, median of 9 (
runner::dispatch_timed, from a local ignored test), round 1 / round 2:XCL_WAVE64_SPIN=0XCL_WAVE64_SPIN=0On this GPU the barrier form avoids the cost only for the 64-thread groups: the 256-thread groups take the same time with and without
XCL_WAVE64_SPIN=0, so for this program they pay about 2.3× either way.Not tested
XCL_SPLIT_WAVE64=1, and Linux / RADV (the #1244 case above).AI use
@IvyNotFound on GitHub · 2026-11-24 14:37 UTC · original
Retail run on an RTX 5080 (32-lane waves):
77a8190merged ontomain930e8b4– no device removal, the split-wave64 programs run into world loading; the #505 GPU-wait stalls are still there, and one of two runs ended in the title's0xc0000409as somemainruns doTested
main930e8b4+ this PR's head77a8190(clean merge, local commit03b6de1). Retail title of #505,scripts/smoke.ps1 -Seconds 140,XCL_PRESS_A_AT=15,XCL_PSO_WAIT_MS=50(past the firstListX #101, into world loading),XCL_FRAME_DUMP=2. Two runs of the PR (the first also rebuilt the changed programs), compared with one ofmain.main930e8b4GPU queue.Wait … did not complete within 5000 mssparse: the queue has not reached fence value 48038 after 5 sat 125.9 s, with nounhandled exceptionline. That matches the0xc0000409end of one of my fourmain47efa2eruns (https://github.com/ivall/xcl/issues/505#issuecomment-7130913073), so I don't read it as this PR's.main.Not tested
AI use
@not-rex on GitHub · 2026-11-24 14:57 UTC · original
Thanks all. @teidenzero's matrix (RTX 4090) and @DarkPanda69's RX 9070 XT run (native wave64 and
XCL_SPLIT_WAVE64=1) cover two of the "Not tested" lines, and @IvyNotFound's retail run shows no device removal with the meetings in the world load.@upipibi, on your three points:
AI use: Claude Code (Claude Opus 5.5) worked through the read-after-read argument and wrote this reply.
@Rodriguerra on GitHub · 2026-11-24 15:54 UTC · original
Tested this on real hardware (NVIDIA RTX 3060 12 GB, driver
32.0.16.1088, Windows 11 26200, wave32 split-wave64) on a retail title entering a heavy 3D world with Mesh Shaders + compute passes:0present readback timeouts, only4allocator resets across ~13 min,16GPU queue.Wait timeouts, local VRAM stayed flat (~13.9 GB, no crash).present: frame dump copy: GPU fence still pending after 2000 msx3),GPU queue.Waittimeouts jumped 10x (16 -> 159), andalloc_poolpiled up 160 put-aside PC command allocators (160 made, 160 put aside), pushing local VRAM from9.0 GB -> 21.7 GBand process commit to39.1 GBuntilE_OUTOFMEMORY(0x8007000e).Putting an unconditional
xcl_x_meet()spin-barrier before everyds_read/ds_write/ds_atomicin real wave32 shaders seems to cause severe warp-scheduler stalls / livelock on NVIDIA when shaders do frequent or divergent LDS ops. Might need either a hazard/liveness check (only emitting when a write can cross halves) or an opt-in switch until NVIDIA wave32 overhead is addressed.@not-rex on GitHub · 2026-11-24 15:56 UTC · original
@Rodriguerra thanks, that is a serious result and I'm treating it as one. I've moved this PR to draft until it is understood.
A few details would help me reproduce it:
XCL_WAVE64_SPIN=0– one run withXCL_WAVE64_SPIN=0would show whether the spin itself is the cost;One note on scope: the meetings are only emitted for console wave64 programs in the split form (
xcl_x_meet()between the two 32-lane halves). Programs that are wave32 on the console are not touched. A program that does many LDS accesses in a loop does pay one meeting per access, and @upipibi measured that at about 0.23 µs each, so a heavy LDS loop can get much slower; I didn't measure that in a world.What I'll do: our RTX 3080 now gets into world loading, so I'll run
mainand this PR there back to back with the same settings and post the counts (frames, GPU-wait timeouts, allocators put aside, commit). In parallel, @upipibi's read-after-read reduction cuts the meetings in read-heavy code; I'll measure how much it removes in the title's programs before deciding whether this needs a switch or a narrower rule (only where a write can cross halves, as you suggest).AI use: Claude Code (Claude Opus 5.5) helped read the report and write this reply.
@not-rex on GitHub · 2026-11-24 16:36 UTC · original
RTX 3080 (10 GB, driver 610.88), retail title into the world:
mainvs this PR, one run each. I don't see the RTX 3060 regression here.Tree:
main930e8b4+ #1123 + #1254 (our diagnostics), with and without77a8190, release. Same warm data and caches,XCL_PSO_WAIT_MS=50, A at 30 and 40 s, 400 s limit,XCL_ACTIVITY=1. Presents are summed from the 2 s activity lines (no run reached its end, so there is no smoke block).mainXCL_WAVE64_SPIN=0ListX #101#101GPU queue.Wait … did not complete within 5000 ms0x887A0006at 168.5 s+0x23cf683at 178.4 s0x887A0006at 156.7 sE_OUTOFMEMORYIn all three the GPU sits at 100 % from about 122-126 s, with video memory at the card's 9.9 GB, until the hang or the watchdog: the same GPU-side stall about 35-55 s after
#101, with or without the meetings. With one run each I read the differences as noise. The 159 timeouts, the 160 put-aside allocators and the out-of-memory from the RTX 3060 report don't appear on this card.So far that is one 3080 against one 3060 with an unknown tree, so I'm keeping this in draft until @Rodriguerra's details are in. Meanwhile I'm testing @upipibi's read-after-read reduction and an
XCL_WAVE64_LDS_ORDER=0switch as a follow-up commit, which would make the meetings cheaper and let anyone A/B them.Not tested: more than one run per arm; the RTX 3060; Linux/RADV.
AI use: Claude Code (Claude Opus 5.5) ran the three runs on my machine through a scripted runner and wrote this comment.
@WebIdentity1 on GitHub · 2026-11-24 16:53 UTC · original · edited 2026-11-24 17:02 UTC
Independent Kernel and Mesh LDS execution validation of
77a8190e4528a135cb0ed9fd7de9a31e5699371f. Test-only fixtures below; no runtime changes or competing PR. This fills the previously untested mode coverage, within the synthetic cases described here.Tested — Kernel
Reuse this PR's
lds_order_programwithOptions { mode: Mode::Kernel, wave64: true, .. }selected throughon_gpu. Eight single-console-wave dispatches with different synthetic group tags;64 lanes each. Every lane's v4/v5 and corresponding GLOBAL_STORE_DWORDX2 output are checked against independent CPU expectations.512 lane checks per variant. The split translation is asserted to have exactly sixxcl_x_meet();calls; native wave64 has zero.XCL_WAVE64_SPIN=1XCL_WAVE64_SPIN=0All runs:0 ignored, no skips/timeouts. Negative runs exit101 on the output assertion, positives exit0. The control removes only those six calls from the translated HLSL before DXC, preserving the rest of the emitted program and CPU expectations; it does not remove other exchange mechanisms or alter the runtime source. Both selected adapter names and split status print in the logs.
Command, each variant in a fresh process:
cargo test --locked -p xcl --lib gpu_kernel_split_wave64_lds_order_probe -- --test-threads=1 --show-output --nocaptureSet
XCL_ADAPTER=3090/AMDandXCL_WAVE64_SPIN=1/0. On AMD setXCL_SPLIT_WAVE64=1for forced split; unset it for native. Set local diagnosticXCL_PROBE_OMIT_LDS_MEETS=1only for the negative control, otherwise unset. Kernel fixture/source was identical across its matrix; all 221 source hashes matched the Windows tree. The Mesh fixture below was appended afterward; the Kernel fixture itself is unchanged. The patch reverse-apply check passes against the instrumented source.Tested — Mesh
The real
Mode::Meshtranslation executes through the existing two-pass runner: translated compute shader writes mesh records, native passthrough mesh shader consumes them, pixel shader renders green/red according to the LDS-derived vertex attribute. Reuses this PR's LDS program with Mesh input initialization. Two groups each at 64 and 128 threads: checks headers, primitive indices, 384 vertex attribute records against a CPU oracle, and six pixels (two triangle interiors and one clear pixel per group size). Exactly six LDS meeting calls in split HLSL, zero in native; omission control removes only those six calls before DXC.Each table entry is one fresh-process test running both group sizes. Wrong-record/pixel totals are out of 384/6.
No skips or timeouts. NVIDIA omission controls exit101 on the final output assertion; all other Mesh runs exit0. AMD's Mesh omission controls still pass: this fixture demonstrates correctness on that adapter, but does not detect the omitted-meeting fault there. No inference that AMD never needs these meetings.
The 128-thread split case always emits spin, including when
XCL_WAVE64_SPIN=0; only the 64-thread case emits the barrier form with that setting. Logs print actualemitted_spin. In the NVIDIA 64-thread barrier omission control, 64/128 records are wrong although all three sampled pixels match. The 128-thread omission case has 128/256 wrong records and both triangles red. Checking pixels alone would miss some corruption.Command:
cargo test --locked -p xcl --lib gpu_mesh_split_wave64_lds_order_probe -- --test-threads=1 --show-output --nocaptureSame environment matrix as Kernel above. Final Mesh source identical across all nine reported runs; all 221 source hashes match Windows. Reverse-apply check and
git diff --checkpass. An earlier fixture revision incorrectly assumed Mesh v5 started at zero; final fixture saves its group input then explicitly initializes the LDS result register, matching the Kernel setup. No runtime fix or relaxed assertion was needed.Correction to my earlier coordination note: the AMD iGPU does support this native mesh path. Actual adapter-selected execution above replaces that mistaken capability assumption.
Windows10 Home19045, Ryzen7 7800X3D, RTX3090 driver591.74, AMD Radeon integrated32.0.21030.2001; Rust1.98.1 MSVC, DXC/dxil1.8.2502.11, Agility1.620.2, debug. SSH Session0. No proprietary inputs.
Not tested
Multiple console waves per Kernel dispatch, Linux/RADV, GPU performance, stress under load, current-main integration, full workspace with these additional fixtures, or a retail title /
xcl-smoke. These results do not resolve the reported world-load regression or justify removing draft status. Existing Compute coverage is not claimed as a new run here.AI use
Codex (GPT-6) inspected ownership/coverage, wrote the local fixtures, ran native validation and prepared this report, reusing the program already in this PR.
Complete Kernel + Mesh fixture patch against77a8190 (130 added lines)
@Filip722 on GitHub · 2026-11-24 17:55 UTC · original
Tested exact #1252 at
77a8190e4528a135cb0ed9fd7de9a31e5699371fon main9e3831ewith our local Series X storage and texture work. RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08), Bazzite 44 Testing, Proton Experimental 11.0-20261112, vkd3d-proton 3.14522cc1, dxil-spirv1dc543f.The Windows MSVC release
split_wave64filter passed eight tests with one ignored benchmark in bothXCL_WAVE64_SPIN=1and0. The LDS ordering test ran on the NVIDIA GPU in both modes. No focused test skipped its body.Matched title runs in both modes accepted the scripted A input and reached loading artwork. Spin recorded 2,688 presents and exited through a title null-write path. Barrier mode recorded 2,431 presents and reached the title GPU watchdog. Both had zero storage failures, logged bind timeouts, device removals and kernel GPU faults. The visible milestone stayed at loading.
OpenAI Codex with GPT-6.2-Sol high prepared the local build, ran the tests and wrote this report.
@erickbobd on GitHub · 2026-11-24 18:17 UTC · original
Retail numbers for two of the Not tested lines: how many programs of the retail title this touches, and what the per-basic-block tracker you mention as a follow-up saves. Counts only, from the retail 1.0.2.1 pack,
mainb7aa9f3; no title run with this PR.Which programs (
detect_wave64on the code, the pack's FSSM interfaces):s_barrierat allMeetings in the split form, static (the 370 wave64 compute and mesh programs with LDS accesses, all fully translated, 4 memory windows):
The median program has 16 accesses. The largest has 417, and the tracker still gives it 405 meetings. So the tracker removes about a third statically, not an order of magnitude. I have no per-frame count, so I cannot say whether it would change the RTX 3060 result.
The tracker is about 40 lines in
emit.rs. The state resets inEm::take(), which ends every block in all three emission loops. Geometry is left out, as here. With a read-after-write and write-after-read test it passes the whole suite on an RTX 5070 Ti (native, 32-lane waves, NVIDIA 617.14, debug): 771 passed, 0 failed, 41 ignored, SKIPPED the two no-wave64 tests. Its test fails with the meetings taken out, and also with only the write-after-read meetings taken out. I can open it stacked on this PR if you want it, or leave it.Not tested
mainhere it stops at the title's watchdog after ~278 s.AI use
@not-rex on GitHub · 2026-11-24 18:44 UTC · original
Pushed two follow-up commits (description updated with the counts):
8a79b8e: @upipibi's read-after-read reduction, plus leaving out a meeting when an exchange already lies between two LDS accesses (8 -> 5 meetings on a read-heavy program; writes and reads after writes still meet).2473e2f:XCL_WAVE64_LDS_ORDER=0switches the meetings off, so they can be A/B'd on any machine.RTX 3080, in the world: the head behaves like
mainand the first form (same GPU stall 35-55 s after#101, no allocators put aside, no out-of-memory); suite 747 passed, 0 failed; menus smoke pair againstmain930e8b4in the description.@Rodriguerra, if you can, one run of your RTX 3060 setup at this head with and without
XCL_WAVE64_LDS_ORDER=0would show whether the meetings are what you saw. I'm keeping this in draft until then.AI use: Claude Code (Claude Opus 5.5) wrote the commits after an Opus review, ran the 3080 runs on my machine and wrote this.
@not-rex on GitHub · 2026-11-24 18:56 UTC · original
@erickbobd thanks, those counts fill two of the Not tested lines (351 wave64 compute + 5 mesh programs with LDS; 11,127 meetings statically).
The head I pushed an hour ago (
8a79b8e) already has the same rule as your tracker: no meeting for a read when only reads happened since the halves last met, with every basic block starting unknown (block starts come from the branch leaders, so loop heads meet too). It also counts an exchange (ballot, lane reads, bpermute, coherent scalar load) as a meeting, which the tracker could add on top. So I'd rather not stack a second PR on the same rule; if you can, your census run on2473e2fwould show what the exchange rule adds over your 6,946 (−38 %).AI use: Claude Code (Claude Opus 5.5) compared the two rules and wrote this.
@erickbobd on GitHub · 2026-11-24 19:23 UTC · original
@not-rex the census on
2473e2f, as you asked. Same pack and the same 370 wave64 compute and mesh programs with LDS accesses, all fully translated, 4 memory windows. Meetings are counted as thexcl_x_meet();lines the LDS rule emits, so the exchanges themselves are not in the count.77a8190)mainb7aa9f3)2473e2f: read after read, and an exchange counts as a meetingSo the exchange rule leaves out 252 more meetings than the tracker (3.6 % of its count), and −39.8 % against one per access in all. Two programs need no LDS meeting at all under it. The largest program, with 417 accesses, goes to 404.
Static counts only: nothing on per-frame counts or timing. The bases differ (
b7aa9f3for my tracker,47efa2efor this PR), but the programs and their 11 127 accesses are the same in both.AI use: Claude Code (Claude Opus 5.5) ran the census and wrote this comment.
@qcdaark on GitHub · 2026-11-24 23:14 UTC · original
@not-rex A/B of the new head on another NVIDIA card, since you asked for one before taking this out of draft. RTX 3070 Ti 8 GB (driver 621.24), Ryzen 9 7900X, 32 GB, Windows 11 26300.
Tree: main
c160d86+ #640 + #1428 + #1323 + this PR at 2473e2f (merged cleanly), plus a local 2-line patch so the #1323 report also runs on device removal (in the zip). Env: XCL_PAGE_BUDGET_MB=3072 XCL_PSO_WAIT_MS=50 XCL_ACTIVITY=1 XCL_NETWORK=0 XCL_PRESS_A_AT=25 XCL_RUN_SECONDS=300 XCL_GPU_CULPRIT=1. Title: the retail build from #675, story load.0x887a0006Both runs hang in the same window as without this PR (my earlier runs on #675: 131 s and 140 s). In both, the #1323 report says
0 of 278 / 0 of 343 lists have dispatches started and not done, and the title then stops at+0x2474606.Run 1's dump: all 97 warps on the GPU are in one compute program. Its Aftermath hash matches a 121,380 B DXIL in the cache. That is between the sizes I got for the same program without meetings (120,060 B) and with the first form of this PR (123,752 B, 77a8190), so it is very likely the same program with the reduced meetings. In the first form it was also the only hung program (40 and 28 warps).
So on this card neither the meetings nor leaving them out change the hang: it happens with or without them. For this title the meetings don't look like the cause, and they don't fix it either.
Logs (user name removed) + the local patch: gta6-1252b.zip
AI use: Claude Code (Claude Opus 5.5) ran the tests, read the logs and the Aftermath dump, and wrote this; I checked it before posting.
local-culprit-on-removal.patch
off-report.json
off-xcl.log
on-report.json
on-xcl.log
@not-rex on GitHub · 2026-11-24 23:56 UTC · original
@qcdaark thanks, that's the A/B I was hoping for. With my RTX 3080 runs it makes two NVIDIA cards where the head behaves like
main(same hang window, with the meetings on or off), and neither shows the RTX 3060 regression above. I'll take this out of draft in the morning unless @Rodriguerra's details point somewhere else.AI use: Claude Code (Claude Opus 5.5) wrote this.
@not-rex on GitHub · 2026-11-25 00:14 UTC · original
One more data point on the RTX 3060 report above: its allocator signature appears on plain
mainwithout this PR. RTX 3080,main20cf1302+ #1123 + #1254 (no #1252),XCL_COHERENT_HEAPS=0 XCL_COHERENT_MB=512,XCL_PSO_WAIT_MS=50, in the world: at 166.5 s the log says "512 allocator resets so far with recordings still held or on the GPU: another PC allocator took its place (268 made, 268 put aside now)", the same pattern as the report's "160 made, 160 put aside". So that part at least isn't from the meetings.AI use: Claude Code (Claude Opus 5.5) ran the run on my machine and wrote this.
@JJAutoCompare on GitHub · 2026-11-25 07:46 UTC · original
Tested
Independent native Windows run at clean detached PR #1252 head
0141ee9b0e6e1de67d5f17133d11a6cdb3ef0b5e. STOR-WINLAB, Windows 11 Enterprise Evaluation x64 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5. Unoptimized test profile with incremental compilation and debug info disabled.cargo test --locked -p xcl --lib --no-run -j 2 --message-format=jsonran outside the Arc mutex and exited 0. UsedXCL_ADAPTER=A770,XCL_DIRECT_DXIL=0, andXCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64. Left the LDS-order and spin settings at their defaults.1 passed, 0 failed, 0 ignored, 0 GPU skips in 0.59 s. Libtest filtered out 1,084 other tests. The fixture and mutex wrapper exited 0, and the executable digest matched before waiting, inside the mutex, and after exit.
The HLSL/DXC split-wave64 fixture dispatched 1,024 groups of 64 threads and 1,024 groups of 256 threads. All 327,680 two-word comparisons matched the expected cross-half LDS readback.
Not tested
Other LDS or read-run fixtures, ordering disabled, native wave64, direct DXIL, the PR base, other adapters, the full test suite, and title smoke runs.
AI use
T3 Code / Codex (gpt-6.2-sol) verified the revision, ran the checked-in fixture, and wrote this report.
@not-rex on GitHub · 2026-11-25 12:08 UTC · original
Rebased onto
main1a0bbe3a(headc4832004). The conflicts were only neighbours:GDScheck, whichmainnow makes once for every LDS form;img_writesnext tox64_lds/block_startsinEm;XCL_DXIL_NO_OPTnext toXCL_WAVE64_LDS_ORDERin the cache-bypass list and its test.The change itself is the same (+306/-5).
RTX 5070 Ti,
cargo test -p xcl --lib --locked -- gpu::recomp: 373 passed, 0 failed, 19 ignored (the SKIPPED lines are the wave64-hardware tests).@not-rex on GitHub · 2026-11-25 16:28 UTC · original
This conflicts with
mainagain (recomp/emit.rsmoves every hour or two). I'll rebase it and rerun the RTX 3080 smoke and suite when a maintainer wants to look at it, or once a day while it is open.@DarkPanda69 on GitHub · 2026-11-24 14:39 UTC · original · edited 2026-11-25 16:33 UTC
Update for head
ec00d67(tested as is; it no longer applies on currentmain): same result. Both GPU tests (gpu_split_wave64_lds_follows_instruction_order,gpu_split_wave64_lds_read_run_follows_instruction_order) pass on the RX 9070 XT (native wave64, and withXCL_SPLIT_WAVE64=1) and on the RTX 3060 (split wave64). Wholegpu::filter: RX 9070 XT 647 passed, 2 failed (the #2115 fuzz seeds, same onmain); RTX 3060 649 passed, 0 failed.AMD run with 64-lane waves, which the other reports here don't cover. Updated for head
0141ee9(earlier runs on77a8190and2473e2f, same result).Tested: pass, head
0141ee9as is (it no longer applies as a patch onmainaaa0936), debug, 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:XCL_SPLIT_WAVE64=1(split form on 64-lane hardware)gpu_split_wave64_lds_follows_instruction_orderandgpu_split_wave64_lds_read_run_follows_instruction_orderok in all three.Not tested:
XCL_WAVE64_LDS_ORDER=0; mesh and kernel mode with an LDS program; the whole workspace suite; a title.AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 04:32 UTC · original
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.