Repository navigation
Conversation
|
Review of In short: This PR does three things:
The lookup at creation looks right, but it has no test. The eager "warm" step queues cold compiles of the largest programs while the title loads, and that cost is unmeasured on AMD. High
Medium
Checked and fine
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
Split compute programs whose whole form was compiled by `Chain::whole()` persist their driver blob under the `DirectChain` root signature namespace (`ChainRoot::DirectConstants`), which `translated_compute_pso_once`'s `CachedWhole` lookup missed on later runs. When indirect dispatches queued whole-form promotion, cached blobs also waited behind multi-second cold driver compiles on `xcl-pso-whole`. - Add `ComputeBuild::CachedDirectChain` and `dispatch_chain::try_cached_whole` so `translated_compute_pso_once` reuses `DirectChain`-cached whole PSOs before building split pieces. - Route `queue_whole` through a lightweight `xcl-pso-whole-cache` fast lane that resolves cached blobs without blocking on `xcl-pso-whole` or `huge_compile_turn`, forwarding only misses to the cold worker. - Eagerly warm chains listed in `EARLIER_INDIRECT_USED` during `dispatch_chain::build`. - Add unit and GPU tests covering `ChainRoot::DirectConstants` namespace separation and `try_cached_whole` hit and miss paths. AI-assisted: Antigravity (Gemini 4 Neon)
9f39f73 to
5f0c226
Compare
|
Follow-up review of In short: Since Medium
Checked and fine
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
Summary
Split compute programs whose whole form was compiled by
Chain::whole()store their driver blob under theChainRoot::DirectConstantsroot-signature namespace. On subsequent runs, two bottlenecks delayed whole-form promotion:translated_compute_pso_onceonly checkedComputeBuild::CachedWhole(the standard ABI root-signature namespace), missing cachedDirectConstantsblobs and falling back to building split pieces.queue_whole, already-cached blobs waited in the singlexcl-pso-wholeFIFO queue behind multi-second cold driver compiles andhuge_compile_turn.Changes (
crates/xcl/src/hle/d3d12x/real.rs,crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs, +363 / -18):ComputeBuild::CachedDirectChainanddispatch_chain::try_cached_wholefor cache-only lookup (pipeline library, in-memory blob cache, or disk driver cache) in theDirectConstantsnamespace without entering a cold compile or acquiringhuge_compile_turn.queue_wholethrough a lightweightxcl-pso-whole-cacheworker (4 MiB stack) viadispatch_whole_lanes, installing cached blobs withWholeBuild::install_cachedand forwarding only cache misses toxcl-pso-whole(run_cold_whole).EARLIER_INDIRECT_USEDduringdispatch_chain::build(should_eagerly_warm_whole) so previously seen indirect chains promote before heavy frames instead of queueing at draw time.dispatch_chain::testscoveringWholeBuild::install_cached, fast-lane promotion while the cold worker is blocked,should_eagerly_warm_whole,ChainRoot::DirectConstantsnamespace separation, andtry_cached_whole/ComputeBuild::CachedDirectChainhit and miss paths.Related: #3737 —
#3737targetsamd-dev'ssplit_builds/whole_directpath inshaders.rs, which does not exist onmain. This PR operates onmain'sdispatch_chain/real.rspath so cached whole blobs promote without waiting on cold compiles orhuge_compile_turn.Testing
Tested
621.40, wave32), Intel Core i5-11400F, 32 GB, Windows 11 build 26200, release build.cargo test -p xcl --lib dispatch_chain::tests: 22 passed, 0 failed (baselinemain395405e4full workspace: 3012 passed, 0 failed, 56 ignored, 28 SKIPPED).title 29640639, 60 s viascripts/smoke.ps1, clean worktree at5f0c226514e7eaa19def2dc7d609319fc235ac5evsmain395405e4c0ed814afde0610a724dc96a3af329de):Baseline (
main395405e4):PR head (
5f0c2265):Not tested
title 29640639.amd-devbranch (#3737).AI use
xcl-smoke v1runs are executed directly on local hardware.