coli: --auto-tier applies the plan's VRAM tier on sibling engines, and says why when it cannot (#1581) - #1582
Merged
Merged
Conversation
) `coli plan` and `coli doctor` print a VRAM tier; `--auto-tier` is documented as applying that plan; and then environment_for_plan drops the tier whenever CUDA was not switched on, which `--auto-tier` alone never does. Nothing said so. The drop itself is the contract and stays: --gpu and --vram are what select a CUDA-capable build, and merely asking for a plan must not turn a CPU-only sibling binary into an attempted CUDA launch. The silence was the defect. On the box in #1581 it was the difference between 11.8 and 21 tok/s, with the plan on screen promising the tier that the launch had just discarded. So the launcher now names what it is not applying, how much of it there is, and the flag that would use it. It stays quiet when the tier was not real anyway -- no device qualified to drive placement, or a zero budget -- because a warning that fires on every CPU-only launch is one people learn to scroll past. The notice sits outside the try that wraps plan construction on purpose: it only prints, and a display helper that stumbled inside it would be reported as "invalid resource plan" and take the launch down with it. tests/test_auto_tier_vram_notice.py covers both directions and the malformed plan. It caught a real mistake on the way: GB lives in resource_plan, not in the launcher, so the first version raised NameError on the one path that mattered.
… it (#1581) `coli plan` and `coli doctor` print a VRAM tier. `--auto-tier` is documented as applying the plan they print. On the sibling-engine path it then dropped the tier whenever COLI_CUDA was not already "1", which `--auto-tier` on its own never sets, and dropped it in silence: no [PLAN] line, no [CUDA] banner, just half the throughput. On the reporter's RTX 4060 Ti that was 11.8 tok/s against 21.0 once `--gpu auto` was added, found only by watching nvidia-smi. The drop was right once. cuda_binary() could inspect only the GLM binary, so a working qwen36 CUDA build looked CPU-only to it, and requiring an explicit flag was safer than risking a CPU-only sibling launched as a CUDA one. Since #1533 the check takes the engine that will actually run, so the risk that contract was written against can be tested instead of assumed -- and assuming it costs the user the tier they were just shown. So plan_cuda_enabled() now asks the same question the GLM path has always asked (`has_cuda=cuda_binary()`), of the right binary: COLI_CUDA=1 --gpu/--vram already validated the build; take it at its word COLI_CUDA=0 --gpu none is still the off switch otherwise ask the family's engine, and DeepSeek V4 its own probe, because cuda_binary() rejects valid V4 CUDA builds (#1219) A CPU-only build still never gets a CUDA launch: that is now what the check says rather than what the flag assumed. The notice stays, for the two ways a real tier can still go unused, and says which one happened -- "drop --gpu none" and "rebuild with CUDA=1" are not interchangeable advice. It stays quiet when no device qualified to drive placement or the budget was zero, since neither was going to be applied with the GPU on either. The call sits outside the try that wraps plan construction: it only prints, and a display helper that stumbled inside it would be reported as "invalid resource plan" and take the launch down with it. tests/test_auto_tier_vram_notice.py covers the decision in both directions (a GPU build gets the tier without a flag; a CPU-only build does not; --gpu none beats a GPU build; an explicit --gpu is taken at its word without a second probe; V4 uses its own probe) and the notice's two messages and its silences.
JustVugg
force-pushed
the
fix/auto-tier-vram-notice
branch
from
September 17, 2026 12:39
b7526bf to
28959fa
Compare
Edo771977
added a commit
to Edo771977/colibri
that referenced
this pull request
Sep 17, 2026
- c/coli: ask about the accelerator LAST. JustVugg#1582 lets --auto-tier turn the VRAM tier on from the built binary alone, after the --gpu/--vram block, so the Windows hot-team defaults were seeded for launches that do use the GPU -- exactly what their own comment forbids. Moved the block to the end of env_for_engine, with a test that fails without the move. - c/compat.h: compat_fadvise waited on a pending warm-up read through an OVERLAPPED with no hEvent, i.e. on the file handle, which a shared fd signals for ANY completed read; it could return while this read was still in flight and then free the buffer. It now goes through compat_read_at and its per-thread event (helpers moved above it), which also resets the event before each read instead of relying on ReadFile doing it. - ISTRUZIONI.md: current hardware (64 GB at 5200, SSD in M.2_3 at Gen4 x4, BIOS 3881), the measured numbers, and the reordered open items. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Edo771977
added a commit
to Edo771977/colibri
that referenced
this pull request
Sep 18, 2026
Integrazione dev + JustVugg#1582 auto-tier VRAM + JustVugg#1580 build Windows CUDA + JustVugg#1588 + tetto RAM_GB qwen36
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.
Closes #1581.
What the report found
coli planandcoli doctorprint a VRAM tier.--auto-tieris documented as applying the plan they print ("automatically apply the RAM/VRAM placement plan", docs/SETTINGS.md). On the sibling-engine path it then dropped the tier wheneverCOLI_CUDAwas not already1, which--auto-tieron its own never sets, and dropped it in silence: no[PLAN]line, no[CUDA]banner, VRAM flat during decode. On the reporter's RTX 4060 Ti that was 11.8 tok/s against 21.0 once--gpu autowas added, and they only found it by watchingnvidia-smi.What changed since the first version of this PR
The first version kept the drop and only announced it. That was the weaker half of the report's own suggestion, and it leaves the user where they started: half the throughput, now with a message about it.
The drop was right when it was written.
cuda_binary()could inspect only the GLM binary, so a working qwen36 CUDA build looked CPU-only to it, and requiring an explicit flag was safer than risking a CPU-only sibling launched as a CUDA one. Since #1533 the check takes the engine that will actually run, so the risk that contract was written against can be tested rather than assumed, and assuming it costs the user the tier they were just shown.plan_cuda_enabled()now asks the question the GLM path has always asked (has_cuda=cuda_binary()), of the right binary:COLI_CUDA=1--gpu/--vramalready validated the build and exited if it was not capableCOLI_CUDA=0--gpu noneis still the off switchcuda_binary(engine_for_gpu_check(a)), anddsv4_cuda_availablefor DeepSeek V4, becausecuda_binary()rejects valid V4 CUDA builds (#1219)A CPU-only build still never gets a CUDA launch. That is now what the check says, rather than what the flag assumed.
The notice stays, and says which of the two happened
There are two ways a real tier can still go unused, and the advice for them is not interchangeable:
and for
--gpu none, "drop it to use the plan as printed" instead. Telling someone to rebuild an engine when they asked for no GPU sends them to fix something that is not broken.It stays quiet when the tier was not real: no device qualified to drive placement (
plans_placement, the planner's own test) or a zero budget. Neither was going to be applied with the GPU on either, and a warning that fires on every CPU-only launch is one people learn to scroll past.The call sits outside the
trythat wraps plan construction. It only prints, and a display helper that stumbled inside it would be reported asinvalid resource planand take the launch down with it.Verification
tests/test_auto_tier_vram_notice.pycovers the decision in both directions, not just the message:False), and the family's own binary is the one inspected;--gpu nonebeats a GPU build, and needs no probe to decide;--gpuis taken at its word without a second probe that could only disagree with a decision already made;Full suite on this branch rebased onto dev:
python3 -m pytest tests/ -q— 939 passed, 161 skipped, 585 subtests passed.Not verified here: no GPU on the machine this was written on. @troturier offered to test a patch on the reporting box (single 8 GB card, qwen36 and deepseek_v4 CUDA builds) — that is the measurement that would close this properly, since the claim is that
--auto-tieralone now reaches the 21 tok/s that--auto-tier --gpu autoreached.