Repository navigation
Conversation
|
Native Ampere check of Tested
Not tested: real title inputs or retail smoke, full workspace suite, native wave64, AMD/Intel, production D3D12.X chain allocation/lifetimes or ExecuteIndirect, arbitrary per-lane exits within a guest wave, cold driver compilation or GPU throughput. This tests the synthetic module/runner path on Ampere, not game compatibility. The original #2080 forward-edge test remains a result of its older exact snapshot. AI use: Codex (GPT-6) inspected the change, wrote the new fixture, ran native verification and prepared this report. Portable test-only patch on 9498862diff --git a/crates/xcl/src/gpu/dxil/module/split.rs b/crates/xcl/src/gpu/dxil/module/split.rs
index 605b8c6..55440f3 100644
--- a/crates/xcl/src/gpu/dxil/module/split.rs
+++ b/crates/xcl/src/gpu/dxil/module/split.rs
@@ -757,6 +757,91 @@ mod tests {
assert_eq!(runner::dispatch_split(&chain, groups, &input).unwrap(), reference);
}
+ /// Guest waves that returned still participate in the checkpoint rendezvous
+ /// while other waves keep advancing their partner counters and slot banks.
+ #[test]
+ fn dispatch_chain_exited_waves_preserve_other_waves_3d() {
+ if !runner::wave32_supported().unwrap_or(false) {
+ runner::skip_test("no wave32 GPU");
+ return;
+ }
+ println!("CHAIN_EXIT_GPU={}", runner::adapter().unwrap());
+ let geometry = [16, 16, 1];
+ let cs = CsInterface { threads: geometry, ..Default::default() };
+ let options = KernelOptions { wave64: true, split: true, mem_windows: 1, sampler_base: 0 };
+ let mut lw = Lw::new(&[], &Default::default(), options, &Entry::Compute(cs));
+ let (tid, _) = lw.setup_lanes_compute(geometry, false);
+ let half = lw.lshrc(tid, 5);
+ let wave = lw.lshrc(tid, 6);
+ let [x, y, z] = [0, 1, 2].map(|axis| lw.s.group_id(axis));
+ let z = lw.shlc(z, 1);
+ let row = lw.add(z, y);
+ let row = lw.shlc(row, 1);
+ let group = lw.add(row, x);
+ let base = lw.shlc(group, 8);
+ let index = lw.add(base, tid);
+ let addr = lw.shlc(index, 2);
+ let mem = lw.mems[0];
+ let initial = lw.s.raw_load(mem, addr, 1)[0];
+ let acc = lw.tmp_var();
+ lw.wr(acc, initial);
+ let not_second_wave = lw.cmpc(Pred::Ne, wave, 1);
+ for round in 1..=12 {
+ if round == 1 || round == 7 {
+ let exit = lw.block(Some(1));
+ let live = lw.block(Some(1));
+ let stops = lw.cmpc(Pred::Eq, wave, if round == 1 { 0 } else { 2 });
+ lw.cond_br(stops, exit, live);
+ lw.s.m.set_block(exit);
+ let old = lw.rd(acc);
+ let value = if round == 1 { lw.addc(old, 100_000) } else { old };
+ lw.s.raw_store(mem, addr, &[value]);
+ lw.s.m.ret();
+ lw.s.m.set_block(live);
+ }
+ let mut exchange = |lw: &mut Lw| {
+ let payload = lw.addc(half, round);
+ let peer = lw.exchange(payload);
+ let old = lw.rd(acc);
+ let value = lw.add(old, peer);
+ lw.wr(acc, value);
+ Ok(())
+ };
+ if round % 2 == 1 { lw.guarded(not_second_wave, &mut exchange).unwrap(); }
+ else { exchange(&mut lw).unwrap(); }
+ let next = lw.block(Some(1));
+ lw.br(next);
+ lw.s.m.set_block(next);
+ }
+ let value = lw.rd(acc);
+ lw.s.raw_store(mem, addr, &[value]);
+ lw.s.m.ret();
+ lw.s.m.optimize();
+ let chain = lw.s.split_compute(geometry, Some(tid), 160).expect("split with exited guest waves");
+ assert!(chain.pieces.len() >= 3);
+ let whole = lw.s.finish_optimized(geometry, Some(32)).unwrap();
+ crate::gpu::dxil::validate::validate(&whole).expect("valid whole shader");
+ let input: Vec<_> = (0..2064u32).map(|i| if i < 2048 { i + 17 } else { 0xdeadbeef }).collect();
+ let expected: Vec<_> = input.iter().enumerate().map(|(i, &v)| {
+ if i >= 2048 { return v; }
+ let tid = i as u32 % 256;
+ let peer = (tid / 32) ^ 1;
+ match tid / 64 {
+ 0 => v + 100_000,
+ 1 => v + 6 * peer + 42,
+ 2 => v + 6 * peer + 21,
+ _ => v + 12 * peer + 78,
+ }
+ }).collect();
+ println!("CHAIN_EXIT_STAGE whole pieces={} scratch_dwords_per_group={}", chain.pieces.len(), chain.dwords_per_group);
+ let reference = runner::dispatch(&whole, [2, 2, 2], &[], &input).unwrap();
+ assert_eq!(reference, expected, "whole program CPU oracle");
+ println!("CHAIN_EXIT_STAGE split");
+ let result = runner::dispatch_split(&chain, [2, 2, 2], &input).unwrap();
+ assert_eq!(result, expected, "split program CPU oracle");
+ println!("CHAIN_EXIT checked_words=2048 guards=16 pieces={} scratch_dwords_per_group={}", chain.pieces.len(), chain.dwords_per_group);
+ }
+
#[test]
fn dispatch_chain_wave32_live_loops() { compare(32); }
|
Intel Arc A770 verification for XCL PR #2097Tested
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target'
$env:CARGO_BUILD_JOBS = '2'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:TEMP = 'L:/XclTooling/pr2097/run-20261125T040217981Z/temp'
$env:TMP = $env:TEMP
$env:XCL_ADAPTER = 'A770'
$env:XCL_DXC_DIR = Join-Path $env:LOCALAPPDATA 'XclTooling/dxc-1.9.2609/bin/x64'
cargo test --locked -p xcl --lib --no-runThe GPU command ran in a fresh $exe = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/97fdf2b9ff8e1482/out/xcl-97fdf2b9ff8e1482.exe'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
& $exe gpu::dxil::module::split::tests::dispatch_chain_four_wave64s_preserves_partner_epochs --exact --nocapture --test-threads=1
}
Not tested Other fixtures, workspace suite, retail-title smoke, real-title shader output, cold pipeline timing, other adapters and drivers, native wave64, and the HLSL backend. AI use T3 Code / Codex ( |
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
9498862 to
ed1b606
Compare
|
@WebIdentity1 thanks, your early-exit fixture is in the PR as On an RTX 5070 Ti (NVIDIA 610.74, DXC 1.9.2609) all five The description check will fail until I add a regression run made on this head. That run is queued. AI use: Codex helpers adapted the fixture and ran the tests, and Claude Code (Claude Opus 5.5) wrote this comment. |
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
ed1b606 to
eafe39f
Compare
|
Same as on #2080, plus this PR's two tests. A run with vkd3d-proton as the host D3D12. 5 of the new dispatch-chain GPU tests crash the test process inside vkd3d-proton. Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
# Conflicts: # crates/xcl/src/gpu/dxil/module/split.rs
…#2080/xcl-dev#2097's chain tests and xclm's compact tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the second XCLM run no graphics pipeline was built after world load (74 s): the workers were all on huge compute pipelines and the split pieces of xcl-dev#2080/xcl-dev#2097/xcl-dev#2107, which went to the lane taken first. Every draw went on with its stand-in (7936 of 19940 skipped) and the screen stayed black. A quarter of the workers (at least 2, XCL_PSO_GFX_WORKERS) now take graphics builds only, and compute pieces go to the front of the compute lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AMD RDNA4 check of #2097 ( Setup
Results
Read / inference: this PR is a gain for 32-lane GPUs only. On AMD those programs still build whole. A native-wave64 chain would be a separate change, as discussed on #2080. AI use: Claude Code (Claude Opus 5.5) ran the census and tests and wrote this. Counts only, no game data. |
O5-7
left a comment
There was a problem hiding this comment.
Independent test report for PR #2097 on head commit eafe39f1a5329b08204cc423238456bedddd8557 (eafe39f).
Setup
- GPU: NVIDIA GeForce RTX 5080 16 GB (wave32-only, driver
32.0.15.9579) - CPU / RAM: AMD Ryzen 7 9700X, 32 GB RAM
- OS / Toolchain: Windows 11 Pro
10.0.26100,rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.8.2502.11(Windows SDK10.0.26100.0)
Test results (debug)
cargo test -p xcl dispatch_chain -- --nocapture: 6 passed, 0 failed, 0 ignored (dispatch_chain_native_wave64_builds_wholereportedSKIPPED ...: no wave64on this wave32-only GPU)XCL_DIRECT_DXIL=1 cargo test -p xcl dispatch_chain -- --nocapture: 6 passed, 0 failed, 0 ignored (dispatch_chain_native_wave64_builds_wholereportedSKIPPED ...: no wave64on this wave32-only GPU)cargo test --workspace -- --test-threads=4: 1160 passed, 0 failed, 46 ignored
Regression run (clean detached HEAD eafe39f)
xcl-smoke v1
commit: eafe39f1a5329b08204cc423238456bedddd8557
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1685 (PresentX 1685)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14105 MB
(Same clean-machine main cbc296a 60 s baseline: 1686 frames (PresentX 1686), 60 60 60, 0 removals, 0 crashes, 14083 MB.)
AI use
- Antigravity (Gemini 4 Neon) ran the builds, test suites, and smoke run, and formatted this report.
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
eafe39f to
3c818a2
Compare
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
3c818a2 to
b31aa81
Compare
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
b31aa81 to
bbca73c
Compare
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
bbca73c to
c8a6e3f
Compare
|
Regression run of Against the limits in CONTRIBUTING.md: 104 % 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 |
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
8b2fa0e to
d5c2781
Compare
|
NVIDIA test report for
AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run. |
|
Independent test and smoke report for head Tested
Regression run (
PR Not tested: NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window. AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting. |
|
Closing and reopening at once, only to get a CI run on today's |
|
The diff is read in full, CI is green on
@thiagocalile, could you run Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, Not tested here: a title run with this PR. AI use: Claude Code (Claude Opus 5.5) read the diff and the thread, ran the tests and wrote this on the maintainer's behalf. |
|
A memory data point for the 125 % question, from Linux / RDNA3 with caches as earlier runs left them (not cold): this PR together with #2404 did not raise the peak.
About 99 % on average. Two caveats: it is the cgroup's resident memory, not the process commit (XCL's commit counter reads 0 under Wine), and #2097 is not measured alone here. Both sides stalled at about the same place in these runs (3–28 s after the first Setup: RX 7900 XT, Mesa 26.2.5 RADV, Linux 7.2, Proton-CachyOS Wine 11, local vkd3d-proton; the stack is #1732 + #684 + #1860 + part of #203 on AI use: Claude Code (Claude Opus 5.5) ran the runs, read the cgroup samples and wrote this. |
Adopt WebIdentity1's four-wave fixture. Two guest waves return at different points while the other waves keep exchanging. Compare the whole shader and the dispatch chain to the CPU oracle across a 3D grid. Source: xcl-dev#2097 (comment) Assisted-by: OpenAI Codex (GPT-6) Co-authored-by: WebIdentity1 <212448219+WebIdentity1@users.noreply.github.com>
|
@ivall Here are the back-to-back 60 s smoke runs on AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64, driver
Run 2 (warm — primary pair)
PR Run 1 (warmup) verbatim blocks
PR Not tested: NVIDIA/Intel GPUs, Linux/Wine, or world load past the 60 s smoke window. AI use: Antigravity (Gemini 4 Hydrogen) ran the builds and smoke runs and drafted this report; the account owner reviewed and approved posting. |
bmjask
left a comment
There was a problem hiding this comment.
No source-level correctness defect found in this review; the wave checkpoint/barrier design and targeted GPU coverage look sound. Merge evidence is still incomplete: the RX 6600 comparison cited in the PR shows 18,573 MB peak commit versus 11,934 MB on main (156%), above the repository 125% regression ceiling. Please provide the requested warm-cache repeat pair or resolve the regression. The title smoke also creates but does not dispatch seven target cascade-shadow chains, so title-grid coverage remains incomplete.
Part of #1269. Two commits on
main0829441:8524858(the change) andd5c2781(a test by @WebIdentity1).#2080 splits wave64 programs only when the group is one 64×1×1 wave. In a 120 s title run, the longest cold compute builds are seven cascade-shadow programs with 8×16 and 16×16 groups (2 and 4 wave64s): 70–125k DXIL instructions each, 7–16 s per build, 87.5 s for all seven. They have no guest LDS, barriers or atomics. They are declined only because the wave64-on-wave32 emulation exchanges values between the two halves of each wave through translator-made group-shared counters and slots, and that state has to survive a dispatch boundary. With this change they split like the single-wave case and build in 1.7–2.5 s each.
What is in it
crates/xcl/src/gpu/dxil/module/split.rs:docs/wave64-on-wave32.md: describes the above.dispatch_chain_four_wave64s_preserves_partner_epochs. It runs four wave64s in a 16×16 group, where only the odd guest waves do every exchange, across repeated cuts. It compares every output word with the whole shader and a CPU reference. A single common exchange count for all waves would fail it.Tested
Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74), Windows 11 build 26200, release, DXC 1.9.2609.
Cold pipeline build (measured on
9498862, before the rebase), the seven cascade-shadow programs as the title emits them (byte-identical to the title's cache), fresh process, caches off; split pieces on 16 threads:All seven: 87.5 s whole against 15.3 s split, built one program after another. All 61 pieces passed the DXC 1.9 validator.
The same seven programs on this head, translated again in a fresh process with an empty translation cache for each: all seven still split, into 58 pieces, and the wholes and all pieces pass the DXC 1.9 validator. Since Recompiler: give each split handoff value one scratch slot and load it where it's used #2126, every carried value keeps its scratch slots for the whole chain, so these chains need 3.6–6.2× more scratch per group than before:
On
maina chained dispatch now runs in slabs of at most 256 MiB of scratch, with 384 MiB over all recordings, so a large grid takes more slabs rather than falling back to the whole pipeline. In the 120 s run under Regression run the title creates these seven pipelines but does not dispatch them (unlike onmain, no whole-program driver compile is logged for them, so they took the chain path), so their slab counts on the title's grids are not measured.Two larger cascade-shadow programs that
mainleaves whole: this head splits 062468c09af883b9 (1.6 MB of DXIL) into 17 pieces of 34–170 KB and 73fb752d7f62c3a5 (1.8 MB) into 19 pieces; the wholes and all pieces pass the DXC 1.9 validator. Cold driver builds of 062468c09af883b9 on the machine under Tested (driver cache disabled, the chain's root signature, one after another in one job, pieces fromfb5e73a, this change on the previousmain; this head's pieces differ by a few bytes): the 17 pieces take 13.0 s in total and at most 1.43 s each (the others 0.19–0.89 s), against 55.9 s for the whole form in the same job (47.5 s in an earlier job). Builds of the same DXIL vary by 1–17 % within one job, and more between jobs. 73fb752d7f62c3a5 was not timed.Output on the GPU, 6f3a2502a8d6b129 (on
9498862) with a seeded input that reaches its shading store (8×16 group, four hardware waves): the whole and split forms each write 2048 words, 0 different, and both match the expected 256 texels. All six pieces ran (768 invocations against 128). A CPU trace of the signed pieces with their continuation tags shows all 128 lanes doing their work in pieces 1, 2, 4 and 6, and passing through 3 and 5 on the default continuation; the GPU's per-piece times agree (19–20 µs for 3 and 5, 34–418 µs for the others).The new 16×16 test: all 512 output words match the whole shader and the CPU reference.
dispatch_chain_exited_waves_preserve_other_waves_3d, a fixture by @WebIdentity1 (comment), test only. In a 16×16 group on a 2×2×2 grid, guest wave 0 returns at once, wave 2 returns after six exchanges, and waves 1 and 3 take different exchange counts. The whole shader and its 4-piece split both match the CPU calculation on all 2048 output words plus 16 guard words.On
d5c2781, release, with full validation:cargo test -p xcl --lib --release split: 34 passed, 0 failed, 1 ignored, no skips;... dispatch_chain: 11 passed, 0 failed, and the one skip is the native wave64 test, which this card cannot run. Run locally in slabs of 1, 2, 3, 5 and 7 groups withmain'sdispatch_split_by(not part of the commits), both multi-wave tests also match the CPU calculation.Intel Arc A770, measured by @JJAutoCompare (comment) on
9498862: the four-wave test passes, 512 of 512 words for the whole shader and the split chain.AMD RDNA4 (native wave64), measured by @bielfreedom (comment), RX 9070 XT, on
eafe39f: no change there, as expected. Of the title's 2,689 compute programs the same 462 split, with the same piece counts as Recompiler: split large direct compute pipelines at CFG edges #2080, because wave64 groups compile as nativeWaveSize(64)and chains are built only for 32-lane hardware waves. Thedispatch_chainandsplit::teststests pass, 6 of 6, with no skips; they build the split-wave64 form explicitly, so it ran on AMD hardware too.The branch was rebased onto
main0829441, which has Recompiler: split large direct compute pipelines at CFG edges #2080, Recompiler: give a compute loop above the split target its own dispatch piece #2107, Recompiler: give each split handoff value one scratch slot and load it where it's used #2126 and the slab scratch (e9ddf17,0829441). The conflicts, all insplit.rs, were with Recompiler: give each split handoff value one scratch slot and load it where it's used #2126's fixed payload slots (the exchange region now follows them, and the scratch counts every lane of the group), Recompiler: give a compute loop above the split target its own dispatch piece #2107's limit for an oversized component (it now applies to a signal and its wait as one unit) and the slab constants (the scratch index uses the slab's group, as for every chain). The module comment now describes Recompiler: give each split handoff value one scratch slot and load it where it's used #2126's slots.8524858andd5c2781arebcde3f0and8b2fa0erebased.AMD Radeon RX 9070, regression pair by @Toons29 (comment), Ryzen 7 7800X3D, on
c8a6e3f(this branch before the latest rebase), 60 s of a title on the default route:main568e7db1566 frames and this PR 1631, peak commit 14592 / 14565 MB, no crash or device removal in either.cargo test --workspace -- --test-threads=4(debug) ond5c2781: 1274 passed, 0 failed, 46 ignored. 25 SKIPPED notices: no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows.Regression run
scripts/smoke.ps1 -Seconds 120, the same retail title, one after the other on the machine under Tested, release builds from clean trees.main0829441(this PR's base):this PR,
d5c2781:PR vs
main: 1490 / 1318 frames (113 %), peak commit 30484 / 29999 MB (102 %); device removals 0 and crashes 0 on the PR run, 0 and 0 onmain.Both runs use
XCL_DIRECT_DXIL=1and start with the same private XCL pipeline cache, holding only the pipeline list; the driver's own cache was left alone. At 120 s the PR run loggedcompute split: 130 programs split, 1143 pieces built, 154 chained dispatches issued in 159 slabs; scratch 341 MiB (most 341, largest dispatch 1456 in one slab), andmainloggedcompute split: 81 programs split, 766 pieces built, 52 chained dispatches issued in 52 slabs; scratch 20 MiB (most 20, largest dispatch 15 in one slab). Neither logged apiece ... refusedwarning. The PR splits more programs and holds more scratch: its largest chained dispatch needed 1456 MiB and ran in 6 slabs of 256 MiB, whilemain's largest needed 15 MiB. A third run of this head with a local debug line, not part of the PR, logged each chained program's first dispatch: 9 programs, all chained and none on the whole pipeline. None of them is one of the seven cascade-shadow programs. Both runs present no frames in their last 6 s, for a reason this change doesn't touch.Not tested
9498862).AI use
OpenAI Codex (GPT-6) wrote the change and the test. Claude Code (Claude Opus 5.5) helpers ran the driver timings and GPU checks, and Claude Code wrote this description and opened the PR.
🤖 Generated with Claude Code