Repository navigation
Conversation
|
Ran the new watchdog tests and the whole 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.
Not tested: the retail-title path where the watchdog fires (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified. |
|
I tested The title recorded 2,207 sampled presents and 79,676 storage executions (65 failed). At the end there were 15 consecutive two-second activity samples with zero presents before the title exited at its watchdog-associated exception site. The session emitted neither an XCL wait release nor a OpenAI Codex with GPT-6.2-Sol high assisted with the test and report. I symbolized our XCL and vkd3d-proton builds from that exit. The XCL wait watchdog was asleep with zero armed GPU waits. Three title recording threads were in |
|
Retail run of Tested
What the run shows
So on this machine the chain never ends in Not tested
AI use
|
|
Windows / NVIDIA retail test of Tested
End queues: q1 7×, q2 4×, q4 3×, q0 2×. Not tested: more runs (one); AMD / Intel. The full suite of another PR ran alongside part of this run. Run and written with Claude Code (Claude Opus 5.5). |
Conflicts: - list_x wake_sync_watchdog: xcl-dev#1045's split of the producer queue (graph_signal_q, recorded_last_q) kept in the expired tuple; xcl-dev#1123's waiters / earlier_releases added before the loop. - list_x tests: both sides' new tests kept. - sparse.rs: integ split State into Gpu (WORK) + State and already has hub_state(), which reports the sparse queue's fence and readback fence. xcl-dev#1123's fence_status() is not taken; the chain line uses hub_state() instead. What fence_status added is put into hub_state's busy case: STATUS_FENCES (set where init stores the Gpu) and WAIT_FOR_TARGET give the completed values and the value wait_for sleeps on while a submission holds WORK.
When a bridged Wait64 expires, the watchdog's lines give each cell's recorded / submitted / completed values. They read the same for a cycle of queues and for a chain of waits behind one queue that is busy, or held by a wait outside the sync graph, because the 5 s start when the CPU issues the Wait and not when the queue reaches it (xcl-dev#505). Once per burst (at most one line per timeout, 64 lines in all) the watchdog now follows the tracked waits from the queue of an expired wait. A queue is held at its earliest tracked call in flight; when that is a wait, the chain goes on at the queue of the Signal that satisfies it. The line names the waits passed and where they end: - end=cycle: a queue already on the chain, - end=signal: a queue with no tracked wait in front of it, so it is executing or behind one of XCL's own tile-mapping waits, which are not in the graph (review of xcl-dev#795, point 2), - end=unsubmitted: a wait that no submitted Signal satisfies, - end=signal-gone: a wait on a cell that counts the value as submitted while the graph tracks no Signal for it and the fence is below it (the graph lost track; printed with the cell's submitted and CPU-signalled values). With it: how many of the cells released in that tick end at the same place, the watchdog's releases before this tick, the count of Write64 cycle breaks so far (their own line stops after 32), and the tile-mapping queue's fence and readback fence as completed / asked for. Limit: a CPU release (the watchdog's, a cycle break's) drops the cell's tracked Signals up to its value although they may still be queued. After the first one a queue can look held at a wait that really sits behind such a Signal, and a chain can end in a cycle that is none. The line is exact only while earlier_releases and write64_cycle_breaks are 0; mixed title-fence breaks are not counted. No change to what is released or signalled. The calls in flight are read under the graph lock before the releases, without pruning, and the line is written after them. The watchdog now reads the clock once per tick for the chain check and the expiry test, so both see the same waits as expired. While no wait expires the cost is one pass over the armed waits on the watchdog's 50 ms tick, skipped for one timeout after a line. sparse.rs keeps a second reference to its two fences and the value wait_for sleeps on, so that they can be read while a submit holds the state. Part of xcl-dev#505. Assisted-by: Claude Code (Claude Fable 5.2)
6a3c81a to
517e4df
Compare
|
Test report from a retail title's world load, where this diagnostic answers the question it was written for. Setup: this PR's head What it logged at the stop (presents fall to 0 at ~80 s):
What that shows on this machine: the chain behind the title's q0 / q1 waits ends at q2, and q2 is not waiting on anything XCL's sync graph knows about. Without a TDR, q2 is more likely behind a wait XCL does not track than executing. It is not a title Same shape without this PR: the same
So on this card the stop is this chain, not the pipeline builds that are still running around it. The first run of this PR instead had a device removal at 62.3 s ( Not tested: the whole suite; AMD. Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
@not-rex a follow-up I'd like to write, stacked on this PR, unless you have it planned. On this machine the chain ends at
That would tell "executing a long list" apart from "held by a wait inside a list that XCL does not track" (a wait recorded by console code in a list, for instance), without changing what is released. Diagnostics only, behind the same once-per-burst rule as yours, under ~200 lines with a unit test on a fake queue history. If you'd rather fold it into this PR, or it overlaps something you have, say so and I'll test that instead. Written with Claude Code (Claude Opus 5.5). |
|
@Anon64 thanks for the report, and yes please: I don't have that follow-up planned, so go ahead stacked on this one. What the end queue has in flight after its last completed fence is exactly the gap AI use: Claude Code (Claude Opus 5.5) wrote this. |
|
The follow-up I proposed above, run in the title. It is a local commit on top of this PR's head, Same machine and settings as my report above (RTX 3060, So q2 got three big submissions (72 lists) at the moment the waits were issued, 5 s before the line, and nothing since. The work that should write If you're happy with it, I'll open it as a stacked PR ( Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Diagnostics only, the plan from #505 (comment). When the GPU-wait watchdog releases a wait, it now also logs, once per burst, where the chain of waits behind it ends. Part of #505.
Today's lines give each cell's recorded / submitted / completed values. Those read the same for a cycle of queues and for a chain of waits behind one queue that is busy or held by a wait outside the sync graph, because the 5 s start when the CPU issues the
Wait, not when the queue reaches it. Nothing is released, pruned or signalled differently.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: before the watchdog releases expired waits, it takes the trackedWait/Signalcalls still in flight (calls_in_flight, read-only) and follows them from an expired wait's queue (wait_chain): a queue is held at its earliest tracked call in flight, and when that is a wait the chain goes on at the queue of theSignalthat satisfies it. Onexlog_warn!line per burst (at most one per 5 s timeout, 64 in all), written after the releases:end=cycle: back at a queue already on the chain, so every queue on it is held at a wait.end=signal: no tracked wait is in front of the queue. It is executing, or behind one of XCL's own tile-mapping waits, which are not in the graph (@upipibi's point 2 on D3D12.X: bridge Wait64BitValueX to GPU fences with exact cycle breaking #795).end=unsubmitted: no submittedSignalsatisfies the last wait.end=signal-gone: the cell counts the value as submitted, but the graph tracks noSignalfor it and the fence is below it. The graph lost track (a CPU release dropped theSignal, or it was not queued because the fence was already there, and the fence went back since). Printed with the cell'ssubmittedandcpu_signaledvalues.same_end=n/m: of the m cells released in this tick, how many have a chain that ends the same way at the same queue.earlier_releases: cells the watchdog released before this tick.write64_cycle_breaks: Write64 Signals signalled on the CPU so far (the "would close a GPU cycle" line stops after 32; its counter moved to module scope for this). Mixed title-fence breaks are not counted.crates/xcl/src/hle/d3d12x/sparse.rs:fence_status()for the end of that line: the tile-mapping queue's fence and the readback fence, as completed / last value asked for (decimal, likewait_for's own line). The state keeps a second reference to both fences outsideSTATE, because a submit can sleep for 5 s inwait_forwithSTATElocked, which is the case the line is for. The values asked for are read withtry_lock; when the state is busy they print as?, with the value the submit sleeps on (wait_for=N, two atomic stores around the sleep). The watchdog never blocks on it.list_x.rs:wait_chain_names_where_expired_waits_end(graphs built by hand, no GPU: cycle, signal, unsubmitted, signal-gone, the line's text andsame_end, one line per burst) andwait_chain_leaves_out_completed_calls(real fences, WARP is enough: calls the GPU has completed are not on a chain; skips with "no GPU").Cost: while no wait expires, one pass over the armed waits on the watchdog's existing 50 ms tick (it only runs while a wait is armed), skipped for 5 s after a line. Nothing on the title's threads.
Rebased on
main8f5fca5b(head517e4df): main made the watchdog timeout configurable (gpu_wait_watchdog_timeout(),XCL_GPU_WAIT_TIMEOUT_MS); the expiry test andwait_chain_duenow both use that function, so the chain line sees the same expired waits under an override. RTX 5070 Ti (Windows Sandbox, GPU-PV):wait_chain2 of 2; full suite 1096 passed, 8 failed, the same 8 that fail onmainthere. The RTX 3080 counts below are from the head before the rebase.Tested
cargo test --workspace -- --test-threads=4at the head517e4df(onmain8f5fca5b): 1104 passed, 0 failed, 46 ignored; the SKIPPED lines are main's new lower/lower_dxil GPU agreement tests, the two no-wave64 tests andpso_measurement_compiles_an_exact_synthetic_record.stable-x86_64-pc-windows-msvc; tests in the default (debug) profile, smoke runs in release.cargo test --workspace -- --test-threads=4: 739 passed, 0 failed, 41 ignored (SKIPPED GPU tests:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_maskandgpu::recomp::tests::gpu_wave32_program_in_wave64_hardware, both "no wave64").main384f7f7 on the same machine: 737 passed, 0 failed, 41 ignored, the same two SKIPPED.GPU wait chainline was produced.Regression run
RTX 3080,
scripts/smoke.ps1, 300 s each, menus only (fresh data),main8f5fca5b(this PR's base) and then this PR's head517e4df:Not tested
sparseread) are covered only by a title run.fence_status()has no unit test (it needs a sparse state and a device).vram.rs'spages.fencewait is not in the line.AI use