Repository navigation
D3D12.X: enforce hard concurrency cap on wanted >= 256 KB huge PSO compiles - #1996
raylitebull wants to merge 1 commit into
Conversation
|
Overlap note, from reading the diffs (not run): #1924 (Rednaxeh, opened earlier) changes the same huge-compile gate in AI-assisted (Claude Code). |
|
Thanks for flagging the overlap, @upipibi! Full credit to #1924 (@Rednaxeh) for the commit-size / #1996 addresses an orthogonal axis in |
|
Technical review findings: Blocking
Minor
|
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
) Brings main to full parity with upstream/main (de36462): - xcl-dev#1969: official upstream merge of 64-bit icmp 32-bit lowering and MIMG heap guards - xcl-dev#1774: size-based commit headroom admission for big driver compiles and XCL_PIPELINE_MAX_KB cap for offline --pipelines precompile Conflicts resolved by keeping HEAD's already-merged xcl-dev#1969 emit.rs (with heap_index), combining xcl-dev#1996 + xcl-dev#1774 comments in real.rs, and combining xcl-dev#1871 + xcl-dev#1774 in shaders.rs. Assisted-by: Antigravity (Gemini 4)
…ving wanted slots Hard-cap concurrent huge (>= 256 KB) wanted driver compiles via XCL_HUGE_PSO_WANTED_CONCURRENCY (default 2; giant >= 4 MiB capped at 1) to prevent bursts of lazy binds from spiking commit into OOM. Check commit_free() inside the wait loop before taking SlotGuard so an unwanted commit-blocked compile never holds a slot and deadlocks wanted builds under low free commit, and remove the unreachable no-slot arm in gate_note. Rebased onto xcl-dev#1774 (656c0e8).
c969032 to
ae00ec7
Compare
|
Rebased cleanly onto
|
|
Regression run for this PR: head main this PR: No device removals or crashes; 95 % of main's frames, 115 % of its peak commit. Not tested: the whole suite; world loading; whether the title reaches all of the changed code in these 60 s (default settings: Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
A data point on how many huge compiles at once help, from a world-loading run on a 12 GB 32-lane card. RTX 3060 12 GB (581.80), Windows 11 26200, 64 GB RAM, release build of
More slots let several of these compiles overlap on this machine, but they did not get the title further: what it waits for is the next pipeline it binds, and there are many of them, each taking seconds. One run. Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
Empirical verification — PR #1996 (
|
Enforces a hard concurrency cap on concurrent wanted huge (
>= 256 KBDXIL) driver PSO compiles (Slots::wanted_most, configured viaXCL_HUGE_PSO_WANTED_CONCURRENCY, default2, clamped toXCL_HUGE_PSO_CONCURRENCY..=64) while capping>= 4 MiB(GIANT_COMPILES) at1, preventing bursts of lazy compute binds from stacking driver-compiler commit into OOM.Part of #1833.
What is in it
crates/xcl/src/hle/d3d12x/real.rs(+127 / -68):huge_pso_wanted_concurrency()&Slots::wanted_most(): wanted huge builds still bypass the 3 GiB commit headroom wait and can overtake an unwanted background compile (up towanted_most), while bursts abovewanted_mostqueue cleanly without stacking memory.big_compile_turn: checkscommit_free()in the wait loop before acquiringSlotGuard(*n += 1) so an unwanted commit-blocked compile never holds aGIANT_COMPILESslot while sleeping under low free commit.SlotGuard::drop: switches tonotify_all()so waiting wanted compiles wake even behind unwanted waiters.big_compile_tests(11/11pass, includingunwanted_commit_waiter_does_not_starve_wanted_compile,wanted_builds_bypass_commit_and_unwanted_slot_but_respect_hard_cap, andwanted_burst_is_hard_capped_to_wanted_most).Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), rebased cleanly onto656c0e8(ae00ec7).cargo check --workspace --tests: passed.cargo test -p xcl --lib big_compile_tests: 11 passed, 0 failed.Regression run
scripts/smoke.ps1pair onae00ec7vs656c0e8has not been run locally. AMD and NVIDIA reviewers are invited to test onae00ec7vs656c0e8(includingscripts/smoke.ps1andXCL_HUGE_PSO_WANTED_CONCURRENCY=1/2under multi-thread PSO bursts) and post results in the comments.Not tested
scripts/smoke.ps1pair onae00ec7, fullcargo test --workspacesuite, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton.AI use