warm: save the pipeline library during the warm-up, every N seconds (LEONIDA_PRELOAD_SAVE_EVERY) #3446
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!3446
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/warm-save-every"
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?
Pull request successfully merged and closed
Change
warm --storewrote the pipeline library only at the end: a warm-up stopped part way (a crash, a closed window, the gate's time limit) lost everything it had compiled, and the next start compiled it again.LEONIDA_PRELOAD_SAVE_EVERY=<seconds>, off by default (absent, 0 or unreadable = the old behaviour; under 30 is read as 30).thread::scopearoundknown::storesaves the library every N seconds with the existinglibrary::save(temporary file then rename, so the final file is never half written). The scope ends before the final write, so the two never write at the same time.nothing to writeorwrite failed(no stale size). The parent reads stdout, so the line also resets its 180 s silence limit; it acts only on lines starting withmade, so the protocol is unchanged.switches.mdregenerated.Same idea as Darner PR #147 (GPL-3.0-or-later), adapted to Mandy's warm-up.
Tests
cargo test --locked -p leonida-gpu -p leonida: pass (new:save_every_is_off_unless_seconds, and the save-loop timing test).python -I tools/d3d12_switches.py --check,python -I tests/test_d3d12_switches.py(22 OK).AI-assisted
Written with Claude Opus 5.5 (Claude Code); reviewed by a separate Claude Opus 5.5 reviewer instance (stderr line nobody read and a stale size in the log line, both fixed).
🤖 Generated with Claude Code
Merging. Not a rendering change (the switch is off by default). Branch updated with main
d78ad89291; the merged tree (5a1dcbe5) is the one tested locally:cargo test --locked -p leonida-gpu -p leonida738 + 62 + 5 passed, 0 failed;tests/test_d3d12_switches.py22 OK. Reviewed by a separate reviewer instance (accepted; two medium points fixed). AI-assisted (Claude Opus 5.5).