D3D12.X: prioritize ranked pipeline preloads #3284
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3284"
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?
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T04:41:20Z.
Known pipelines from earlier runs currently compete with up to 4,096 unknown speculative builds during startup. This defers unknown build-ahead while ranked preloads remain queued, then resumes the existing policy unchanged. Part of #1833.
What is in it
build_queue.rs: report whether ranked preload work remains queued, with a focused queue-state test.pso_async.rs: admit unknown build-ahead only after the ranked queue drains, while short-circuiting disabled and low-commit probes, with a policy/evaluation-order test.README.md: document the startup scheduling behavior.Tested
.\scripts\test.ps1on identical-tree commitf60b3cda: 2,610 passed, 0 failed, 49 ignored. 28 passing GPU cases emittedSKIPPEDfor unavailable adapter/features and are not claimed as exercised coverage.4dc371bd(the review fix only short-circuits disabled/low-commit probes) with the same cache and environment: main 815/801/814 frames (810.0 average), PR 816/814/813 (814.3 average, +0.5%). Main built 6,234–6,292 pipelines; PR built 2,238–2,310 (about 64% fewer). Every run had 0 bind-wait ms, 0 crashes and 0 device removals.XCL_PREPARE=0,XCL_COHERENT_MB=4095,XCL_UMA_DRIVER=mixed:1536:1792,XCL_TEXTURE_LEVEL_PAGES=1,XCL_DIRECT_DXIL=1,XCL_SKIP_BINK=non-looping, andXCL_PSO_AHEAD=4096.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-29T04:51:30Z.
A small way to preserve the old disabled path on
4dc371bd: short-circuit at the call site. Passing three evaluated bools to ahead_room_for currently calls GlobalMemoryStatusEx and takes the build-queue mutex to scan jobs even with XCL_PSO_AHEAD=0. Under low commit it also scans a queue whose answer cannot change admission. spawn_backlog_worker calls ahead_room while holding the backlog mutex, before checking for a demanded spared build.I compiled the exact ahead_room and BuildQueue sources, injected a controlled commit result and counted calls to the commit and queue accessors. With a real ranked job queued, one disabled probe made 1 commit query and 1 queue scan on the PR versus 0 and 0 with short-circuiting. Enabled with insufficient commit gave 1 and 1 versus 1 and 0. Enabled with sufficient commit gave 1 and 1 on both and deferred ahead work. Promoting the only ranked job to Foreground resumed admission on both. This measures avoidable calls, not elapsed frame or bind time.
The small change tested was:
A policy test using lazy predicates or call counters can retain the disabled/low-commit guarantee. No GPU or title run. OpenAI Codex traced the caller, ran the CPU control and drafted this comment.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T05:00:44Z.
Addressed in
f60b3cda.ahead_room_fornow takes lazy predicates: disabled build-ahead evaluates neither commit nor queue state, low commit evaluates only the commit predicate, and the ranked-queue scan occurs only after both gates pass. The focused evaluation-order test and the full suite pass; the final 60 s retail-title smoke is also clean.