Repository navigation
Read the memory before an engine starts only after the calibration's GPU memory is released - #53
Merged
Merged
Conversation
…GPU memory is released The GPU calibration's memory stays wired for about a second after its process ends. On 2026-11-21 that was 2.1 GB: 2.62 GB wired before, 4.73 GB at once, 2.67 GB a second later. memory_at_start was read at once, so it counted that memory as held by the other apps. "Estimated available before launch" read low by it, 2-3.5 GB in the runs, and so did the speed test's baseline for "system taken". The engines themselves start seconds later and do not see it: oMLX's default guard computed its 11.10 GB ceiling after the release. calibrated() runs the calibration and waits until wired memory is back within 0.3 GB of its level before, at most 10 s. The run and the speed test now read their memory after it, and record calibration_release_seconds. Tests: tests/test_calibration_release.py; the suite passes (78). Co-Authored-By: Claude Opus 5.5 <[email protected]>
audenvenn
added a commit
that referenced
this pull request
Nov 21, 2026
…the pi-LoRA page reads low (#54) The maintainer's #85 ①: notes only, no records changed. Both readings were taken the moment solvetime's GPU calibration process had ended, before macOS released the memory that process had used. That memory stays wired for about a second (2.1 GB in a test on 2026-11-21), so "estimated available before launch" reads low: - 27B page: wired memory at launch 5.3-6.5 GB against about 2.4-2.8 GB at idle, so roughly 2.5-4 GB low. The speed table's "Memory taken (system)" counts from the same reading and reads low by about as much. - pi-LoRA page: roughly 3-3.7 GB low. The four runs carry about the same offset, so their order stands. The anonymous-memory readings are not affected, and the engines started seconds after the release. solvetime #53 now reads the memory after the release. The 35B page predates the per-run reading (#27); its own calibration defect is already described on it. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GPU calibration's memory stays wired for about a second after its process ends. On 2026-11-21 that was 2.1 GB: 2.62 GB wired before, 4.73 GB at once, 2.67 GB a second later.
The problem:
memory_at_startwas read at once, so it counted that memory as held by the other apps. Two figures read low by it, 2–3.5 GB in the runs:The engines start seconds later and don't see it: oMLX's default guard computed its 11.10 GB ceiling after the release.
The fix:
calibrated()runs the calibration and waits until wired memory is back within 0.3 GB of its level before, at most 10 s. The run and the speed test now read their memory after it, and recordcalibration_release_seconds.Published pages: not changed here; whether to correct the earlier rounds' figures is the maintainer's call.
Tests:
tests/test_calibration_release.py; the suite passes (78).🤖 Generated with Claude Code