Skip to content

fix(planner): auto-tune advised colibri.c-only knobs for every engine - #1585

Merged
JustVugg merged 1 commit into
JustVugg:devfrom
kevin9327:fix/planner-tune-colibri-only
Sep 17, 2026
Merged

JustVugg merged 1 commit into
JustVugg:devfrom
kevin9327:fix/planner-tune-colibri-only

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Symptom

coli plan and coli doctor print an auto-tune: block on every model family except GLM-5.3. On all of them except GLM-5.2, each knob in that block is one the engine never reads. --auto-tier exports the same knobs into the engine's environment.

Unfixed dev, Windows, tiny fixtures:

$ coli plan --model qwen36_tiny_c
  ...
  auto-tune:
    DRAFT=0            compute-bound: MTP batch overhead exceeds yield
    COLI_CUDA_PIPE=1            single GPU: S=1 pipeline gate

$ coli plan --model dsv41_tiny          # DeepSeek V4.1 Flash
  ...
  auto-tune:
    DRAFT=0            compute-bound: MTP batch overhead exceeds yield
    PIN_GB=all          enough RAM for full expert residency

A user following that advice sets variables that change nothing. coli tune also starts from those values as its baseline environment.

Root cause

_auto_tune can emit DRAFT, PIPE, COLI_CUDA_PIPE, COLI_NUMA (+ the numactl hint) and PIN_GB. git grep '"<name>"' -- '*.c' '*.h' '*.cu' '*.inc' '*.mm' finds each of the five in c/colibri.c and nowhere else.

58ed660 already hit this for glm53 and excluded it: "glm53 ... does not consume the generic DRAFT/PIPE/PIN/NUMA knobs below. Recommending them is worse than leaving them unset because coli tune then reports changes the engine ignores." The same holds for inkling, kimi_k3, olmoe, qwen36, qwen38, deepseek_v4 and deepseek_v41, and they were not excluded.

Fix

Return no knobs for any engine_group other than colibri-core, the group GLM-5.2 uses. This extends the glm53 exclusion to the other families. GLM-5.2 is unchanged. The engine_group=None default, which only unit tests use, keeps the generic behaviour.

Tests

In c/tests/test_resource_plan.py:

  • test_only_the_colibri_engine_gets_its_own_knobs runs four bottleneck and GPU shapes (disk, resident CPU, one GPU, mixed with two GPUs, on one or two sockets). With colibri-core they emit all five knobs and the hint. Every other engine_group in the registry (read from all_families(), so a new family is covered automatically) gets {}.
  • test_sibling_plan_advises_no_colibri_knob builds a plan for a two-layer OLMoE container and for the GLM fixture already in the test class, with the same resources:
    • GLM still gets DRAFT and PIN_GB.
    • OLMoE gets an empty tune, no auto-tune: block in format_plan, and none of the five keys in environment_for_plan.

Fail-before on unfixed dev:

FAIL: test_only_the_colibri_engine_gets_its_own_knobs (...) (engine_group='deepseek_v4', case=('disk', 0.5))
AssertionError: {'DRAFT': {'value': '0', 'reason': 'low hi[312 chars]sts'} != {}
...
FAIL: test_sibling_plan_advises_no_colibri_knob (...)
- {'DRAFT': {'reason': 'compute-bound: MTP batch overhead exceeds yield',
-            'value': '0'},
-  'PIN_GB': {'reason': 'enough RAM for full expert residency', 'value': 'all'}}
FAILED (failures=29)

That is 7 engine groups × 4 shapes, plus the plan test. The glm53 subtests already passed.

Verification

  • Every test module that touches the planner or its output passes: test_resource_plan, test_doctor, test_cli_output, test_env_defaults, test_openai_server, test_registry_engine_agreement, test_analysis_cache, test_v4_cli, test_autotune, test_cluster_sharding and test_efficiency_report. That is 573 tests, OK (3 skipped), with PYTHONUTF8=1.
  • End to end, Windows, on tiny fixtures built with the repo's generators (make_qwen36_tiny.py + convert_qwen36.py, make_dsv41_tiny.py, make_olmoe_tiny.py + convert_olmoe_merged.py, make_glm_oracle.py):
    • coli plan on qwen36_tiny_c, dsv41_tiny and olmoe_tiny_c prints no auto-tune: block. coli doctor --json reports "tune": {} for all three.
    • glm_tiny still prints DRAFT=0 and COLI_CUDA_PIPE=1, and doctor still reports DRAFT and PIN_GB.

Not in this PR: #1584 fixes the same class of problem in coli tune's candidate sweep.

🤖 Generated with Claude Code

_auto_tune recommends DRAFT, PIPE, COLI_CUDA_PIPE, COLI_NUMA and
PIN_GB. colibri.c is the only reader of all five. glm53 was excluded
for that reason, but every other family still got them: `coli plan`
and `coli doctor` printed them under "auto-tune:", and --auto-tier
exported them into an engine environment that never reads them.

Return no knobs for any engine group other than colibri-core, the
exclusion glm53 already had.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JustVugg
JustVugg merged commit c10978f into JustVugg:dev Sep 17, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants