Repository navigation
Tests: add end-to-end GPU tests for direct compute dispatch splitting - #2487
microwave805 wants to merge 1 commit into
Conversation
Direct DXIL compute dispatch splitting (xcl-dev#1269) had unit tests covering hand-constructed IR modules, but no integration tests exercising real RDNA2 compute programs through `kernel::translate_compute` or through the D3D12.X `CreateComputePipelineState` -> `dispatch_chain::build` -> console `Dispatch` -> `ID3D12CommandAllocator::Reset` runtime path. Adds `crates/xcl/tests/gpu_dispatch_split_e2e.rs` (Part of xcl-dev#1269) with: - Real RDNA2 wave32 (`[32, 1, 1]`) and split wave64 (`[64, 1, 1]`, with `v_readlane_b32` inter-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 and checks exact equality against unsplit DXIL and a CPU oracle across `[2, 3, 2]` grids and slab limits `most = 1, 2, 3, 7, 12`. - End-to-end D3D12.X console container tests (`DXBC -> DXIL/XDAT -> XBCH -> FSSM`) verifying dedicated `dispatch_chain` root signature creation, back-to-back chained dispatches reusing `SHARED` scratch on the same command list, and post-`CommandAllocator::Reset` execution in UMA. Assisted-by: Antigravity (Gemini 4 Neon)
|
Focused AMD run of exact PR head Tested
Not tested
AI use
|
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
|
|
Ran on an AMD RX 9070 XT (RDNA4, native wave64) and an RTX 3060. Both new tests pass on both cards. Diff applied on
One note on the "native wave64" gap: Not tested: |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
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 Setup
Result at this head
Each run gets as far as compiling its compute shader ( Same box,
So on this lane the split/dispatch-chain compute path already fails on Not tested
AI use
|
Part 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.