Tests: add end-to-end GPU tests for direct compute dispatch splitting #2487
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!2487
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2487"
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?
@microwave805 on GitHub · 2026-11-25 20:09 UTC · original
microwave805:tests-gpu-dispatch-split-e2e→main· +495 −0 · 1 files · 1 commits · openPart of #1269
Direct DXIL compute dispatch splitting (
gpu/dxil/module/split.rsandhle/d3d12x/real/dispatch_chain.rs) was covered by unit tests on hand-built IR modules, but had no end-to-end GPU tests running real RDNA2 compute programs throughkernel::translate_computeor exercising the D3D12.XCreateComputePipelineState->dispatch_chain::build-> consoleDispatch->ID3D12CommandAllocator::Resetlifecycle.What is in it
crates/xcl/tests/gpu_dispatch_split_e2e.rswith two end-to-end GPU tests (dedicated test binary soXCL_DIRECT_DXIL=1,XCL_DIRECT_SPLIT_INSTRUCTIONS=80,XCL_SPLIT_SCRATCH_MB=1,XCL_UMA_MB=64stay isolated):direct_compute_dispatch_split_matches_unsplit_across_wave32_and_wave64: translates real RDNA2 wave32 ([32, 1, 1]) and split wave64 ([64, 1, 1]withv_readlane_b32inter-half exchanges) programs containing a scalar loop SCC, a uniform forward skip over intermediate split pieces, lane-divergent selection, and a persistent value kept live across all pieces; validates every piece (>= 3pieces) and checks exact equality against both unsplit DXIL and a CPU oracle across[2, 3, 2]grids and slab limitsmost = 1, 2, 3, 7, 12.console_split_compute_pso_dispatches_through_d3d12x_hook_and_reuses_scratch: wraps both wave32 (flags = 0x20) and wave64 (flags = 0) programs in retail console containers (DXBC -> DXIL/XDAT -> XBCH -> FSSM), compiles throughreal::create_device->CreateComputePipelineState, verifies the dedicateddispatch_chainroot signature, executes two back-to-back chained dispatches on the same command list (reusingSHAREDscratch with an inter-dispatch UAV barrier), resets the command allocator, runs a third pass, and verifies every output dword in UMA.Tested
32.0.16.1742, wave32 + SM 6.6 + mesh shaders, no native wave64), DXC1.9.2602.17(Windows SDK10.0.26100.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), debug profile, tested on commit627e3ce06ff7.cargo test -p xcl --test gpu_dispatch_split_e2e -- --nocapture: 2 passed, 0 failed, 0 ignored..\scripts\test.ps1(withXCL_DXIL_CACHE=%TEMP%\xcl-test-dxil-cache): 1419 passed, 0 failed, 46 ignored (26SKIPPEDlines on this adapter: 21no wave64, 3 per-lane wave32 unsupported-op skips, 1no heap windows, 1cannot disable the driver cache (Windows Developer Mode is required)).Regression run
Not needed: test-only change under
crates/xcl/tests/(no runtime files modified).Not tested
XCL_SAMPLE_*game-data tests (no unpacked Xbox Series game files available).AI use
Gemini 4 Neon).crates/xcl/tests/gpu_dispatch_split_e2e.rs, ran the targeted and full workspace test suites on commit627e3ce06ff7, and drafted this PR description.@luckyteagirl on GitHub · 2026-11-25 20:27 UTC · original
Focused AMD run of exact PR head
627e3ce06ff7e655368b53acd80705c0b1fb3b63from a clean detached worktree.Tested
30.0.13002.13003; Windows 11 build 26200; Rust1.99.0(stable-x86_64-pc-windows-msvc); DXC/DXIL1.8.2502.11.XCL_ADAPTER=6800M cargo test --locked -p xcl --test gpu_dispatch_split_e2e -- --test-threads=1 --show-outputand each of the two tests rerun individually with--exact --test-threads=1 --nocapture.0xc0000005(STATUS_ACCESS_VIOLATION) after XCL initialized the real RX 6800M D3D12 backend. The file-level run also terminated this way. The process exited before libtest produced a final passed/failed/ignored summary; noSKIPPEDlines appeared.fetch_updateuses and one unreadheapsfield.Not tested
AI use
@emirduran707 on GitHub · 2026-11-25 20:36 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
627e3ce06ff7e655368b53acd80705c0b1fb3b63(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1417 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record).tests/gpu_dispatch_split_e2e.rsran and passed on AMD RDNA4 with zero skips.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) are pre-existing on unmodifiedmainon this GPU.Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@SlopTart on GitHub · 2026-11-25 20:37 UTC · original
gpu_suite (cold cache): 164 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, and the promoted-UAV-clear driver gap, PR #2490); none caused by this PR. Notegpu_depth_buffer_created_for_unordered_access_is_placedis green on main now, #2466 did its job on this lane.@DarkPanda69 on GitHub · 2026-11-25 20:41 UTC · original
Ran on an AMD RX 9070 XT (RDNA4, native wave64) and an RTX 3060. Both new tests pass on both cards.
Diff applied on
main6d12f58, debug, Windows 11 Pro 26200, card chosen withXCL_ADAPTER:cargo test -p xcl --test gpu_dispatch_split_e2e -- --nocapture: 2 passed, 0 failed, no skips, on both the RX 9070 XT (driver 32.0.32029.2010) and the RTX 3060 (driver 32.0.16.1088).cargo test -p xcl --lib -- gpu::: RTX 3060 700 passed, 0 failed; RX 9070 XT 698 passed, 2 failed. The 2 failures are the AMD fuzz seeds tracked in #2115, the same onmain.One note on the "native wave64" gap:
direct_compute_dispatch_split_matches_unsplit_across_wave32_and_wave64translates the wave64 case withsplit: wave64, so even on the RX 9070 XT it runs the split form. This run doesn't cover the native (split = false) wave64 path either.Not tested:
XCL_SAMPLE_*game-data tests (no game files).AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-25 20:53 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@pablogonz12 on GitHub · 2026-11-25 21:35 UTC · original
Test report from Linux + Wine on AMD RADV, and a caveat with it: on this lane both new tests abort the test binary before any
test resultline, andmainaborts the same way on the same box, so this is the lane, not your diff. Prepared with AI assistance (DeepSeek V4.1 Flash in OpenCode ran the commands and wrote this); no code was written or changed.Setup
RADV GFX1201), AMD Radeon RX 9070 XT 16 GB (RDNA4, native wave64), Ryzen 9 9900X.WINEDLLOVERRIDES="d3d12,d3d12core,dxgi,d3d11,d3d10core=n,b",VKD3D_CONFIG=ignore_shared_fence,WINEDEBUG=-all, DXC 1.9.2609.5.627e3ceon basemain6d12f58(clean checkout, no changes to tracked files).RUSTFLAGS="-C target-feature=+crt-static" cargo xwin test -p xcl --release --locked --target x86_64-pc-windows-msvc --test gpu_dispatch_split_e2e --no-run, then under Wine.Result at this head
--test-threads=1test resultline--exact direct_compute_dispatch_split_matches_unsplit_across_wave32_and_wave64test resultline--exact console_split_compute_pso_dispatches_through_d3d12x_hook_and_reuses_scratchtest resultlineEach run gets as far as compiling its compute shader (
xcl: [SHADER] cs ... format dxil), creating the device on RADV and the UMA windows; the process then exits with status 5 and prints no panic message. It runs twice with the same result (the whole binary plus each test alone).Same box,
main6d12f58, no PR appliedxcllib test binary, filtergpu::dxil::module::split::tests::dispatch_chain --test-threads=1: exit 5, notest resultline — the same abort signature, on the existing split tests (issue #1246).gpu_compute_e2e: 5 passed, 1 failed, 1 skipped (no heap windows). The failure isoffline_split_compute_pipeline_is_reused_by_a_second_process, which panics atcrates/xcl/tests/gpu_compute_e2e.rs:195withprecompiling 1 shaders into C:\users\steamuser\AppData\Local\Temp\xcl-offline-split-pso-....So on this lane the split/dispatch-chain compute path already fails on
main, before this PR. For contrast, the lane does run other GPU code: on#2488's head the 64-bit typedIMAGE_ATOMIC_*e2e tests pass 3/3 with noSKIPPEDon the same prefix and driver.Not tested
AI use
main, ran the commands above and wrote this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.