Repository navigation
Conversation
…ot whole 0481ad6 left a split program's whole forms out of launch preparation unless an earlier run had dispatched it indirectly, because neither whole form is used unless a driver blob or the pipeline library keeps it (off on AMD). That holds for the ABI-root form. The chain-root form is the one dispatch_chain::whole_ready builds at the program's first ExecuteIndirect, and without XCL_CS_PSO_WAIT_MS it builds it on the title's thread. A program used directly in one run and first dispatched indirectly in a later one therefore stops the title in that later run. On an RX 7900 XT the retail title's render thread compiled such forms of 590 - 950 KB of DXIL for 16 - 48 s each, one after another, with no frame for minutes; used-indirect-split.txt grew from 22 to 47 programs over four runs as the title reached new parts of its loading. When preparation builds what earlier runs used (the workers' --used-only pass), it now also builds every used split program's whole form under the chain root, the same pipeline whole_ready would build. Programs on used-indirect-split.txt keep their indirect-root builds as before; the ABI-root form stays out. XCL_PREPARE_WHOLE=0 restores the previous set. Measured on this machine, together with the largest-first worker queue (not in this PR): the first launch with it took 1,124 s of compute preparation instead of 310 s, once, while the driver's cache was cold for those forms. In that run the title's thread built no whole form for its first ~1,400 s; it then built four of 730 - 950 KB (30 - 48 s each). Whether those four programs were on the lists preparation worked from was not checked. Assisted-by: Claude Code (Claude Opus 5.5)
|
Review of In short: This PR makes the launch workers' Medium
Nit
Checked and fine
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
Targets
amd-dev:split_buildsand the narrowing it changes exist only there.0481ad6 left split programs' whole forms out of launch preparation unless an earlier run had dispatched the program indirectly. For the ABI-root form that is right on AMD (nothing keeps it). The chain-root form is different:
dispatch_chain::whole_readybuilds it at the program's first ExecuteIndirect, on the title's thread unlessXCL_CS_PSO_WAIT_MSis set. A program used directly in one run and first dispatched indirectly in a later run then stops the title for that compile. On an RX 7900 XT the retail title's render thread compiled such forms of 590 – 950 KB of DXIL for 16 – 48 s each, one after another, with no frame for minutes, run after run as it reached new parts of its loading (used-indirect-split.txtgrew from 22 to 47 programs over four runs). Related: #2794 (merged, built all whole forms), 0481ad6.What is in it
crates/xcl/src/shaders.rs:split_buildstakeswhole_direct: with it, a split program also getsWhole(DirectChain); programs onused-indirect-split.txtkeep their builds as before, and the ABI-root form stays out.precompilesets it in the workers' earlier-use pass (--used-only), unlessXCL_PREPARE_WHOLE=0.prepare_compute(milestone, corpus) is unchanged.split_programs_get_whole_forms_only_where_the_title_takes_themcovers the new set.README.md: the added builds andXCL_PREPARE_WHOLE=0.Tested
cargo test -p xcl --lib shaders:: -- --test-threads=4: 94 passed, 0 failed, 0 ignored; SKIPPEDshaders::tests::pso_measurement_compiles_an_exact_synthetic_record(Developer Mode).Regression run
xcl-smokeblocks (amd-devand this head) follow.smoke.ps1setsXCL_PREPARE=0, so it does not reach this code.Not tested
whole_form_kept()is usually true and the set does not change).AI use