D3D12.X: a big driver compile waits for free commit, not free RAM #2868
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!2868
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2868"
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?
@GreemSC on GitHub · 2026-11-26 20:01 UTC · original
GreemSC:amd-dev-compile-gate-commit→amd-dev· +19 −6 · 2 files · 1 commits · closed without mergingbig_compile_commit_free(real.rs) still waits formin(ullAvailPhys, ullAvailPageFile), the measure71b8e6e0took out ofpso_async's worker throttle. Free physical memory is not what a driver compile can allocate, and under Wine it is the whole machine's free RAM. In a retail world load on Linux it sat at 1–2 GB with ~45 GB of commit free, everyxcl-pso-*worker waited inbig_compile_turn_withfor a compute pipeline's 3 GB, and the title waited inpso_async::resolve_waitfor one of them: 0 presents for the rest of the run. This makes the big-compile gate readpso_async::avail_commit_bytes, like the worker throttle. Found while testingamd-devunder Wine (#846, #175).What is in it
real.rs:big_compile_commit_freeusespso_async::avail_commit_bytes(nowpub(super)); the comparison is a smallbig_compile_roomwith a test (big_compile_room_is_free_commit_not_free_ram).Tested
x86_64-pc-windows-msvc).cargo test -p xcl --lib big_compileunder Wine: 15 passed, 1 failed. The failure isgiant_driver_compiles_have_their_own_laneatassert_eq!(parsed.len(), 2)forparse_rt_skip_hashes(…; bad)(left 3): it is in the ray-tracing skip list parsing, which this change does not touch. The whole suite was not run (on Wine it aborts atlist_x::tests::a_dispatch_with_a_pipeline_still_building_waits_at_the_submit, see #2764 / #2842).71b8e6e0(#846):#101(4 workers inbig_compile_turn_with, title inresolve_wait, Wine's free RAM 0.9–2.1 GB);Regression run
scripts/smoke.ps1needs Windows, which I do not have. A Windows run ofamd-devand of this head would be welcome.Not tested
AI use
🤖 Generated with Claude Code
@GreemSC on GitHub · 2026-11-26 20:21 UTC · original
cc @ivall (the
pso_asynchalf of this is your71b8e6e0) and @raylitebull (amd-dev): under Wine this gate held everyxcl-pso-*worker after#101in 3 of 4 runs, so71b8e6e0cannot get into the world there without it; with it, 2 of 2 runs went through (numbers above and on #846). On Windows it only matters with little free RAM.AI use: Claude Code (Claude Opus 5.5) wrote this comment.
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@oni-swr on GitHub · 2026-11-27 02:31 UTC · original
Tested: native Windows, AMD RDNA3. Both exact SHAs:
8edc0e0315fe9a8f8055b9be3ecdb0873f55c460(this head) and its parent71b8e6e05eddff84b044e0300497f80329a21912(amd-devbase of this PR;amd-devhas since moved on tobf7c82ee, which I did not test).Hardware / build: Radeon RX 7800 XT (16 GB), Adrenalin driver 32.0.31035.1003, Ryzen 8-core, 64 GB RAM, Windows 11 build 26200.9974, Rust 1.100.0 MSVC, release build.
Unit tests (CPU only, head):
cargo test --release -p xcl --lib big_compile -j 4: 15 passed, 1 failed, 0 ignored.big_compile_room_is_free_commit_not_free_rampasses. The failure isgiant_driver_compiles_have_their_own_lane(real.rs:5470, left 3 / right 2), the same as on Wine, so it also fails on native Windows with this PR. The whole suite was not run.Regression run (retail title, 240 s, same settings and warm shader cache for both,
XCL_PREPARE=0, scripted A presses, one run each, run one after the other):Both runs end the same way: an access violation inside the AMD driver (
amdxc64.dll+0xdc5a21, read at 0x138) at about 94 s (base) and 98 s (head). So this head does not regress, but this run does not show whether it helps: the title never reached the point where the big-compile gate matters, there were plenty of free RAM and commit on this machine, and the crash already happens on the base. I can not tell whether the crash is the same as the ones other reports onamd-devdescribe.Not tested: low free-RAM conditions (where this change is meant to matter); repeated runs (one per side, so the 2 s counts are not a statistical result); NVIDIA; the full test suite.
AI use: run and report by Claude Code (Claude Sonnet 5.5).
🤖 Generated with Claude Code
@andrewDoing on GitHub · 2026-11-27 02:38 UTC · original
I reproduced the reported
giant_driver_compiles_have_their_own_lanetest failure on head8edc0e0315fe9a8f8055b9be3ecdb0873f55c460. Its purported invalid hex tokenbadis valid hexadecimal (0xBAD), so the parser returns three hashes where the test expects two. The lane-selection assertions before that point passed.Changing only the fixture token from
badtonot_hexmade the exact test pass (1/1); thebig_compile_testsmodule then passed 16/16, with zero failures or ignored tests. This does not change the production parser or scheduler. The check used native Windows and did not require a GPU.AI use: OpenAI Codex with GPT-6.2 Astra inspected the fixture and ran the comparisons; Codex coordinated and prepared this report.
@GreemSC on GitHub · 2026-11-27 04:23 UTC · original
Closing: ivall ported this into
amd-devas81c04142("Port #2868", same diff:real.rs+18 −5,pso_async.rs+1 −1), now underbf7c82ee.@oni-swr thanks for the RX 7800 XT A/B. Agreed: no regression, and no evidence it helps, since the gate never bound on a 64 GB machine. @andrewDoing thanks.
giant_driver_compiles_have_their_own_laneisn't touched by this PR (the diff has nobadfixture), so thebad→not_hexfix goes againstamd-devitself.A caveat for whoever follows this on
amd-dev: xpatfussy69x showed on #846 (#846) that with a system-managed Windows page file, a gate on free commit can hold big compiles forever. Workers that wait never allocate, so the page file never grows (14 holds in one run with 6–10 GB of RAM free; a fixed 32–64 GB page file fixed it).amd-devnow has the same gate asmain, so the same issue applies there.AI use: Claude Code (Claude Opus 5.5) checked the port and wrote this; I read it before posting.
Pull request closed