D3D12.X: the builds a submit waits for do not take turns among the big compiles #2141
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!2141
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2141/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?
@Royalflamejlh on GitHub · 2026-11-25 06:05 UTC · original
Royalflamejlh:fix/submit-builds-lane→main· +400 −27 · 6 files · 2 commits · closed without mergingState on 25 November: #2118 is rebased on
main426a5a7(b7d0ef2); this branch is still on #2118's earlier head and conflicts.mainhas since mergedae00ec7, which lets two builds the title waits for run at once and no more, so the numbers below, measured before it, do not say what this lane adds now. It stays a draft until that is measured again.Stacked on #2118; its own commit is the last one,
1a18762.Big driver compiles on the workers go one at a time (
BIG_COMPILES), each once the commit headroom it asks for is free (#1774). With #2118 a pipeline whose call was put off to the submit is one the title needs for this frame. Here its build takes a lane of its own, four at once, so those builds run together, each still waiting for its headroom. From cold driver caches a retail title finished 69 compute builds of 3 s or more in the 211 s after its world start with both, against 31 with #2118 alone and 34 without either (Linux, 1 run each). Scheduling under #2088; part of #505 and #1833.Beside #2098. #2098 scales
BIG_COMPILES' slots with the CPUs, so the workers' big builds already run several at once. With it merged this lane's four should be its number, not a second one: if it merges first I rebase onto it and measure again. Not measured with #2098 in.What is in it
real.rs:SUBMIT_COMPILES, a lane of four, whichcompile_slotsgives a build thatpso_async::build_is_needed_by_submit(). Programs of 4 MiB or more stay inGIANT_COMPILES, one at a time. A build already waiting for its turn when its call is put off stays there.pso_async.rs:build_is_needed_by_submit, read from the flag #2118'sneed_by_submitsets; testa_build_knows_a_submit_needs_it.Tested
x86_64-pc-windows-gnu; vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and dxil-spirv#372.cargo build --workspacethencargo test --workspace --release --target x86_64-pc-windows-gnu --no-fail-fast -- --test-threads=4on1a18762: lib 1097 passed, 3 failed, 26 ignored (two skipped, which hang under Wine, #1706); other test binaries 53 passed, 3 failed, 20 ignored. The six failures are the ones ofmaincbc296a(named in #2118; there lib 1093, 3, 26 and 53, 3, 20). 24 lines print SKIPPED on both.main4178e88with nine pull requests, three more dxil-spirv patches in vkd3d-proton,XCL_DXC_THREADS=4, 300 s). The row with the lane ran #2118's earlier form33424af, which had this lane in it without the bound of four (with four compile threads there were four workers to use it) and did not yet count two dropped dispatches.#101queue.Waittimeoutscbc296aand 2 of1a18762): such builds finished 7, 12, 7, 8, 7 against 17, 10; most at once 2–3 against 7, 4; peak commit 44.8–45.5 GB against 46.6, 47.1 GB; least available memory 5.3–6.9 GB against 4.8, 4.6 GB; 0queue.Waittimeouts, 0 dispatches skipped, no removal or crash in the seven. So on a 32 GB machine #2118 and the lane together cost about 1.5 to 2 GB of commit at the peak and left 4.6 GB available; #2118 alone was not run there.1a18762: thepso_async::,list_x::,title_list::,bind::,alloc_pool::andreal::tests in debug, 95 passed, 0 failed;scripts/smoke.ps11560 frames againstmaincbc296a's 1568,60 60 60on both, 0 removals, 0 crashes, peak commit 14488 MB against 14458 MB. On the earlier form33424af: thepso_async::,list_x::,title_list::,bind::andalloc_pool::tests in debug, 48 passed;scripts/smoke.ps11539 frames againstmaincbc296a's 1568,60 60 60on both, 0 removals, 0 crashes, peak commit 14485 MB against 14458 MB.Regression run
Under Wine on Linux, as in #2118 (peak commit reads 0 MB there;
exit: 0x89is the wrapper ending Wine).main:
PR:
Not tested
1a18762on Windows by me beyond the named tests and the smoke pair; #2118 alone in the title on Windows; the bounded lane in the title under Wine, and the default number of compile threads there; a machine with less than 32 GB or a card with less than 12 GB in the title; runs longer than 300 s; AMD and Intel.AI use
@DavidM1911 on GitHub · 2026-11-25 06:49 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!
@Royalflamejlh on GitHub · 2026-11-25 08:03 UTC · original
@fewmet thank you: that is the Windows title run and the memory figure this was missing, at the default thread count, and your numbers are in the description now. Still open on my side: #2118 alone in the title on Windows, to split the 1.5 to 2 GB between it and the lane, and a run with #2098 merged in.
AI use: Claude Code (Claude Fable 5.2) wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@Royalflamejlh on GitHub · 2026-11-25 15:24 UTC · original
Closing: #1996 (merged as
ae00ec7) gives the builds a submit waits for a cap of their own,XCL_HUGE_PSO_WANTED_CONCURRENCY. At 6 it did on our RTX 4060 Ti what this lane did (1 run: 2.47 build-seconds a second against 1.84 to 1.91 at the default), with no code of ours, so this is not rebased.AI use: Claude Code (Claude Opus 5.5) wrote this note, from a run by another Claude Code session (Claude Fable 5.2).
@fewmet on GitHub · 2026-11-25 07:43 UTC · original · edited 2026-11-25 20:47 UTC
Tested
1a18762(this PR on #2118'sfb1a905) against its basecbc296aon native Windows, in the retail title (1.0.2.1), on a machine with less memory than the runs above.Hardware: RTX 3060 12 GB (32-lane waves), driver 32.0.16.1062 (610.62), Ryzen 7 5800X, 32 GB RAM (commit limit 56 246 MB with the page file), Windows 11 Pro build 26300, rustc 1.100.0, DXC 1.8.2502.11 from the Windows SDK. Each commit built with
cargo build --release -p xclin its own worktree and target folder.Tested
1a18762, debug:cargo test --workspace -- pso_async:: list_x:: title_list:: bind:: alloc_pool:: --test-threads=4: 49 passed, 0 failed.xcl run <game folder>withXCL_NETWORK=0,XCL_MUTE_TTS=1,XCL_ACTIVITY=1,XCL_RUN_SECONDS=300, default compile threads, noXCL_PSO_WAIT_MS. Every run from cold caches: NVIDIA's DXCache emptied, and the DXIL cache cold too (XCL_DXIL_CACHEwas meant to be a fresh copy of one cache without itsdriverfolder, but my script passed it a path XCL could not use, soreport.jsonshows 17 – 21 DXIL cache hits against 216 – 439 misses in every run, base and PR alike). A held at 60 s and every 15 s up to 242 s (the account screen). Memory sampled every 2 s from outside XCL. Base 5 runs, this PR 2.Compute driver compiles of 3 s or more that finished (all after the first
#101); build-seconds of those per second from the first#101to the end; their gate note in the log (gated/wanted at once/ungated here, a title thread's); most at once; compiles still running at 300 s; least available memory, peak system commit and peak private bytes of the XCL processes:cbc296a, 5 runs1a18762, 2 runsframes presentedline is the 2 700-frame one at 101.6 – 102.6 s, and 2 869 – 2 925 frames were shown by 300 s. The first#101came at 122 – 147 s. No run is past the world start.queue.Waittimeouts, 0 dispatches skipped, 0 device removals and no crash in all seven.Regression run (
scripts/smoke.ps1 -Seconds 60, no input):Not tested
fb1a905); runs longer than 300 s; more than two runs of this PR.AI use
@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.Pull request closed