gate: summary.json gets the run's memory peaks (D3D12-GATE-MEMORY-PEAKS) #2810
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2810"
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 TheGeogeo on 2026-12-01T00:33:04Z.
Claimed in the coordination issue as: D3D12-GATE-MEMORY-PEAKS (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7296394544)
What and why
Testers asked for memory figures in the gate's
summary.json(#2782): without them they cannot use the gate daily. A memory pile-up has also taken a 3090's Windows down twice. This is the first of three PRs: the peaks here, then a safety stop, then a time series.tools/game_gate.pynow reads two lines the runtime already writes every 5 s in builds with diagnostics (the gate's builds):memory: N MB private (...; the PC has ... MB free and ... MB left to commit));video memory as the system counts it, ...: the card's own: budget ... MB, in use ... MB, ...). This is DXGI's count for the process, so it works on any card.From them it writes a
memoryblock:A build without diagnostics gives
source: nulland no peaks. The five runtime strings it reads join the contract test, so a reworded line fails the test.docs/game_gate.mddescribes the block.Tested
On Windows 11 Pro 10.0:
tests/test_game_gate.py: 23 tests OK. The two new ones (peaks and times from synthetic lines, including time over budget; no lines gives nulls) fail withmain'sgame_gate.py.The contract test finds the new strings in
copystat.rsandhost.rs.The docs tests and
scripts/check_no_game_data.pyon the changed files are clean.On a real run: I re-summarized a copy of a 124 s gate run from this week's ABBA validation (RTX 3080 10 GB, driver 32.0.16.2140, Series S profile). The block read 37 memory lines:
A separate sampler on that run saw private bytes of 23 to 24 GB.
nvidia-smishowed 7.4 to 7.8 GB, because it counts the whole card.GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 32.0.16.2140
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 OreoFR on 2026-12-01T00:35:53Z.
Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12, head
f806537a8, mainb7a1be296. CPU only, no game.MEASURED
tests/test_game_gate.py): 2 failed, 21 passed. The failures are the two new tests,test_memory_peaks_come_from_the_runtimes_memory_linesandtest_a_build_without_memory_lines_gives_no_memory_peaks.READ IN CODE
SOURCESsays they are:memory: … MB private (… MB of it in memory; the PC has … MB free and … MB left to commit); host copies…atleonida-gpu/src/copystat.rs:860-861;h.log_video_memory("with the memory line")atcopystat.rs:752;video memory as the system counts it, …: the card's own: budget … MB, in use … MBathost.rs:13641.The contract test that passes on green covers the rest.
memory_block()returns all-Nonewithsource: Nonewhen a run has no memory lines (a build without diagnostics). That is the second new test.vram_over_budget_sadds up each video line's interval to the next one while in-use is above budget. The last line has no successor, so time over budget after the final line isn't counted. That's at most one 5 s step, and it's fine for a peak summary; just worth knowing when reading short runs.ASSUMED
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T01:17:59Z.
Verified on Windows, with the control that matters: the tests fail when the change is reverted.
Cherry-picked onto
maind920d850din a clean worktree, Python 3.13.14:python -m pytest tests/test_game_gate.py -q with this pull request: 23 passed with tools/game_gate.py from main: 2 failedSo the new tests are tied to the change and not to each other's fixtures. No part of this needed a GPU, a display or game data, which is what the gate tests are built for.
What I could not test: the script against a real run folder -
game-abba.ps1drives one, and this machine has the game but not the gate harness the other contributors used, so the shape is proven and the run is not.AI-assisted: yes - DeepSeek v4.1 (flash), applied and ran both arms on the machine above.
Written with an AI assistant.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T06:44:57Z.
Merging. Head
f806537a8merges cleanly withmainaefb25084and does not force a rebase of #2566. CI green on this head. Red/green by OreoFR (macOS) and fiestorra (Windows) on it; I ran it on main + PR (Windows, Python 3.14): 23 tests OK, the two new ones error without the change, docs tests OK. A parser of the runtime's own memory lines: nothing in the game changes, no in-game run needed. Merged by MoonEyes.AI-assisted (Claude Code).