make_game pipelines: after each batch, the share done and the time left, weighted by module size (PIPELINES-ETA) #1407
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1407"
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?
Imported from ubiquitarianism/leonida. Originally posted by Diegobecker07 on 2026-11-24T23:34:51Z.
Claimed in the coordination issue as: PIPELINES-ETA (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147477749)
What and why
The pipelines stage of
make_game.pylogged onlypipelines: checking shaders N-M of T in a fresh processper batch. Its batches of 500 modules take from seconds to half an hour, so a multi-hour stage gave no idea of when it would end; on my run every guess from the batch count came out hours early.After each batch it now logs the shaders checked, the share of the estimated compile time behind them and the time left at the pace so far:
A module's estimated cost is its SPIR-V size in MB to the power
PIPELINE_COST_EXPONENT(1.5), because a large module compiles disproportionately slower than a small one. The estimate only feeds this log line; the batching, the crash recovery and what runs are unchanged. A stopped batch (setup error, interrupt) logs no progress line. A run whose checker can't take ranges keeps one batch and no line, as before.Measurement
One full-corpus run on my machine (RTX 5070 Ti, driver 621.24, wave64-emulated translation at
82a2aabcc): 41 batches of 500 finished in 2.82 h. The batches were 23-849 MB of SPIR-V and took 16 s to 26 min. Batch times rank with their bytes at Spearman 0.93.Time left predicted after k batches, against the actual time to the end of batch 41:
1.5 is the exponent that stays closest without overshooting: an estimate a little short is less misleading than one that swings by 40%. One run on one GPU is not a model of every driver, so the constant says where it comes from and is easy to retune with more runs.
Tested
tests/test_make_game_pipeline_eta.py(new, 7 tests):pipeline_costs, including a module without its.spv;pipelines()with a scripted checker result and clock, checking the three lines of a 5-module, 3-batch run and that a stopped batch logs nothing.tests/test_make_game_*.py(with the new one),tests/test_leonida_tui.pyandtests/test_text_write_line_endings.py: OK.python -m compileall -q make_game.py tools tests,python -I make_game.py --help,scripts/check_no_game_data.pyon the changed files: OK.mainand with the other openmake_game.pypull requests that touch nearby code, #1337 and #1378.GPUs tested: n/a for this change (the measurement above is from an NVIDIA GeForce RTX 5070 Ti, driver 621.24, Windows 11 Pro 26300)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T09:28:12Z.
Reviewed
b26e434: ran the new tests/test_make_game_pipeline_eta.py on the PR (7 OK) and on main (7 expectedfailures), plus the pipeline batches/pipelines/preflight/interrupt/progress, argparse and docs tests on both
trees (all OK) and make_game.py --help. The PR is based on an older main, but it merges conflict-free and
cherry-picked onto current main still passes the eta, batches and pipelines tests; a stage-level probe shows
the same exit codes as main for all-ok, validation-failing and interrupted batches, with only new progress
lines and sane formats at the edges. No finding.
AI-assisted review.
Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:39:54Z.
Red/green:
pytest tests/test_make_game_pipeline_eta.pyfails on main (7 failed) and passes on headb26e43491fmerged with main (7 passed).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)