mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1407] make_game pipelines: after each batch, the share done and the time left, weighted by module size (PIPELINES-ETA) #1435
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1435
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1407
Author: @Diegobecker07
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:pipelines-eta📝 Commits (1)
b26e434make_game pipelines: after each batch, the share done and the time left, weighted by module size (PIPELINES-ETA)📊 Changes
2 files changed (+136 additions, -2 deletions)
View changed files
📝
make_game.py(+36 -2)➕
tests/test_make_game_pipeline_eta.py(+100 -0)📄 Description
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)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.