Repository navigation
Conversation
|
Review of In short: Stacked on #3754 (its first commit is #3754's head); only the top commit High
Medium
Nit
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)
Reduce split indirect compute overhead while whole forms compile and allow opt-in parallel whole-form builds: - Write an 8-byte-aligned u64 active flag (`CHAIN_PREDICATE_AT = 48`) inside each 256-byte `INDIRECT_SLICER` round record (sharing `D3D12_RESOURCE_STATE_PREDICATION == D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT`, zero extra buffer bytes or state transitions). - Predicate rounds `r >= 1` in `record_dispatch_chain_indirect` with `D3D12_PREDICATION_OP_EQUAL_ZERO` whenever the command list has no active title predication, clearing predication unconditionally via an RAII drop guard. - Hook native console `SetPredication` (slot 31 -> PC slot 55) in `real.rs` / `list_x.rs` so `list_x::has_active_predication` tracks both native `SetPredication` and `SetPredicationBufferX` and never overwrites or clears title predication. - Skip the redundant barrier before round 0 piece 0 (already flushed by `record_indirect_slicer`), narrow inter-round boundaries (`r >= 1 && i == 0`) to `UAV(Some(scratch))`, and keep global `UAV(None)` between split pieces of the same round (`i != 0`). - Replace the single FIFO `xcl-pso-whole` thread with a bounded priority `WholeColdPool` (`xcl-pso-whole-*`, default `1` worker so peak commit stays flat, opt-in `XCL_WHOLE_WORKERS=2..4` or `auto` with 1.5 GiB commit headroom gating, documented in `README.md`). Live skipped (`whole_ready`) and live indirect dispatches compile at high priority ahead of speculative eager warms. AI-assisted: Antigravity (Gemini 4 Neon)
51b4b7a to
c301c1e
Compare
|
Follow-up review of In short: Stacked on #3754 (reviewed there); only the top commit
The new hook adds a small regression for a title that switches between native Medium
Checked and fine
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
Stacked on #3754 (Depends on #3754,
5f0c226514e7); only the top commit belongs here.Summary
Reduce split indirect compute overhead while whole forms compile and allow opt-in parallel whole-form builds (
README.md,crates/xcl/src/gpu/recomp/pso.rs,runner.rs,crates/xcl/src/hle/d3d12x/list_x.rs,pso_async.rs,real.rs,real/dispatch_chain.rs, +566 / -84):SetPredication(pso.rs,runner.rs,list_x.rs,real.rs): Write an 8-byte-alignedu64active flag (CHAIN_PREDICATE_AT = 48) inside each 256-byteINDIRECT_SLICERround record (sharingD3D12_RESOURCE_STATE_PREDICATION == D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT, zero extra buffer bytes or state transitions). Predicate roundsr >= 1inrecord_dispatch_chain_indirectwithD3D12_PREDICATION_OP_EQUAL_ZEROwhenever the list has no active title predication, clearing predication unconditionally via an RAII drop guard. Hook native consoleSetPredication(slot 31 -> PC slot 55) solist_x::has_active_predicationtracks both nativeSetPredicationandSetPredicationBufferXand never overwrites or clears title predication.pso.rs): Skip the redundant barrier before round 0 piece 0 (already flushed byrecord_indirect_slicer), narrow inter-round boundaries (r >= 1 && i == 0) toUAV(Some(scratch))(disjoint slabs share onlyscratch), and keep globalUAV(None)between split pieces of the same round (i != 0) so intra-round UMA/descriptor-heap UAV hazards remain sound on multi-round dispatches.WholeColdPool(dispatch_chain.rs,pso_async.rs,README.md): Replace the single FIFOxcl-pso-wholethread with a bounded priority pool (xcl-pso-whole-*, default1worker so default peak commit stays flat, opt-inXCL_WHOLE_WORKERS=2..4orautowith 1.5 GiB commit headroom gating, documented inREADME.md). Live skipped dispatches (whole_ready,high = true) and live indirect dispatches compile at high priority ahead of speculative eager warms while preserving thexcl-pso-whole-cachefast lane from D3D12.X: fast-lane cached whole PSOs and warm indirect split chains #3754.SetPredication+SetPredicationBufferXtracking, GPU-written slicer predicates, priority ordering, commit-headroom throttling, and panic survival.Testing
Tested
621.40, wave32), Intel Core i5-11400F, 32 GB, Windows 11 build 26200, release build.cargo test -p xcl --lib slab_tests: 6 passed, 0 failed;dispatch_chain::tests: 25 passed, 0 failed;set_predication_buffer_state_transitions_and_lifecycle: 1 passed, 0 failed (baselinemain395405e4full workspace: 3012 passed, 0 failed, 56 ignored, 28 SKIPPED).title 29640639(XCL_WHOLE_WORKERS=4): promoted up to625split indirect chains towhole, collapsingWave32Top-60 GPU time 25x–49x (zero Wave32-EI split chains remaining in Top-25); standalonec301c1e6default-config (XCL_WHOLE_WORKERS=1) 60 s smoke viascripts/smoke.ps1below.Regression run
main (
395405e4):PR (
c301c1e6):Not tested
XCL_WHOLE_WORKERS=2..4/autois opt-in and was not enabled in the defaultscripts/smoke.ps1regression run above (default runs with 1 worker; multi-worker pool behavior was exercised in unit tests and combined-stack runs).title 29640639.AI use
xcl-smoke v1runs are executed directly on local hardware.