Direct DXIL: split wave64 uses a group barrier for 1-wave groups – GPU hangs in parallel test runs on NVIDIA (RTX 5070) #1727
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#1727
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@IgorAntunes66 on GitHub · 2026-11-24 19:56 UTC · original
With
XCL_DIRECT_DXIL=1, the lib tests hang the GPU (DXGI_ERROR_DEVICE_HUNG 0x887a0006, nvlddmkm event 153) ina large share of parallel runs on an RTX 5070; the HLSL path does not.
Environment: RTX 5070 12 GB (wave32 only → split wave64), driver 621.24, Windows 11 26H2 (26300),
rustc 1.100.0, DXC 1.9.2602.17, main
c160d86, debug.Measurements (
cargo test -p xcl --lib [-- filter] --test-threads=N; hang = 0x887a0006 in the log plusnvlddmkm 153 in the System event log):
XCL_DIRECT_DXIL=1XCL_DIRECT_DXIL=1gpu::recomp::tests::gpu_XCL_WAVE64_SPIN=0(group barrier)gpu::recomp::tests::gpu_XCL_DIRECT_DXIL=1gpu::recomp::tests::gpu_XCL_DIRECT_DXIL=1+ #1456gpu::recomp::tests::gpu_The test that reports the hang varies (gpu_wave64_vs_spill_slots_and_identity, gpu_wave64_ps_spill_slots,
gpu_split_wave64_waves_diverge, gpu_wave32_and_wave64_src_vccz_execz, gpu_valu_float_and_int, …), nearly all
wave64 programs. Each passes alone (10/10).
gpu_sparse_vram_descriptors_buffers_and_xmemfails with"submit 1 lane 0 mismatch" in every hung run, also with #1456 applied (which makes it pass alone): it only waits
5 s for its fence, so it looks like a victim of the hang rather than its cause.
Likely cause (hypothesis, not proven): for split wave64 with one console wave per group (33–64 threads, and
kernel mode), the direct translator meets the two halves with a group barrier (
Partner::Present→Lw::meet→GROUP_SYNC, kernel.rs:234-238 / lanes.rs:216). The HLSL path deliberately uses the boundedarrival-counter exchange there by default (emit.rs:4172,
XCL_X_SPIN 1) "so divergent wave32 halves can neverpermanently deadlock a GPU SM at an unbounded GroupMemoryBarrierWithGroupSync()". Forcing barriers on the HLSL
path (
XCL_WAVE64_SPIN=0) also raises the hang rate (4/12 vs 1/8), which fits, though the samples are small.Using the spin exchange in the direct translator for 1-wave groups would need the counters/slots set up outside
the multi-wave compute case (lanes.rs:39-47, 94-102); I have not tried that.
Not tested: AMD / native wave64; D3D12 debug layer / DRED (not installed here); a patched direct translator;
release builds. One hang also occurred on the default spin path (1/8), so there may be a second, rarer source.
AI use: Claude Code (claude-opus-5-5) ran the measurements, read the code and drafted this issue; I reviewed it.
github-bot referenced this issue2026-11-26 05:08:04 +00:00
@akimfomin on GitHub · 2026-11-24 20:06 UTC · original
PortBridge linked this report to the shader compiler effort in #1269. I traced two paths at the reported
c160d86that may help isolate the next check.draw_console, which compiles their shaders through HLSL/DXC even underXCL_DIRECT_DXIL=1. Their failing test names alone do not identify the emitter of the submission that hung.gpu_split_wave64_waves_divergesubmits both 64-thread and 256-thread shapes. Those select different branches of the direct split Compute classifier:Presentat 64 andSpinat 256.Logging the emitter and the group dimensions per submission would distinguish those cases in the existing reproducer. This is a source check; no GPU hang was reproduced here. PortBridge. AI use: OpenAI Codex (GPT-6) traced these paths and prepared the note.
@IgorAntunes66 on GitHub · 2026-11-24 20:21 UTC · original
Correction: the barrier hypothesis above is wrong. I bisected it and the trigger is the sparse VRAM test, which #614 already fixes.
RTX 5070, driver 621.24, main
85e3826,XCL_DIRECT_DXIL=1,--test-threads=4:gpu::recomp::tests::gpu_--skip spill_slots --skip ps_whole_wave_reductions--skip sparse_vramc160d86+ #1456gpu::recomp::tests::gpu_So the hang comes from
gpu_sparse_vram_descriptors_buffers_and_xmemrunning beside the other GPU tests, and #614 removes it.#1456 alone does not: the difference is #614's second commit (the sparse and UMA import tests take
d3d12x::backend()instead of calling
real::init(), which per #614 could open the UMA windows twice and replace the sparse state in use).@akimfomin was right that the VS/PS tests in my list were victims, not the source. Why
XCL_DIRECT_DXIL=1makes therace so much more frequent (0/25 vs 11/25 on the whole lib) I have not checked.
Nothing here points at the direct translator's barrier exchange, so this can be closed in favour of #614 unless a
maintainer wants it open for the frequency question.
AI use: Claude Code (claude-opus-5-5) ran the bisection and measurements and drafted this comment; I reviewed it.
@kais7654 on GitHub · 2026-11-24 20:40 UTC · original
Second-machine matrix on an RTX 5070 Laptop (12 GB, 32-lane waves → split wave64) — confirms the barrier-config instability and catches it in its shorter form: instead of hanging to the watchdog, one run loses the device and fails 9 tests at once, with nvlddmkm 153 events at the same wall-clock time.
Environment: NVIDIA GeForce RTX 5070 Laptop GPU 12 GB (split wave64), driver 616.87 (32.0.16.1687), Windows 11 26H2 (26300), rustc 1.100.0, Windows SDK 10.0.26100.0, debug,
mainc160d86(the same commit).Method: each run = a fresh
cargo test -p xcl --lib [-- filter] -- --test-threads=N; a run killed after its timeout would count as a hang (none did — every run returned). System log checked for nvlddmkm 153 after the matrix.XCL_DIRECT_DXIL=1whole lib, 4 threadsreadback_routing_tests::coherent_buffer_sanitizes_console_flags_and_state(real.rs:5825,assert_ne!(VirtualFree(mem, 0, MEM_RELEASE), 0)→ VirtualFree returned 0)XCL_DIRECT_DXIL=1whole lib, 1 threadXCL_WAVE64_SPIN=0(group barrier),gpu_filter, 4 threadssubmit 1 lane 0 mismatch: gpu_sparse_vram_descriptors_buffers_and_xmem, gpu_typed_buffer_loads_and_stores, gpu_valu_16_and_64_bit, gpu_wave32_and_wave64_src_vccz_execz, gpu_valu_float_and_int, gpu_wave64_ps_spill_slots, gpu_wave64_vs_spill_slots_and_identity, gpu_wave64_ps_whole_wave_reductions, title_textures gpu_mirror_upload…XCL_DIRECT_DXIL=1,gpu_filter, 4 threadsDriver events: two nvlddmkm 153 events ("Error occurred on GPUID: 100",
\Device\Video8) at 21:35:23 and 21:35:26 — exactly inside the failing barrier run's window. No display reset, no other provider events in the 9.5-minute window.What this adds to the issue's hypothesis
gpu_sparse_vram_…'s "submit 1 lane 0 mismatch") — same phenomenon, failing fast instead of hanging the process.XCL_WAVE64_SPIN=0rows; the serial runs and the spin-config runs were clean.coherent_bufferflake is probably not direct-DXIL-specific: kleborgn saw it once on plainmainon AMD (their #1526 report), and its failing call is the test's ownVirtualFree, which fails when the driver still holds deferred references to the released heap/resource. It looked direct-correlated here (3/12 vs 0/8) but that is a small sample.Not tested: AMD, release builds, DRED/debug layer,
XCL_DIRECT_DXIL=1+ #1456, native wave64.AI use: Mistral Vibe (Mistral Medium 3.5) ran the matrix and drafted this report; the runs are on this machine,
kais7654.@upipibi on GitHub · 2026-11-24 21:13 UTC · original
Independent confirmation on Ampere: RTX 3070 8 GB, driver 616.56, Windows 11. Whole
xcllib,XCL_DIRECT_DXIL=1,--test-threads=4,--skip queue_slot_18(the #1523 fake-fence crash would mask everything else).mainand #1741 runs interleaved, #614 runs after them; each tree built in its own target dir:85e3826(main at #1741's base)254f51a)0fb9f4a)In every hung run, on both trees that hung,
gpu_sparse_vram_descriptors_buffers_and_xmemfails first (submit 1 lane 0 mismatch, the 5 s fence wait). The wave64 VS/PS tests that fail with it are in flight when the device goes, consistent with IgorAntunes66's bisection. #1741 lowered the count here but did not remove it, as on the RTX 5070.On kais7654's driver question: this is the older 616.56, and direct 4-thread
mainstill hung 3 of 4, so the driver version does not explain their 0/12.AI-assisted (Claude Code). Synthetic tests only.
@PHeitor1 on GitHub · 2026-11-24 21:21 UTC · original
RTX 5060 Ti on the same driver (621.24),
main4178e88: it hangs here too, 13 of 15 whole-lib runs withXCL_DIRECT_DXIL=1, and 8 of 15 runs of thegpu_filter on the HLSL path (with it unset). With #614: 0 of 55 runs failed or hung. Table and method: #614This agrees with @IgorAntunes66's bisection to #614. I only have 621.24, so I can't check @kais7654's driver guess. The HLSL result is against a cause in the direct translator itself.
Run and written with Claude Code (Claude Opus 5.5).
@cindertheblue on GitHub · 2026-11-24 23:09 UTC · original
AMD control (native wave64): RX 7600 XT, no hang in 10 whole-lib runs with
XCL_DIRECT_DXIL=1,--test-threads=4–mainat689f2dbSetup: AMD Radeon RX 7600 XT 16 GB (RDNA3, native wave64), driver 32.0.31041.1004 (AMD Software 26.8.1); Ryzen 5 9600X; Windows 11 Home 26200.9974; rustc 1.99.1; DXC 1.8.2502.11 (SDK 10.0.26100); debug build;
mainat689f2db, no local changes.XCL_DIRECT_DXIL=1cargo test -p xcl --lib --no-fail-fast)XCL_DIRECT_DXIL=1XCL_DIRECT_DXIL=all0x887a0006/DEVICE_HUNGin the log: none in any run. The System event log has no display-driver reset (4101 or otheramdkmdag/dxgkrnlevents) for the whole time the runs took.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, a wrong value at seed 722 (the AMD mismatch from #1679), not a hang.runner::split_wave64()is false and wave64 compute programs take the native form; only the few tests that ask forsplit: truethemselves ran the split form. That fits the split form being the trigger, but it does not show it.Not tested:
XCL_SPLIT_WAVE64=1(the split form forced on this card);XCL_WAVE64_SPIN=0; more than 10 lib runs; a release build; the integrated graphics.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from the real output; checked by me before posting.
@cindertheblue on GitHub · 2026-11-24 23:28 UTC · original
Follow-up on AMD:
gpu_sparse_vram_descriptors_buffers_and_xmempassed in all 36 runs on a tree without #614, and nothing hung, also with the split form forced (XCL_SPLIT_WAVE64=1) – RX 7600 XT,mainat689f2dbCorrection to my comment above: I wrote that the result "fits the split form being the trigger". I had not read @IgorAntunes66's bisection: the trigger is
gpu_sparse_vram_descriptors_buffers_and_xmemrunning beside the other GPU tests, and #614 removes it. Please read my numbers against that.Same machine and build as my comment above (RX 7600 XT, RDNA3, driver 32.0.31041.1004, debug,
mainat689f2db, no local changes). #614 is not merged, so this tree still has the sparse VRAM test as it is on the NVIDIA runs.XCL_DIRECT_DXIL=1cargo test -p xcl --lib --no-fail-fast)XCL_SPLIT_WAVE64=1 XCL_DIRECT_DXIL=1XCL_SPLIT_WAVE64=1(HLSL)=1and=allbench_split_wave64(-- --ignored --nocapture) printswave64 (native)without it, andwave64 (split, barrier)(64-thread groups) /wave64 (split, counter-paired)(256) with it.0x887a0006/DEVICE_HUNG/ device removal in the log: none in any run. No display-driver event in the System log for the whole time (noamdkmdag/dxgkrnl/ 4101), and no newLiveKernelReports.fuzz_validate_and_gpu_1, seed 722 (res[30] = 0x1, CPU 0x7fffffff, the AMD mismatch from #1679), not a hang.Not tested: #614 itself on this card;
XCL_WAVE64_SPIN=0; other thread counts; a release build.AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment from the real output; checked by me before posting.