Repository navigation
Pipeline library: keep pipelines whose static samplers were primed; quick ones leave the slow list - #1114
Pipeline library: keep pipelines whose static samplers were primed; quick ones leave the slow list#1114mrp1no wants to merge 1 commit into
Conversation
…nd drop quick ones from the slow list Pipelines with static samplers never went into the library (7fa0e95): a pipeline loaded in another process read through the samplers at its places in that process's driver table. Since the samplers of the list are made first in one order (`samplers::prime`), those places are the same in every process. On an RTX 3060 (driver 621.40) the driver's own cache did not find these pipelines either: about 1,100 were made at every start, 2.2 s each (median), 4.5 minutes at 3.5 fps in the world. - A pipeline whose static samplers were all made by `prime` is loaded from and stored in the library, under a name that holds their places. Samplers met later in a run may come after the layer's own (composite, tiles): pipelines with them are made as before, and kept from the next start on. VICTORY_LIBRARY_STATIC_SAMPLERS=0 keeps none (as before), =1 keeps all (as before 7fa0e95). - A pipeline listed as slow that comes in under SLOW_MS (loaded from the library) leaves slow-pipelines.txt: listed, it waited behind the quarter of the workers slow ones may have at every start. lut3d_probe on the RTX 3060: stored and loaded with the same ten samplers made first, 64 of 64 samples filtered; loaded after ten others, 0 of 64 (the fault 7fa0e95 avoids). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reproduced the restart improvement on an RTX 5070 Ti 16 GB (621.24), i5-14600KF, Windows 11. I applied I copied the same warmed translation cache, 122,698,558-byte host pipeline library and static sampler list into two separate launch states. The two states had their own fresh driver caches. The executable and copied prologue save were identical. Enabled means the conservative default, and disabled sets
The office and complete face rendering were visible in both arms. One restart per arm on this machine, so the result is specific to this warmed-cache launch and says nothing about steady-state FPS. |
|
I compared the patch at I launched the patched build twice and timed loading the same way as on the baseline. I saw no noticeable difference in loading time across those two launches. |
What happens
Pipelines with static samplers never go into the pipeline library (7fa0e95): one loaded in another process read through the samplers at its places in that process's driver table. They are made at every start, and on this PC the driver's own cache does not find them:
host pipeline library saved bytes=0 ... made=1102 loaded=960at every start (same build, same settings).slow-pipelines.txt: 651 keys, 2.2 s median, 5.5 s p90.Since then
samplers::primemakes the samplers ofstatic-samplers.txtfirst, in one order, in every process, so their places are the same everywhere.lut3d_probeon the RTX 3060 (64 samples each):SHIFT=10(the fault 7fa0e95 avoids)SHIFT=10(what the primed order gives)What this changes
primeis loaded from and stored in the library. Its name holds their places, so a list made again in another order finds none of the pipelines stored before.compose,tiles,indirect). Pipelines with those are made, as now, and stored from the next start on, onceprimehas made them.VICTORY_LIBRARY_STATIC_SAMPLERS=0keeps none, as now;=1keeps all, as before 7fa0e95.SLOW_MS(now: loaded from the library) leavesslow-pipelines.txt. Listed, it still waited behind the quarter of the workers slow ones may have (make::slow_limit), two at a time here.Measured (same PC, same save, prologue's cell)
VICTORY_PIPELINE_SLOW=0, which part 2 makes unneeded once the list is cleaned)Tests
pipeline::library::tests::primed_static_samplers_keep_the_library_under_their_places(new): kept only with places; the places are in the name; nothing changes for pipelines without them.pipeline::library::tests::a_slow_pipeline_that_comes_quickly_leaves_the_slow_list(new).pipeline::library::tests::pipelines_with_static_samplers_skip_the_library: unchanged, for the unprimed case.cargo test -p victory-gpu --lib -- pipeline::: 27 passed.cargo clippy -p victory-gpu --all-targets: only theshadow.rswarning that main has.Not tried: other cards. The probe only checks the driver's sampler table, and the reasoning holds wherever
primeruns first.🤖 Generated with Claude Code