Repository navigation
Tests: pin the host RAM the llama.cpp placement tests launch on - #19283
Merged
Merged
Conversation
#19231 made a pinned (--load-mode none) launch also check that the pinned weights plus llama-server's growth stay under a share of total RAM, read from the real host. The placement tests fake the GPUs and the available RAM but never the total, so on a 16 GB runner the check keeps mmap and 35 tests that expect a pinned launch or the MoE cache fail (staging runs for #19113, #19181, #19244); on larger runners they pass. Pin total RAM to 256 GiB and the cgroup limit to none with an autouse fixture in test_llama_cpp_placement.py, shared with the two files that launch through its helpers. Tests about host RAM still set their own.
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Problem
On runners with 16 GB of RAM, 35 llama.cpp placement tests fail across
(Python 3.13, g-l)and(Python 3.13, m-r). The staging runs for #19113, #19181 and #19244 all show them, for example:They pass on larger runners and locally, so this only shows up on some runners.
Cause
#19231 (price llama-server host RAM growth before pinning a spilled load) is correct. A pinned launch (
--load-mode none) now also checks that the pinned host-side weights plus llama-server's growth stay under a safe share of total RAM. That total comes from_host_memory_capacity_mib(), which reads the realMemTotaland the cgroup limit.The placement tests fake the GPUs and, where they care, the available RAM. They never pin the total, so each launch decided against whatever machine ran it. Reproduced locally by stubbing
_total_system_memory_mibto 15667 MiB: 35 failed, 770 passed in the three files below.Fix
test_llama_cpp_placement.pygets an autouse fixture,_pinned_host_ram. It pinsLlamaCppBackend._total_system_memory_mibto 256 GiB and_cgroup_memory_limit_mibtoNone, so every launch sees the same host on any runner.test_lookup_table_fit.pyandtest_prompt_cache_sized_to_context.pylaunch through that file's helpers, so they import the fixture.Verification
_total_system_memory_mib): 805 passed on this branch, and 35 failed on main.test_llama_cpp_placement: 2365 passed and 24 skipped.test_cached_gguf_routes.py::test_pipeline_class_guard_passes_every_shipped_family.