D3D12.X: bound compute pipeline waits so slow compiles do not trip wa… #533
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!533
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/533/head"
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?
@XaviFortes on GitHub · 2026-11-24 01:28 UTC · original
XaviFortes:pso-async-bounded-compute-wait→main· +408 −31 · 3 files · 1 commits · closed without mergingcrates/xcl/src/hle/d3d12x/bind.rs: usepso_async::resolve_for_indirectindispatchandexecute_indirect; skip pending compute stand-ins inexecute_indirect(DISPATCHES_SKIPPED) instead of forwarding to PCExecuteIndirect; extendasync_compute_pso_success_and_failure_in_dispatch_and_execute_indirectto verify pending compute stand-ins are skipped.crates/xcl/src/hle/d3d12x/present.rs: callpso_async::reset_frame_budget()at eachPresentXboundary.Tested
rustc 1.98.1, debug (tests) and release (smoke).cargo build --workspace && cargo test --workspace -- --test-threads=4: 680 passed, 0 failed, 41 ignored, 0SKIPPEDGPU tests.bounded_compute_wait_times_out_then_resolves_once_worker_finishes,bounded_compute_wait_returns_real_when_build_finishes_in_time,bounded_compute_wait_shares_per_frame_budget_across_pipelines(3 passed in 0.08 s), andasync_compute_pso_success_and_failure_in_dispatch_and_execute_indirect(1 passed in 0.04 s).359851f9ee117e8241dbf0505ccacb17077d56fccompletes with 1,304 frames (60 60 60presents/2 s), 14,817 MB peak commit, 0 crashes, and 0 device removals.Regression run
Not tested
AI use
xcl.log, wrote unit tests, and updated the PR description; all builds, tests, and smoke runs were executed locally on the hardware listed above.@nieahax on GitHub · 2026-11-24 01:31 UTC · original
thanks sm antigravity this is exactly what we were stuck on over here!
@yyc160 on GitHub · 2026-11-24 01:43 UTC · original
Direction makes sense — getting the build off the title's render thread and bounding the wait is the right shape for the watchdog. Three things to look at before this goes in.
1.
execute_indirectsends the stand-in to the PC implementation. Inbind.rs,dispatchhandles an untranslated pipeline by skipping it:execute_indirectdoes not:Before this PR that branch was rare, because
resolve_waiteither returned the real pipeline or blocked. With a bounded wait, the stand-in becomes an everyday return value — so this call now reachesID3D12GraphicsCommandList::ExecuteIndirecton the PC list with a PSO the PC driver has never seen. Does that need to skip likedispatchdoes, or is the command list a PC one whose PSO was already set? Worth confirming, because it is the one place where a timed-out pipeline is still passed onward.2.
sentnever recovers if the send fails.if !p.sent.swap(true, AcqRel) { queue().send(...) }— ifsendreturnsErr(aSyncSenderthat is full or disconnected),sentstaystrueand the job is never queued again, so the pipeline never lands and every later bind takes the stand-in path. A failed send should clearsentand either retry with backoff or wake the waiters with the error.3. A bounded wait does not help when the workers themselves are stuck. #156 is exactly this: all
xcl-pso-*threads sit insidenvgpucomp64.dllon the heap lock. Timeout returns the thread to the title, which is the point, but the compute pipeline is now queued behind jobs that may never finish, so its dispatches are skipped indefinitely rather than for 4 seconds. If compute can end up behind a wall of large graphics programs, it may need a reserved worker or a separate pool — otherwise this turns "the title hangs" into "the title runs with a class of dispatches missing", which is harder to attribute when someone reports a wrong frame.Two smaller ones:
compute_wait_timeoutbounds one bind. A title that binds ten uncached compute pipelines in a row still spends up to 10 × 4000 ms in these waits. A shared per-frame budget would bound the total.timed_outis checked afterreal, so a late-landing pipeline is picked up on the next bind — that ordering looks right to me, just noting it as the reason the permanent flag is acceptable.Not tested: no smoke run. The GPU on this machine was at 100 % from an unrelated process for the whole session, so any frame timing from here would be meaningless. Everything above is from reading the diff and the two call sites; the
execute_indirectquestion in particular should be settled by someone who can run the title on an idle card.@sperm on GitHub · 2026-11-24 01:47 UTC · original
Test report:
f849ecc(this PR) merged ontomain508a0c7, retail GTA VI on AMD RX 9070 XT (RDNA4), but under Linux/Wine, which XCL doesn't support. Treat it as a data point, not a Windows regression run.Tested
from_ifacechecks relaxed as in #257), DXVKdxgi, DXC 1.9.2609.-Zbuild-std,lld-link).VKD3D_CONFIG=ignore_shared_fence XCL_NETWORK=0 XCL_COHERENT_MB=512, isolated network namespace, DualSense as XInput pad 0.main508a0c7still building after 4000 ms – proceeding with stand-in0xc0000005write at+0x23cf683at 229.8 sGame Running, 3m18s, frame 2455, 637 streaming requestsSo on this setup the bounded wait works as described (the four slow compute builds went to the background), but the "GPU Loc Sig" abort (#505 / #534) still came, at about the same point. Whatever starves it here isn't only first-bind compute waits. The frame rate falls to about 7 fps for a minute or more before the abort in both runs.
Not tested:
cargo test(the crate doesn't build natively on Linux), Windows,smoke.ps1, otherXCL_COMPUTE_PSO_WAIT_MSvalues, #267 together with this.AI use: Claude Code, Claude Opus 5.5: merged and built the branch, ran it, and wrote this report from the logs (the runs were played by a person).
@XaviFortes on GitHub · 2026-11-24 02:00 UTC · original
Thanks everyone for the reviews and extra testing (@thehollowedone, @yyc160, @CryingLaughing, @sperm)! I pushed an updated commit (359851f) addressing the feedback:
ExecuteIndirect pending compute stand-ins: now skipped cleanly (DISPATCHES_SKIPPED, matching Dispatch) instead of forwarding a timed-out stand-in to PC ExecuteIndirect, with the unit test in bind.rs extended to cover it.
Shared per-frame wait budget: XCL_COMPUTE_PSO_WAIT_MS is now shared across all uncached compute binds within a frame and reset on PresentX, so binding multiple new compute pipelines in one frame (like the 4 consecutive 4 s waits in the RADV log) queues all of them without multiplying wait time.
Dedicated compute worker pool (xcl-pso-compute-*): compute pipelines no longer sit behind graphics PSO backlogs/stalls (#156).
sent recovery: enqueue() clears sent if channel send ever fails instead of wedging future binds.
Also updated the PR description with the fresh 60 s smoke run and noted that non-compute stalls (e.g., graphics waits in #267) can still independently trigger +0x23cf683.
@grahamster2 on GitHub · 2026-11-24 02:02 UTC · original
Test run of
f849eccmerged ontomain508a0c7+ #451 + #435, on the retail title that trips #232. Result: bounding the wait alone does not get past the watchdog on NVIDIA. The compile backlog is longer than the title's ~28 s hang watchdog.Setup: RTX 3080 10 GB, Ryzen (12 threads), 32 GB, Windows 11 26200, release build,
XCL_NETWORK=0, A presses at 14–31 s, 240 s runs.What happens (3 runs, the last with this PR)
+0x23cf683.+0x2215c35is on its stack, so this is the #232 watchdog. It is the same with and without this PR.Wait64BitValueX ... timed outlines in any run.pso_async::resolve_wait←resolve_for_bind←bind::set_pipeline_state, each building a compute PSO itself: translate, then DXC (compile_cached_in→dxc::compile), then the driver (nvgpucomp64). On a cold cache a 381 KB CS took 11.5 s in the driver and a 309 KB one 8 s.resolve_compute(4 s bounded waits, one new pipeline after another). One thread is inexecute_indirect→resolve_for_indirect→resolve_wait, so it is unbounded. TheXboxBvhBuilderthread waits inset_pipeline_state→resolve_compute. 4xcl-psoworkers wait intranslated_compute_psofor theBIG_COMPILESslot (most: 1), 2 are inside the driver compiler, and 3 DXC threads are busy.Question: is the intended direction to raise
BIG_COMPILES(commit permitting; this machine had ~30 GB of commit headroom left) or to precompile compute pipelines ahead of time (xcl shaders --precompile --only cs --pipelines)? Bounded waits keep the threads moving, but the title still needs those results before it presents.#567 (bounded
wait_for_commit) does not apply to this stall: no worker was inwait_for_commitin these dumps; the slot holder was compiling in the driver.Test report written with Claude Code (Claude Opus 5.5) from my own runs.
@XaviFortes on GitHub · 2026-11-24 02:10 UTC · original
Gonna fix the CI that fails, not a problem really just that the runner is 2-cores and cannot handle that much when bumping cores
@qinrxx on GitHub · 2026-11-24 02:20 UTC · original
@XaviFortes we've been preparing a change in
pso_async.rsthat overlaps this PR and #539, so here is how they layer, before any of them lands.What #533 doesn't have, in one line: a bind that is waiting on a compute pipeline should jump to the front of the compute pool's queue.
Why that matters, and why it comes from the other two:
a5c4937already builds compute pipelines in the background when the game makes them (graphics stay lazy), and its workers skip pipelines the game has already released. So the "build when made" part is #539's, not ours to claim. Our local branch does the same thing and isn't opened.compile_threads() / 2clamped) with builds nobody waits for yet. tiagonleal's run on #232 made 265, 133 of them in the first 20 s (https://github.com/ivall/xcl/issues/232#issuecomment-7119800304). The pipeline a bind actually waits for queues behind them, so under your budget more dispatches go without their pipeline.So after #533 lands, the only piece from our side worth having:
Nothing else from our branch. Our graphics-first queue isn't needed, because your separate pools already keep graphics builds out of the compute queue.
Would you like (1) in #533 directly? If not, we'll send it as a small PR on top of #533 once it lands, with its own tests and regression runs.
For whoever resolves the merges: our branch and #533 conflict in four places in
pso_async.rs, and our branch drops thempscimport that your pools use. But if (1) goes into #533 or on top of it, our branch isn't needed.AI use: Claude Code (Claude Opus 5.5) read the three diffs, did the trial merge and wrote this comment.
@XaviFortes on GitHub · 2026-11-24 02:26 UTC · original
Fixed, if anybody elseThanks everyone for the reviews and extra testing (@thehollowedone, @yyc160, @CryingLaughing, @sperm, @qinrxx)!
I've pushed an updated commit (5e6aca8) addressing the review feedback:
Pending compute stand-ins in ExecuteIndirect (@thehollowedone, @yyc160): bind::execute_indirect now checks pso_async::is_pending_compute and skips cleanly (DISPATCHES_SKIPPED, matching bind::dispatch) instead of forwarding a timed-out stand-in to native PC ExecuteIndirect. Extended async_compute_pso_success_and_failure_in_dispatch_and_execute_indirect to cover this path.
Shared per-frame wait budget (@yyc160, @sperm): XCL_COMPUTE_PSO_WAIT_MS (default 4000 ms, 0 = unbounded) is now a shared per-frame budget reset at each PresentX boundary, so binding multiple uncached compute pipelines in one frame (like the 4 back-to-back 4 s waits in the RADV run) queues all of them without multiplying wait time.
Dedicated compute worker pool (@yyc160): compute pipelines now run on their own xcl-pso-compute-* pool ((compile_threads / 2).clamp(2, 4) threads) so graphics PSO backlogs/stalls (#156) cannot starve compute builds indefinitely, and a single slow compute shader won't head-of-line block faster ones on low-core hosts.
sent recovery (@yyc160): enqueue() clears sent if channel send fails instead of leaving future binds wedged.
Scope note (@sperm, @CryingLaughing): updated the PR description with the fresh 60 s smoke run on 5e6aca8 and noted that non-compute stalls (e.g., unbounded graphics waits covered by #267) can still independently trigger +0x23cf683 ("GPU Loc Sig").
Compute queue priority (@qinrxx): makes total sense, especially once #539's eager compute builds layer on top! Since #533 is already ~357 lines and CI is green, let's keep #533 focused and land your jump-to-front priority ordering as a small follow-up PR on top of #533 once it merges.
All CI checks and the full local workspace suite (680 passed, 0 failed, 41 ignored) are green.
@alpz1000 on GitHub · 2026-11-24 02:02 UTC · original · edited 2026-11-24 02:27 UTC
Independent timing check of
f849ecc738a4791cbdf8eca9c174824562e8586eon Intel Core i5-8400, Windows 11 Home 26200.9974, Rust 1.100.0 x86_64-pc-windows-msvc, debug.Tested:
cargo test --locked -p xcl --lib bounded_compute_wait -- --test-threads=2 --nocapturepassed both tests. Then I reran the same test executable withbounded_compute_wait --test-threads=2in 30 fresh processes. All 30 passed both tests (60 test executions, no failures or skips). The tests cover returning the real pipeline when ready in time and timing out then resolving after the worker finishes.Not tested: actual driver compilation latency, retail loading or watchdog behavior, and the full workspace suite. These tests use synthetic timing.
AI use: OpenAI Codex (GPT-6) ran the local tests and drafted this report.
Follow-up on revised head
359851f9ee117e8241dbf0505ccacb17077d56fcOn the same machine,
cargo test --locked -p xcl --lib -- --test-threads=4 bounded_compute_wait async_compute_pso_success_and_failure_in_dispatch_and_execute_indirectpassed all four tests. I repeated the same filters with four threads in 30 fresh processes: 30/30 passed, 120 test executions, no test skips. This includes exhausting the wait budget across two slow pipelines, resetting it for the next frame in the test, and skipping ExecuteIndirect while its compute pipeline is still pending. This remains synthetic coverage; no driver compile or retail title was exercised. Codex ran and summarized the checks.Follow-up on revised head
5e6aca8305a3d555437046ecc310988fc32ddfbbSame Windows/i5-8400 machine and Rust toolchain.
cargo test --locked -p xcl --lib -- --test-threads=2 --nocapture bounded_compute_wait async_compute_pso_success_and_failure_in_dispatch_and_execute_indirectpassed all four. The log recordedExecuteIndirect with pending compute pipeline ... skippedfrom the exercised branch. Then I reran the same four tests with two test threads in 30 fresh processes: 30/30 passed, 120 test executions, no test skips. No retail title or real driver compile was tested. Codex ran and summarized the checks.@CryingLaughing on GitHub · 2026-11-24 01:46 UTC · original · edited 2026-11-24 02:28 UTC
I ran the dependent GPU readback suggested above on RTX 4080. At
f849ecc738a4791cbdf8eca9c174824562e8586e, the direct and indirect calls recorded while the producer PSO was pending both left its output at the initial value. A dependent GPU shader read that value in both cases. New calls recorded after the PSO resolved wrote and consumed the expected producer value.Tested
XCL_ADAPTER=4080,XCL_REQUIRE_GPU=1, allXCL_SAMPLE_*variables unset.#[cfg(test)]fixture. It calls the PR's bind, dispatch, and indirect hooks on a real D3D12 command list. A channel holds the producer's PSO pending until the queue has completed both pending submissions. The indirect call uses a dispatch-only signature and a real argument buffer. The producer and XOR consumer use synthetic HLSL and coherent UMA, separated by a UAV barrier. Each trial starts with the same initial word.XCL_COMPUTE_PSO_WAIT_MS=10,cargo test -p xcl --lib --locked -j 4 gpu_pending_compute_dispatch_output_is_not_recovered -- --show-outputpassed 1/1. The run logged the timeout and the skipped direct dispatch.0x112233440x11dd33bb0x112233440x11dd33bb0xa5c012340xa53f12cb0xa5c012340xa53f12cbcargo test -p xcl --test gpu_compute_e2e --locked -j 4 console_wave64_compute_through_the_pso_hook_dispatch_and_read_back -- --show-outputpassed 1/1.cargo build --workspace --locked -j 4passed, andcargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputreported 679 passed, 0 failed, 41 ignored, including the two bounded-wait tests and both compute integration tests.SKIPPEDtests:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(native wave64), plustest_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_state(D3D12 debug layer).Not tested
AI use
Follow-up on the pending
ExecuteIndirectguardOn the same Windows 11 25H2 (build 26200.9974) machine with an RTX 4080 and NVIDIA driver 621.01, I ran a test-only readback fixture on
f849ecc738a4791cbdf8eca9c174824562e8586eand5e6aca8305a3d555437046ecc310988fc32ddfbb. The native stand-in shader writes0x5354414eto its own word. This distinguishes running the stand-in from skipping the pending dispatch even when both leave the producer's output unchanged.f849eccmarker5e6aca8marker0x5354414e0x5354414e0x000000000x000000000x5354414e0x00000000The fixture passed 1/1 on each revision with
XCL_COMPUTE_PSO_WAIT_MS=10andcargo test -p xcl --lib --locked -j 4 gpu_pending_compute_indirect_standin_marker -- --show-output --test-threads=1. The dependent consumer read the initial producer word while pending on both revisions, and the resolved direct and indirect dispatches each wrote the expected producer and consumer words.On the clean
5e6aca8head,bounded_compute_wait_shares_per_frame_budget_across_pipelinespassed 1/1, andcargo build --workspace --locked -j 4passed. The workspace test run with--test-threads=4was stopped after four recompiler GPU tests reported over 60 seconds. A freshcargo test --workspace --locked -j 4 -- --test-threads=1 --show-outputcompleted with 680 passed, 0 failed, 41 ignored, including the same four explicit capability skips listed above. The serial run establishes the test result. The cause of the parallel stall is unverified. OpenAI Codex prepared the synthetic follow-up fixture and ran the checks.@qinrxx on GitHub · 2026-11-24 02:36 UTC · original
@XaviFortes thanks, agreed. Once #533 is merged, we'll send the ordering as a small PR on top of it: inside the
xcl-pso-computepool, a build that a bind is waiting for is taken before builds started early. It will come with its own test (a waited-for build finishing before speculative builds queued ahead of it) and its ownmain/ head regression pair. Our earlier branch won't be opened.AI use: Claude Code (Claude Opus 5.5) drafted this reply.
@H0UNDZER0 on GitHub · 2026-11-24 02:40 UTC · original
Tested on an RTX 5080: pass at the current head
5e6aca8, release and debug, 680 passed, 0 failed. The RTX 4080 and RTX 3080 results above are of the earlier headf849ecc; this one covers the current head.f849eccalso passed here before the update (679 / 0 / 41, release twice and debug).5e6aca8305a3d555437046ecc310988fc32ddfbb, this PR's head as is (on its base7ebf1b8).XCL_*variables set.cargo build --release --workspace --lockedandcargo build --workspace --locked: OK, the same singlefetch_updatewarning asmain.cargo test --workspace --release --no-fail-fast --locked -- --test-threads=4, run twice (the second with--show-output), and the same in debug: 680 passed, 0 failed, 41 ignored all three times. The base7ebf1b8gives 677 / 0 / 41 here (release): the difference is the 3bounded_compute_wait_*tests.SKIPPED: only the usual 2,gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64). The two debug-layer tests run and pass.hle::d3d12x::pso_async::testsalone, 3 runs (release): 3 passed each time.async_compute_pso_success_and_failure_in_dispatch_and_execute_indirectpasses, with its new pending-ExecuteIndirectstep.still building after … ms – proceeding with stand-inandExecuteIndirect with pending compute pipeline … skippedline in these runs comes from the tests' own synthetic pipelines. No pipeline the suite builds for real on this GPU reached the 4 s budget, in release or in debug.Not tested
f849ecc);scripts/smoke.ps1.main. At the time of the run that was9ce2070;git merge-treeshowed no conflict.AI use: Claude Code (Claude Opus 5.5, Claude Fable 5.2)
@XaviFortes on GitHub · 2026-11-24 02:53 UTC · original
Had to make new commit to solve conflicts done by merging other PRs probably. Solved now
@MonkeyPython on GitHub · 2026-11-24 02:55 UTC · original
NVIDIA / wave32 data point (the "Not tested" axis): the bounded compute-pipeline waits work on an RTX 3080 Ti — the fallback path exercised 16 times in a loading-phase soak, with no watchdog trip or device removal.
Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01, wave32-only), PR head
f849ecc, release build,XCL_NETWORK=0+ firewall, GTA VI Series 1.0.2.1, 3840×2160. Scripted menu walk (XCL_PRESS_AT) into loading.Suite at this head: 679 passed / 0 failed / 41 ignored, 2 internal
SKIPPED(the wave64 pair on this wave32 adapter) — includes thepso_asyncbounded-wait unit tests.Soak (266 s, into the cold-compile wave): the new path fired 16 times:
D3D12.X: compute pipeline 0x… still building after 4000 ms – proceeding with stand-in (continues in background). Each time the draw continued with the stand-in and compilation kept going in the background; no device removal, no watchdog-style hang attributable to the waits. fps over the last 300: 15.6 @1200 presents, 16.6 @1500. BCPack refusals reached 2048 and 40 mesh AS-slot refusals as loading progressed (the usual shapes for this title).Limit, honestly: the run ended at 266 s in the pre-existing #232 null write (
game_scarlett_master.exe+0x23cf683, same signature as on plain main) — so a soak past the 578 s point was not reachable on this title/host: #232 kills it at ~266–298 s regardless of this PR. The bounded-wait behavior above was observed during the cold-compile wave before that crash; the PR neither causes nor prevents the null write.Not tested: Intel GPUs, gameplay past the #232 crash, other titles.
AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the suite and the soak with scripted input and wrote this report from the logs; a human reviews it before posting. No code changes.
@Jevix on GitHub · 2026-11-24 02:56 UTC · original
I've implemented an additional regression test for the dedicated compute worker pool.
The test saturates both graphics workers and verifies that a lazy compute PSO completes through the actual runtime routing path on a dedicated compute worker.
Validation on RTX 4060, i7-7700, Windows 11, Rust 1.100.0:
Tested on commit
5e6aca8. The patch adds 140 lines of test-only code.Would you prefer to incorporate this test into #533 or have me open a stacked PR?
AI assistance: OpenAI Codex (GPT-5) and ChatGPT (GPT-6.2).
@thehollowedone on GitHub · 2026-11-24 01:33 UTC · original · edited 2026-11-24 03:02 UTC
Tested after the rebase
GitHub's integration revision
09a58f3combines PR heada966993withmainatdd2ae9a. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, DXC 1.8.2502.11, Rust 1.99.1 MSVC, debug.cargo build --offline --locked --workspacepassed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4reported 693 passed, 0 failed, 41 ignored. Two of the reported passes returned early for lack of native wave64 (gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware).cargo test --offline --locked -p xcl --test gpu_compute_e2e -- --nocapture --test-threads=1passed 2/2 on the selected GPU with no runtime skips or debug-layer errors.Not tested
GPU output from a dispatch recorded during a forced timeout, and the retail watchdog.
AI use
Codex with GPT-6.2 Sol ran the tests and drafted the update.
Results on earlier revisions
The two bounded-wait tests passed on Windows 11 build 26300, Rust 1.99.1 MSVC, debug, at f849ecc.
cargo test --offline --locked -p xcl --lib bounded_compute_wait -- --nocapturereported 2 passed, 0 failed, 0 ignored.The tests verify that the real pipeline becomes available after a timeout. There’s also a command-recording case worth checking. While resolution still returns the stand-in, direct
Dispatchis counted as skipped.ExecuteIndirecttakes the native forwarding branch, and the compute stand-in uses dummy bytecode. Later binds get the real pipeline, but that leaves earlier compute outputs unverified. Direct dispatch · Indirect dispatch · Stand-inCould a synthetic GPU test read back a value written by a dispatch recorded during the timeout, then consumed by a dependent command? My verification covers the source and unit tests. The GPU dispatch path and retail behavior remain untested here.
I also extended the existing fake command-list test locally at this commit. A channel held the compute build pending across a 25 ms timeout. The recording calls added zero native direct dispatches, one skipped direct dispatch, and one native indirect call. Releasing the build gate made the real pipeline available, with the native direct-dispatch count still unchanged. The extended test passed (1 passed, 0 failed, 0 ignored) with
XCL_COMPUTE_PSO_WAIT_MS=25 cargo test --offline --locked -p xcl --lib async_compute_pso_success_and_failure_in_dispatch_and_execute_indirect -- --nocapture(environment variable set in PowerShell). This checks command recording with a fake list. GPU readback remains open.AI use
Codex with GPT-6.2 Sol extended the scratch fixture, ran the unit tests, traced the dispatch paths, and drafted this report.
Follow-up on 359851f
The updated fake command-list test passed on Windows. It observed the new skip for an indirect dispatch whose compute pipeline was still pending. The three built-in wait tests also passed. Tested revision
In a scratch test, two caller threads entered the resolver together while a channel held the same compute build pending. With a 200 ms budget, the counter recorded 400 ms of combined waits. Both callers can read the full remaining balance before either charges its wait. If the budget is meant to cap combined wait time across render threads, could callers reserve their allowance before waiting, then return any unused portion? If it is meant to cap wall-clock stall, the combined counter can include overlapping time.
Windows 11 build 26300, Rust 1.99.1 MSVC, debug.
cargo test --offline --locked -p xcl --lib bounded_compute_wait -- --test-threads=1 --nocapturereported 4 passed including the scratch probe. The same command with the filterasync_compute_pso_success_and_failure_in_dispatch_and_execute_indirectreported 1 passed. Both runs had zero failures or ignored tests. This CPU-side check leaves GPU output and retail behavior open.Codex with GPT-6.2 Sol wrote the scratch probe, ran the tests, and drafted this update.
GPU follow-up on 359851f
The stock
gpu_compute_e2eintegration tests passed 2/2 on the RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC, debug. I usedXCL_ADAPTER=3080 Ti,XCL_REQUIRE_GPU=1, and a fresh DXIL cache. Tested revisionIn a scratch copy I changed the readback fixture to require a pending compute stand-in and call the new
resolve_computepath with the 4,000 ms budget. It returned the translated PSO from the cold build. The fixture dispatched it on the hardware and matched both expected output words at each of 768 positions (1,536 words total). The scratch run passed 1/1 with no reported skips. Both runs usedcargo test --offline --locked -p xcl --test gpu_compute_e2e -- --test-threads=1 --nocapture, with the scratch run filtered to the readback test.This verifies the GPU result when compilation finishes within budget. Output from a command recorded during a forced timeout and retail watchdog behavior remain untested. Codex with GPT-6.2 Sol ran the tests and drafted this update.
Follow-up to the 5e6aca8 update
I checked the two-worker floor with
XCL_DXC_THREADS=2. In a scratch Windows test, the first compute job held one worker at a channel gate while a second job ran on a compute worker. The second job ran before releasing the first, so the two jobs did not serialize behind that gate. The probe passed 1/1. Author update · Tested revisionThe stock
gpu_compute_e2etests also passed 2/2 on RTX 3080 Ti (621.35) with the D3D12 debug layer enabled and no reported skips. XCL logged live-object warnings at process exit. Windows 11 build 26300, Rust 1.99.1 MSVC, debug, serial tests. This exercises the worker scheduling and synthetic compute readback. Retail watchdog behavior remains untested here.Codex with GPT-6.2 Sol wrote the scratch probe, ran the tests, and drafted this update.
@XaviFortes on GitHub · 2026-11-24 03:02 UTC · original
Thanks @Jevix for writing and validating that saturation test!
Since #533 is already at ~351 insertions (close to the ~400-line guideline) and CI is green on the rebased head (a966993), a stacked / follow-up PR on top of #533 is cleaner — especially now that #507 landed for test-only PRs, and that way you get proper commit credit for the test too.
@Jevix on GitHub · 2026-11-24 03:20 UTC · original
¡Muchas gracias, Xavi! Veo que eres de España, así que aprovecho para saludarte desde Argentina.
Agradezco mucho que hayas tenido en cuenta el reconocimiento de mi aporte. Esperaré a que se fusione el #533 para preparar mi PR independiente y volver a validar las pruebas sobre main.
¡Un placer poder contribuir al proyecto!
@xstraok on GitHub · 2026-11-24 03:20 UTC · original · edited 2026-11-24 03:24 UTC
Linux / RADV (RDNA4) run with the retail title (1.0.2.1). With this PR the title gets ~10–20 s further before the heartbeat abort. In one run (j) the skips were followed by a GPU page fault and a ring reset. Edited after a rerun (k2): the
Wait64BitValueXtimeouts are not caused by this PR's skips. They also appear with no skip at all.Setup: RX 9060 XT (RDNA4, RADV, Mesa 26.2.6), Ryzen 5 7600, 32 GB, Arch Linux (kernel 7.2.15), Proton Experimental, vkd3d-proton 3.1 with dxil-spirv updated to upstream
53aac418(the older one hangs on two of this title's compute programs, #611). XCL release build,x86_64-pc-windows-gnu. Local tree:maina6f5f7a+ #257 (Linux kit) + #458 + #496 + #484 + #610 + #172 + this PR ata966993(bind.rsconflict inexecute_indirectresolved to this PR's side). Run j also has #267. Uncommitted, so no smoke block.XCL_COHERENT_MB=512, saved profile, one A press, warm DXIL cache.Without this PR (run h2, same setup minus #172 / this PR / #267): presents stop at 150 s. Three title threads wait in
pso::compile_console_shader → dxc::compileon three long DXC compiles, the other DXC workers are idle, and the title aborts at 180 s (+0x23cf683, the heartbeat abort from #505).With this PR:
Wait64BitValueXtimeoutsExecuteIndirect with a pipeline that is still being built skippedring gfx_0.0.0 timeout~178 s, ring resetXCL_COMPUTE_PSO_WAIT_MS=0The timeouts all read like
Wait64BitValueX timed out after 2000 ms at 0x1e55f9b8 (op 7, want 0x9c3, mask 0xffffffffffffffff; memory holds Some(0)), and the counter is never written. This is the pattern @tadymila reported in #505. Run k2 shows them without any skip, so they come with reaching that point of loading (~162 s here), not with this PR. Run h2 never got that far.Run j's devcoredump (
/sys/class/drm/card1/device/devcoredump/data, decoded withgc_12_0_0_sh_mask.h/gfxhub_v12_0.c):[gfxhub] Page fault observed, address0x0000800004622000,GCVM_L2_PROTECTION_FAULT_STATUS 0x00501431. Fields: MORE_FAULTS 1, PERMISSION_FAULTS 0x3, MAPPING_ERROR 0, CID 10 = SQC (data), RW 0 (read), VMID 5. So a shader's scalar load (descriptor / root constant / constant buffer) read an unmapped page, and the gfx front end stalled (CP_CPF_STALLED_STAT1 0x3) until the ring reset.What is left that may be this PR's: the page fault and ring reset happened only in run j (256 dispatches skipped by 168.7 s). It did not happen in run i, which had more skips (4096 by 162.2 s), or in k / k2 without skips. So the link to the skips is weak: one sample. Possibly a skipped dispatch or ExecuteIndirect leaves state that a later shader reads through, but this is not proven. I have not identified which buffer
0x800004622000belongs to (noRADV_DEBUG=bo_historyin that run). None of the runs gets past the heartbeat abort, with or without this PR.Not tested: Windows, any other GPU,
cargo testandsmoke.ps1on this tree, this PR alone onmain. One run each, so the timings are single samples.Tested and written with Claude Code (Claude Opus 5.5); runs and measurements from this machine.
@WarmMilkCodes on GitHub · 2026-11-24 04:05 UTC · original
<html> <html><head></head>RDNA2 results (RX 6600 XT 8 GB, Ryzen 5 5500, 32 GB RAM, DXC 1.8.2502.11), retail title from #505
#533 helps on AMD too, but on its own it didn't get past the "GPU Loc Sig" watchdog here. Two more waits had to be bounded: draws, and the timeouts that pile up back to back. With both, the title got past the world loading screen into gameplay (audio of gameplay playing, black screen) for the first time on this machine.
What the crash dumps showed at each step
7ebf1b8dd2ae9a, unmodifiedSo with the waits bounded, the watchdog is gone, and what's left is the cost @thehollowedone pointed at: work skipped while its pipeline builds. It looks like it ends in a device removal a few seconds later. I'm finishing the full precompile now to see how far that goes when nothing has to be skipped.
One path still looks unbounded: with the DXIL already in the cache, a compute PSO seems to be built in the create call, on the title's thread (the build log lines come from unnamed title threads). On a run with a half-filled cache, the watchdog came back at 297 s, with a title thread in the driver's compiler; the slowest builds took 3.8 s and 6.1 s. It's another candidate for the background workers.
</html> </html>@itsd-effex on GitHub · 2026-11-24 04:10 UTC · original
Linux (Wine + vkd3d-proton) test of this PR's head. On this stack it takes the slow compute conversions off the title threads; the title then stops on the two waits #662 describes.
Tested
main91f9a5e+ #684 (e56dbc3) + #273 (BC1) + this PR (a966993). All three merged without conflicts (0d1c76b). Our test title under Wine: 48 PASS / 2 FAIL, the same asmain.XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_COMPUTE_PSO_WAIT_MS=1. One run.Before this PR (the same tree without it, two runs): the title's watchdog fired at 200 s and 204 s (
GPU Loc Sig7333478d). In the dumps, a title thread builds a compute pipeline itself:resolve_for_bind→resolve_wait→real::translated_compute_pso→ vkd3d-proton → dxil-spirv's CFG structurizer, for ≥ 29 s. Four other title threads wait inresolve_wait. Details in #505.With this PR
compute pipeline … still building after 1 ms – proceeding with stand-in (continues in background).xcl-pso-compute-1/-3, andxcl-pso-compute-2is inwinevulkan.dll. None of it is on title threads, which is what this PR is for.GPU Loc Sigc20e3b19:resolve_for_indirect→resolve_wait, the graphics branch, which this PR leaves unbounded. That's the same thing jimokulou2-ops reports in #662. Thexcl-pso-*workers are idle and onexcl-dxc-*thread is compiling.Wait64BitValueX timed out after 2000 ms(want 0x62d,memory holds Some(0)) back to back, with 0 presents from ~172 s (#505, #662).Not tested: Windows. The workspace suite: XCL doesn't build or run its tests on Linux. #267 together with this PR. A run with the default 4000 ms. A second run of this build.
AI use: Claude Code (Claude Opus 5.5) merged and built the trees, symbolized the thread dumps (
xcl.pdb, the locald3d12core.dll) and drafted this comment. The runs are mine, on the hardware above.@claudetools-gh on GitHub · 2026-11-24 04:16 UTC · original
Tested locally on an RTX 5070 Ti (NVIDIA, 32-lane waves) with this PR on top of main
508a0c7. It helps, but graphics pipelines can still block a title thread long enough to trip the title's watchdog:pso_async::resolve_for_indirectstill callsresolve_waitfor graphics PSOs. A thread dump taken at the watchdog crash showed a title thread blocked inbind::graphics_bound -> resolve_for_indirect -> resolve_wait.graphics_bound) also useresolve_wait.Bounding both with a per-frame budget like this PR's compute one (stand-in past it) moved the crash ~20-40 s later in our runs.
For context, the watchdog (from the title's code): a thread wakes every 1 s and scans 64 per-thread "wait started" timestamps; a slot that stays stale across checks calls the fatal handler (the write to address 0 everyone sees). So any title thread blocked inside XCL for a few seconds trips it: PSO waits, Wait64 waits, readback waits.
(Findings and text by Claude Code / Claude Opus 5.5; runs done locally on the hardware above.)
@vibryxcx on GitHub · 2026-11-24 02:51 UTC · original · edited 2026-11-24 04:39 UTC
Test report on the retail title into the world, AMD RDNA2 on Windows: with this PR the bounded compute wait does fire, and the watchdog still ends the title at about the same time. At the stop, the title's threads are no longer waiting in
set_pipeline_statebut in draws and indirect calls (draw_instanced/execute_indirect→resolve_wait).Setup: AMD Radeon RX 6800 16 GB (RDNA2, native wave64), driver 32.0.21045.5002; Intel Core i5-10600KF (
clwb/monitorxemulated); 32 GB RAM, commit limit 45.4 GB (system-managed page file, peak use 407 MB); Windows 11 build 26200; Rust 1.100.0 MSVC; release builds.cargo clean --release -p xclbefore each build.Builds:
main3db536e(has #435), and this PR's head5e6aca8merged onto it (local merge commitf45bb77, no conflicts). DefaultXCL_COMPUTE_PSO_WAIT_MS.Run:
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_RUN_SECONDS=600,XCL_PRESS_A_AT=14,17,21,125,131,…,197(A at 14/17/21 s, then every 6 s from 125 to 197 s).mainfirst, then the PR, back to back.main3db536e3db536e+ this PR+0x23cf683(write at 0x0),rbx=0x0, at 301.9 sbackground_pipelinesat the stop[47, 0, 58715][62, 0, 58702]still building after … ms – proceeding with stand-inlinesExecuteIndirect with pending compute pipeline … skippedlinesBoth runs hold 60 presents per 2 s up to about 190 s, then fall to 0–9 per 2 s while the world loads.
Where the title's threads wait at the stop. From XCL's thread dump, symbolized against each run's own release build with
llvm-symbolizer(themainbinary rebuilt from3db536ewith the same toolchain):main: four title threads at the same frames,Condvar::wait←pso_async::resolve_wait←pso_async::resolve_for_bind←bind::set_pipeline_state(title+0x248c734).set_pipeline_state. Instead:Condvar::wait←pso_async::resolve_wait←bind::graphics_bound←bind::draw_instanced(title+0xbff06): one thread;Condvar::wait←pso_async::resolve_wait←pso_async::resolve_for_indirect←bind::execute_indirect(title+0x248d690,+0x248d4ef): three threads;sleep←list_x::wait64_x←list_x::execute_with_waits←real::q_execute_command_lists(title+0x24821e3): one thread.So on this machine the bounded compute wait works as described, and the stall moves to draws and indirect calls that still wait in
resolve_wait. Thedraw_instancedone is a graphics pipeline with no limit, which #267 bounds; I have not run the two together.Not tested
XCL_COMPUTE_PSO_WAIT_MSother than the default.execute_indirectwaits are for graphics or compute pipelines: the symbolized frames do not say, andresolve_for_indirectis the path this PR changes.scripts/smoke.ps1on this machine.AI use: Claude Code (Claude Opus 5.5): ran the tests and wrote this report.
Update: this PR together with #267, and a larger page file (same machine). #267
043d1f7merged onto the local merge of this PR (f45bb77above); the conflict inbind::execute_indirectresolved to keep both sides (this PR's pending-compute skip, then #267's root-signature bind for a stand-in), andresolve_for_indirect's graphics arm changed fromresolve_waitto #267'sresolve_for_draw. Local commit2323f14, not pushed.cargo test -p xcl --lib pso_async: 5 passed, 0 failed. Same run command as above, 600 s limit, one run each.XCL_PSO_WAIT_MS+0x23cf683atbackground_pipelinesstandin_draws3db536e+ this PR + #267[86, 0, 58678]3db536e+ this PR + #267[119, 0, 58646]3db536e+ this PR + #267[206, 0, 58558]main3db536e[46, 0, 58715]Condvar::wait_timeout←pso_async::resolve_for_draw(frombind::draw_instanced/bind::execute_indirect), as #267 intends.mainwith the larger page file still has four inresolve_wait←resolve_for_bind←bind::set_pipeline_state.xcl-dxcworkers were indxc::wait_for_memoryat the stop (as @S1m0ne1997 describes in #505). With the 63.9 GB limit, 3 of 11 were; 5 were indxcompiler.dlland 4xcl-psoworkers inamdxc64.dll.still building after ~3.6–4.0 s), the dispatch /ExecuteIndirectskips follow in the same millisecond, and 2–8 s laterWait64BitValueX timed out after 2000 ms at 0x70417fe… (op 7 …; memory holds Some(0))three times. @xstraok's run k2 has these timeouts with no skip at all, so I read this as the same loading point, not as caused by the skips.So on RDNA2 / Windows, bounding both waits and roughly doubling the pipelines built before the stop still leaves the heartbeat abort at about 300 s.
Not tested (update): this PR and #267 at their current heads (
a966993for this PR); a warm or precompiled DXIL cache;XCL_COMPUTE_PSO_WAIT_MSother than the default.Update: merging this PR (
a966993) onto currentmain(f4ce27c, which has #690). It conflicts inpso_async.rs(Pendingfields andsubmit_as). Two things a rebase needs beyond the conflict markers:resolve_compute_withindoes not callp.note_use(), which #690's other resolve paths do. Without it, a compute pipeline bound through this PR's path is never kept inused-pipelines, so #690 does not build it ahead in the next run. These are the compute pipelines the watchdog is about. I addedp.note_use()right afterentry(pso)there.submit_as(from #690) sends withqueue().send(p); this PR'senqueue(&p)keeps compute on the compute pool. I usedenqueue(&p).With #267 on top I also changed
resolve_for_indirect's graphics arm fromresolve_waitto #267'sresolve_for_draw(the case @claudetools-gh describes above), and gaveresolve_withinthe samenote_use(). The tests that callsubmit_lazyneed #690's newkeyargument (0).cargo test -p xcl --lib pso_async: 7 passed;bind::: 6 passed. Local only (f0e46a4); the runs on that tree are in #505.@CowboyBingus on GitHub · 2026-11-24 05:22 UTC · original
Found while merging this onto current
main(which now has #690): after the rebase,resolve_compute_withinneeds anote_use().Compute pipelines bound through
Dispatch,ExecuteIndirectandresolve_for_bindnow go throughresolve_compute_withininstead ofresolve_wait, and onlyresolve_waitcalls #690'snote_use(). So they are never written toused-pipelines.txt, and the next run does not build them ahead of their first use. Only theXCL_COMPUTE_PSO_WAIT_MS=0fallback, which goes toresolve_wait, still records them.Fix:
p.note_use();right afterlet Some(p) = entry(pso) else { return pso };inresolve_compute_within. This test fails without the line and passes with it:Checked on a local merge of this PR (
a966993) ontomaind5442d2:cargo test -p xcl --lib pso_async, 8 passed with the line, the new test fails without it (Windows 11, RTX 5070 Ti, Rust 1.91).AI use: found by an adversarial review run with Claude Code (Claude Opus 5.5), confirmed by a second independent merge and the test above.
@gccody on GitHub · 2026-11-24 06:14 UTC · original
A Linux data point (Wine + vkd3d-proton, RTX 3080). With this PR merged, graphics pipelines can still hold a title thread past the
GPU Loc Sigwatchdog (#505). A suggested extension follows.What I saw. Retail title 1.0.2.1,
mainf4ce27c+ #257 + #684 + this PR (merged ontomain; the only conflict waspso_async.rs).XCL_THREAD_DUMP_AT=215,230; the watchdog fired at 247 s.bind::execute_indirect→pso_async::resolve_for_indirect→resolve_wait→real::build_graphics→translated_graphics_pso→d3d12core.dll→winevulkan.dll. That is a graphics pipeline built by the driver, waited for without a bound.dxc::compilefor the next one.resolve_for_indirectgives compute pipelines the bounded wait but graphics onesresolve_wait.bind::graphics_bound, which runs before every draw, also usesresolve_wait.Suggestion. Give graphics pipelines the same bounded wait in both places.
resolve_compute_withinhas nothing compute-specific in it (enqueuepicks the pool fromp.compute), and both callers already handle a stand-in:execute_indirectskips whileis_pending, andgraphics_bounddraws with the stand-in (nothing), as for a failed build. The diff against this PR merged onmain:diff (bind.rs, pso_async.rs, plus a test)
On this PR's own branch,
submit_lazystill takes three arguments: the test then drops the trailing0,. The commit is97fd2c5ongccody/xclbranchlinux-boot.What it changed here:
pso_asynctests (including the new one) andbind::tests pass under Wine.AI use: Claude Code (Claude Opus 5.5) found this, wrote the diff and this comment; the runs were on the commenter's machine.
@XaviFortes on GitHub · 2026-11-24 07:55 UTC · original
Rebased onto current main (
1ec4c98) at001e37dand resolved the #690 conflict in pso_async.rs, folding in the two suggestions from overnight:@CowboyBingus: added p.note_use() in resolve_compute_within + bounded_compute_wait_records_the_pipeline_for_the_next_run so pipelines bound through the bounded wait are still recorded in used-pipelines.txt for #690 preloading.
@gccody & @WarmMilkCodes: added resolve_bounded and wired both resolve_for_indirect and bind::graphics_bound to share the per-frame budget + bounded_wait_covers_graphics_pipelines_too, so graphics pipeline builds no longer stall past the GPU Loc Sig watchdog either.
@xstraok: thanks for the thorough RADV bisect and confirming the Wait64BitValueX timeouts weren't caused by the skips.
Updated the PR description with a fresh 60 s smoke run on
001e37d(1,374 frames, 60 60 60 presents/2 s, 14,942 MB peak commit, 0 crashes, 0 device removals).@CowboyBingus on GitHub · 2026-11-24 08:00 UTC · original
Thanks. Confirmed at
001e37d:p.note_use()is inresolve_compute_within, andbounded_compute_wait_records_the_pipeline_for_the_next_runis there.On the graphics side, our traces support
resolve_bounded. RTX 5070 Ti, retail world load, #533 ata966993+ #267, before this change. In every thread dump during the stall, the title thread was inbind::execute_indirect→pso_async::resolve_for_indirect→resolve_for_draw→resolve_within→Condvar::wait_timeout. That was 10 waits of 2.1-2.4 s each back to back, 23.7 s in all. Presents stopped and the watchdog followed. With both caps at 50 / 100 ms (XCL_PSO_WAIT_MS/XCL_COMPUTE_PSO_WAIT_MS), the title got the odd frame out and the watchdog moved from ~104 s to ~159 s, so the waits are one part of that stall but not all of it. I'll run001e37don the same setup and post what changes.AI use: Claude Code (Claude Opus 5.5) read the diff and the thread dumps; I ran the tests.
@bstillbstill on GitHub · 2026-11-24 09:06 UTC · original
Test report:
001e37don NVIDIA RTX 3090 Ti (Windows) with the retail title of #505. The bounded waits work and move the "GPU Loc Sig" abort ~12 s later. The next block is a sparse readback inMapthat holds the sparse lock while it waits for the GPU.Builds (merged locally onto
main09940bb):6c13c10main+ #899 (bind-wait logging only)16ebe79main+001e37d, clean merge4dc8428main+001e37d+ #43319004e1; one conflict insparse.rs, doc comments only (#433's text forreadback_after_executenext tomain's newqueue()), both kept as they wereRetail title, 300 s per run. Same machine, same warm caches, DXC 1.9.2609.5,
scripts/smoke.ps1(with the crashed-run fix from a local branch, so a crashing run still gets a block). Scripted inputXCL_PRESS_A_AT=15,21,…,585(every 6 s),XCL_THREAD_DUMP_ATfor thread dumps, XCL frames resolved against each build's PDB.+0x23cf683, 95.7 stiling::Chain::detile_level(see below)+0x2215c35, 107.8 s+0x23cf683, 118.8 sbind::execute_indirect(bind.rs:238) →pso_async::resolve_wait. Only 1 of 31xcl-pso-*workers was in the driver: the title binds one new graphics pipeline after another and waits for each.real::res_map→sparse::readback_now→State::readback_ranges→State::wait_for(sparse.rs:776). Its fence stays 2 short (has not reached fence value 38430 after 5 s (at 38428)), 4 times in a row, until the abort.39956 … (at 39951)). The dumps at 90 s and 105 s also show the title's submitting thread inq_execute_command_lists→sparse::before_execute/sparse::queue()→Mutex::lock_contended.readback_nowtakesSTATEand keeps it throughreadback_rangesand both of itswait_forcalls. So whileMapwaits for the GPU, the title cannot submit, and the work the fence is waiting for may be in that submit. #433 covers the copy back afterExecuteCommandLists, not thisMappath.Two crashes that are probably not this PR:
title_textures::subresources_onworkers crashed together inVCRUNTIME140.dll+0x1bb86fromtiling::Chain::detile_level(tiling.rs:438), reading unmapped title memory. Nothing had been skipped yet, and it did not come back in the other 13 runs of the title on this machine. #751 changes title texture reads in this area.ntdll.dll(read at0x2b), 57 ms after a scheduledXCL_THREAD_DUMP_AT=60dump. With the first dump at 75 s, the rerun went on to the abort above. An earlier comment on #505 reportseh::dump_threadsfaulting inntdllon live stacks.I did not see the
0xffffffffffffffffread others reported with skipped dispatches.Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4(debug):main(16ebe79): 721 passed, 0 failed, 41 ignored4dc8428): 723 passed, 0 failed, 41 ignoredgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Not tested: AMD / Intel; more than one or two runs per build; whether skipped work shows up as wrong rendering (the title never left its loading screen in these runs); #533 with #267 or #891.
Test runs, log and dump analysis and this comment by Claude Code (Claude Opus 5.5); I checked the logs it is based on.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@raylitebull on GitHub · 2026-11-24 10:42 UTC · original
Closing as superseded by #891, which has already been merged into
main.@T0ns1 on GitHub · 2026-11-24 12:07 UTC · original
On a 32-lane NVIDIA GPU, the skipped compute work this PR falls back to hung the GPU; with skipping off there was no GPU hang, only the title's watchdog. Three runs of the retail title (1.0.2.1) into world loading, same build, differing only in
XCL_COMPUTE_PSO_WAIT_MS.Setup: RTX 5070 Ti 16 GB (driver 32.0.16.2101), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2609. Release build of
main077ce40+ #905 + #889 + this PR (cherry-picked; the one conflict, insubmit_as, resolved by keepingenqueue(&p)and #889's|| compute), plus two local list-slot changes unrelated to pipelines.XCL_NETWORK=0 XCL_ACTIVITY=1, menus walked withXCL_PRESS_A_AT. About 225 compute pipelines were in the driver cache from a partialxcl shaders --precompile --pipelines.XCL_COMPUTE_PSO_WAIT_MSstill building afterwould close a GPU cyclequeue.Wait … did not complete within 5000 ms+0x23cf683at 112.6 smainhits. Then GPU waits stopped completing;Wait64BitValueX timed outtwice andqueue.Wait … did not complete within 5000 ms4 times. The NVIDIA driver logged six TDRs (System log,nvlddmkmevent 153, the screen went black for a moment). The run ended with a command list'sClose → 0x8007000eand then0x80000003in the title at+0x72ac(rax = 0x8007000e), presumably the device lost after the TDRs (not confirmed).So on this machine the skip path trades the watchdog for a GPU hang: a skipped dispatch or ExecuteIndirect appears to leave GPU-side waits that depend on its results unsatisfied. With 0, the only remaining problem was how long the builds take. That suggests a default that does not skip (or skips only work no GPU wait depends on), with the build time itself addressed by building compute pipelines ahead (#889) and a warm driver cache. Note that
mainnow hasXCL_PSO_WAIT_MS(5fab112,8cada26), unset meaning "wait until built", which overlaps with this PR's budget; this PR no longer applies cleanly onmain.Together with #889, one of this PR's tests fails:
bounded_compute_wait_returns_real_when_build_finishes_in_timerequires the build to run on anxcl-pso-compute-*thread, but #889 queues every compute pipeline for the preload workers when it is made, and anxcl-pso-pre-*thread can take the job first (got "xcl-pso-pre-1"). Accepting both prefixes keeps what the test guards (the binding thread does not build):Before that change,
cargo test --release --workspace --no-fail-fast -- --test-threads=4on this build gave 725 passed, 5 failed, 41 ignored: this test, plus 4 GPU tests (title_textures / vram / readback_routing) that pass with--test-threads=1. With it,cargo test --release -p xcl --lib -- pso_async: 8 passed, 0 failed, in four runs. On the same changes rebased ontomain47efa2e(XCL_PSO_WAIT_MSconflict resolved by keeping both), the full suite: 749 passed, 0 failed, 41 ignored.No game data, logs only. AI use: Claude Code (Claude Opus 5.5) merged the PRs, ran the builds and the three runs.
Pull request closed