D3D12.X: XCL_GPU_CULPRIT_ARGS keeps the root arguments of named dispatches #2205
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!2205
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2205"
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?
@Prime1997 on GitHub · 2026-11-25 09:35 UTC · original
Prime1997:contrib/culprit-dispatch-args→main· +424 −1 · 6 files · 2 commits · openRequested by Prime. · project thread
When
XCL_GPU_CULPRITnames a dispatch that started and did not finish, the next question is what the title passed it. Two retail compute programs,a542b07e605c8fd7and777348c43857fdd2, loop over a count the title supplies in a constant buffer and exit only on equality (analysis in #1452). A stale or garbage count would keep the GPU inside one dispatch until the device is removed. WithXCL_GPU_CULPRIT_ARGS=<cs hash>[,...], the not-done dispatches of those shaders are logged with their root arguments: root constants, and the first 16 words of each root buffer, both as recorded and as read again when the report is made. Nothing changes without the variable. Part of #1452.Stacked on #1323; only the top commit (
291bf6a) belongs here. #1323 conflicts with currentmainin two places (bind.rsExecuteIndirect,list_x.rswatchdog log), so this branch carries #1323's commit rebased onto568e7dbwith those two resolved, its authorship kept.What is in it
crates/xcl/src/hle/d3d12x/culprit.rs:XCL_GPU_CULPRIT_ARGSparsing, the root-argument description, the kept arguments per dispatch number (capped at 4096), and their lines in the culprit report.crates/xcl/src/hle/d3d12x/bind.rs: a translatedDispatchwith a culprit marker keeps its root arguments when its shader is named.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4at7e197a7, the same tree as the head291bf6a(the head only changes the commit's author identity): 1159 passed, 0 failed, 46 ignored; 25SKIPPEDlines (no wave64 on this adapter; per-lane form refused for some f16/f32 cases; driver cache cannot be disabled).culprit_args_hashes_parse_as_printed,root_arguments_are_described_with_their_buffers;cargo test -p xcl --lib culprit: 5 passed, 0 failed.Regression run
Both runs are no-input and stop at the start screen, so they do not reach the dispatch this reports on, and they ran without
XCL_GPU_CULPRIT.Not tested
XCL_GPU_CULPRIT=1 XCL_GPU_CULPRIT_ARGS=a542b07e605c8fd7,777348c43857fdd2is pending, so no count has been read yet. This stays a draft until that run is in.I use a temporary Discord to coordinate my work. Anyone helping test XCL or compare results is welcome. Test coordination on Discord
AI use
🤖 Generated with Claude Code
@DavidM1911 on GitHub · 2026-11-25 15:54 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!
@Aniseto on GitHub · 2026-11-25 16:14 UTC · original
Ran the culprit argument tests at
7e197a7:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
All five pass here, including the two new ones (
culprit_args_hashes_parse_as_printedandroot_arguments_are_described_with_their_buffers) and the GPU marker test, which runs on the real adapter.What this adds: the author ran this on an Ampere RTX 3060 Ti and an AMD card; the description lists other NVIDIA cards and AMD as not tested. This is a Blackwell wave32 part on driver 32.0.16.2124 with DXC 1.9.2609.5. It is a unit/GPU-marker run only: no title dispatch with
XCL_GPU_CULPRIT_ARGSwas exercised here.Not tested: a real hung dispatch with
XCL_GPU_CULPRIT_ARGS=a542b07e605c8fd7,777348c43857fdd2, ExecuteIndirect and console-recorded dispatches, AMD and Intel GPUs, Wine, release profile, native wave64.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
@DarkPanda69 on GitHub · 2026-11-25 13:41 UTC · original · edited 2026-11-25 19:29 UTC
Correction:
gpu_markers_of_a_finished_list_matchcreates its device withD3D12CreateDevice(None, ..), so it runs on DXGI adapter 0, which on this machine is the RX 9070 XT, whateverXCL_ADAPTERsays. All runs of that test below (both heads) were on the RX 9070 XT: the AMD result stands, but the RTX 3060 lines for this test are not RTX 3060 results. The per-cardgpu::counts are unaffected.Update for head
291bf6a(tested as is; it no longer applies on currentmain): same result.gpu_markers_of_a_finished_list_matchpasses on the RX 9070 XT and the RTX 3060. Wholegpu::filter: RX 9070 XT 584 passed, 2 failed (the #2115 fuzz seeds, same onmain); RTX 3060 586 passed, 0 failed.AMD run, plus an RTX 3060: the new GPU test passes on both, and nothing else in the GPU suite changes.
Head
7e197a7applied onmain379725a, debug, Windows 11 Pro 26200,cargo test -p xcl --lib -- gpu:: --test-threads=4:gpu_markers_of_a_finished_list_matchok. 629 passed, 2 failed, 22 ignored; the 2 failures are the AMD fuzz seeds tracked in #2115, the same onmain.Not tested: a real hang with the report on (the run this PR is waiting for),
ExecuteIndirect.AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 08:15 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.