Case file — PR #635 "Pass candidate GPUs into filter_world_sizes during planning"
Author: nero- (Jonathan Gutierrez per commit c2ef797; GitHub association CONTRIBUTOR; description names Discord "nero"). Head c2ef797, base main, opened and last updated 2026-11-30, single commit, 2 files, +41/−5. No comments, no reviews, no labels, no CI checks on the head. All line numbers below are at the PR head unless stated otherwise.
Key findings
- Undeclared error-precedence swap. Before the PR,
plan_sizes = params.filter_world_sizes(...)and itsUsageError("no supported tensor-parallel size remains for …")ran before the out-of-range--gpuscheck. After the PR the--gpusindex check runs first and the parameter error second (ignition/planning.py:569-576). Consequence:--gpus 9against a recipe whose parameters leave no world size now reports the GPU-index error instead of the parameter error. Messages are unchanged; only the order is. The description presents this as a pure move of the bounds check and does not mention the precedence change. validate()andfilter_world_sizes()now disagree about GPUs.params.validate(pre_context)at ignition/planning.py:563 still receivesgpus=()(theParameterContextdefault, ignition/parameters.py:130), while the filter called immediately after receives real GPUs (574). A secondvalidatewithgpus=chosen, world_size=len(chosen)runs only on the failure path (582). The description says the validate is "unchanged", which is true, but not that it is now asymmetric with the call next to it.- The hook still cannot see the candidate world size. Neither call site passes
world_size(574, 611-613), so a recipe can filter the set of sizes based on GPUs but cannot reason about a specific size.Plan.parameter_context(planning.py:231-239) by contrast carries both, so later hooks have strictly more context than this one. - Automatic vs explicit planning expose different GPU sets. Automatic passes
tuple(supported); explicit--gpuspasses the exactchosentuple even if some of those devices are unsupported (the unsupported-deviceCapacityErrorat 587-589 fires afterwards). A recipe that gates oncontext.gpustherefore behaves differently on the two paths — exactly the axis the new test exercises (tests/cli/test_planning.py:590-596). - Evidence is one CPU unit test; the motivating multi-host path is not tested here. The description's live 3-node SM121 export / qualification /
flare runvalidation lives in a companion PR inlocal-inference-lab/hyperflare-recipes(DeepSeek V4.1 TP3) that cannot be inspected from this repo. The test uses syntheticplanning.Gpudescriptors in a single flat tuple — no--ranks, no peer topology; the multi-host GPU source (topology_gpu(...)at ignition/cli/serve.py:421) is untouched by the test. The description discloses the synthetic-GPU limitation. - No CI ran on the head ("no checks"), although
.github/workflows/python-cpu.yml:3-33(not opened) runspytest tests/ -qwithCUDA_VISIBLE_DEVICES=""on everypull_request. The author's reported7 passedcannot be verified from here; the file does contain 7def test_functions (tests/cli/test_planning.py:159, 223, 298, 402, 479, 521, 568), consistent with the claim. - No issue, roadmap item, maintainer request or measurement is cited. The need is grounded only in the description and in the author's own recurring SM121/GB10 cross-host TP work (#161, #220, #433, #467). docs/TODO.txt:263-267 (RoCE ring TP2/TP3 qualification) is the nearest adjacent roadmap-ish line and is not referenced.
- The hook is four days old and this is its completion, not a reversal. #545 (merged 2026-11-26) introduced
filter_world_sizesandParameterContext.gpus;gpusjust defaulted to(). #635 plugs that gap and is a direct follow-on. Earlier per-flag capability gating lived in core (#499, #508) and has since leftignition/planning.py— the strongest structural argument for doing this through a recipe hook. - Zero engagement. No human comment, review, reaction, or
flare-autobot"case file opened" comment (unlike #499, #508, #533, #545), so the automatic review pipeline appears not to have run on this PR either.
The change
Plain terms: during planning, Flare picks a tensor-parallel world size, then picks GPUs. Until now the world-size filter ran before the GPU list was resolved, so a recipe filtering world sizes saw an empty context.gpus. The PR resolves supported/chosen GPUs first, then calls the filter with those GPUs attached. Nothing else changes.
Exact shape (ignition/planning.py):
- Removed the old block at 566-569 (old line numbers) — filter call, empty-
plan_sizesUsageError,sizes = " or ".join(...)— from before GPU resolution. - New order:
world_sizes = recipe.checkpoint_tensor_parallel(checkpoint)(565) →supported = [gpu for gpu in gpus if gpu.supported](566) →chosenfromselectedwith the out-of-range--gpusUsageError(568-572) →filter_gpus = chosen if chosen is not None else tuple(supported)(573) →plan_sizes = params.filter_world_sizes(world_sizes, replace(pre_context, gpus=filter_gpus))(574) → empty-plan_sizesUsageError(575-576) → the wholeif chosen is not None:block, i.e.needs N GPUs/ unsupported-GPU errors (578-589) → theelif len(supported) < plan_sizes[0]host-size error (590-591), intact. candidates()(608-614) now passesreplace(pre_context, root=candidate_params, gpus=tuple(supported)).params.validate(pre_context)at 563 is byte-for-byte unchanged.
Test (tests/cli/test_planning.py:568-596, +32/−0): a local CapabilityAwareParams(RecipeParameters) whose filter_world_sizes allows sizes (3,4) when every context.gpus entry has capability (12, 1) (SM121) and only size 4 otherwise; a toy recipe with ranks for TP3 and TP4; four synthetic SM120 GPUs at (12,0) and three synthetic SM121 GPUs at (12,1). Asserts: 4×SM120 automatic → TP4 (591); 3×SM120 with selected=(0,1,2) → CapacityError matching "needs 4" (592-593); 3×SM121 explicit → TP3 (595); 3×SM121 automatic → TP3 (596).
Undone by the change: nothing. The old pre-GPU filter call behaviour survives for recipes that ignore context.gpus; every in-repo filter_world_sizes override ignores it (tests/cli/test_planning.py:81 ToyShardingParameters, tests/cli/test_commands.py:55 FixtureShardingParameters), and there are exactly two call sites, both in planning.py, so the "backward compatible for recipes that ignore context.gpus" claim holds.
The why
No issue in this repository asks for GPU-aware world-size filtering; issue searches on "planning world size GPUs capability recipe" and "filter_world_sizes" return PRs only.
The stated motivation: recipes whose valid TP sizes depend on architecture — cross-host SM121 (GB10) RoCE tensor parallelism versus single-host SM120 PCIe collectives. That distinction recurs throughout the author's own series: #161 (DeepSeek V4.1 TrellisMX TP2 over CX7 RoCE on two DGX Sparks, closed), #220 (DeepSeek V4.1 Flash TP6 with per-rank Engram partitions, merged), #467 (Inkling 2 Mini TP2/TP4, closed and moved to local-inference-lab/hyperflare-recipes#17), #433 (Inkling 2 Mini, merged). docs/TODO.txt:263-267 tracks qualifying the RoCE ring transport beyond GLM-5.3 Flash TP4 to "other recipes, TP2 and TP3", and docs/TODO.txt:349 tracks "Qualify --row-shard-attention on SM121 and multi-host RoCE". Neither is cited.
The code-side gap is visible: SUPPORTED_CAPABILITIES is a fixed tuple (ignition/planning.py:37-38; last extended by #592 on 2026-11-29 to add SM110) and Gpu.supported (52-53) is the only capability signal planning previously let through, apart from the later validate/adjust_* hooks reachable at 469-478 (inside fit()) and 582 (chosen-GPU failure path).
Age of the want: as a general mechanism, 4 days (since #545); as a workload need, months, across the author's DGX Spark series.
Related work
- #545 "ignition: introduce compositional RecipeParameters and dynamic CLI" (merged 2026-11-26, lukealonso) — created the hook. It made planning dispatch
validate,filter_world_sizes,adjust_*through recipe parameters (documented at docs/preparation-development.md:32-36) but leftParameterContext.gpusat its()default (ignition/parameters.py:130) on the pre-GPU path. #635 is the follow-on that fills it in. #545's post-merge Autobot review raised aPreparationManifestkey-shrinkage blocker and parameters-machinery should-fixes; none concernfilter_world_sizes' context, and #635 touches none of them. - #533 "New argument to cap the prepared per-request context" (open, roobyz) — edits the same
plan()prologue and the sameParameterContext/pre_contextarea (adds--request-context/context_target,Plan.prepared_context). Different hook, no textual conflict with #635's hunks in the 563-614 region, but both insert into the same prologue, so whichever lands second needs a rebase. #533 carries a design-review trailer (design-review=2e5b); #635 carries none. - #499 "recipe-declared row-sharded prefill planning and PCIe DMA / RoCE row-shard collectives" (merged 2026-11-24, FujitsuPolycom) and #508 "recipe-declared row-sharded attention planning and PreparationManifest metadata" (merged 2026-11-26) — the previous way capability gating entered planning:
Recipe.row_shard_prefill_world_sizes, restricting automatic GPU selection, and refusing SM103 GPUs per flag. At #635's head there is norow_shardreference left in ignition/planning.py; that gating moved out of core with the recipe split. So #635 generalizes a need that core used to hardcode into the recipe-declared hook — the main structural argument for the approach, and also the reason a reviewer might ask whether the hook needs more context (it still lacksworld_size, finding 3). - #453 "Add a GLM 5.3 recipe for eight tensor-parallel ranks" (open) and #239 "Prepare and serve MiMo V2.6 Flash RL on two DGX Sparks" (merged) touch overlapping files/names but not this hook.
- The external companion (DeepSeek V4.1 TP3 in
local-inference-lab/hyperflare-recipes) is the only known consumer; it cannot be read from here. If it filters oncontext.gpus, the merge ordering is: this PR first (or together with) the recipesuv.lockbump, the same cross-repo pattern as #499/#508/#545.
Recent activity
ignition/planning.py is high-churn maintainer code and changed almost daily before this PR:
- f7d6428f 2026-11-29 kbenkhaled "#592 Add sm110/thor identifiers" — extended
SUPPORTED_CAPABILITIES/SUPPORTED_ARCHITECTURES(planning.py:37-38). - c146d7be 2026-11-29, e80b1f2f 2026-11-29, eee6a9fa 2026-11-29 (USE_NODE_PRIORITY on exported graphs), 9a054b49 2026-11-29 (#608) — other ignition churn in the same window.
- d3d0e783 2026-11-28 Ray Dollete "#212 checkpoint context ceilings and
RecipeParameters.adjust_context" — extended the same parameters/hook machinery #635 plugs into. - 698ee450 2026-11-26 #545 (hook origin), f377dc85 #543, 33ab6df5 #508, d0adb958 #499, 5adb27f2, f3a5b709 #544. tests/cli/test_planning.py moved in the same commits (a39f6777, d3d0e783, 5adb27f2, f3a5b709, 698ee450, f377dc85, 33ab6df5, 27716185).
No commit on main since the PR branched (0a8c20f) touches either changed file, so it is rebase-clean at c2ef797 and main still has the old pre-GPU filter call (planning.py:566 and :609 at main). The growing capability table (#592 added SM110 the day before) is context for the PR's premise: capability questions keep arriving at planning, and the hook is the seam for recipe-side answers.
People
- Author: nero-, a repeat owner of DGX Spark / GB10 / SM121 multi-host tensor-parallel preparation. Merged: #433 (Inkling 2 Mini text, vision, DSpark prep + fused loop kernels), #220 (DeepSeek V4.1 Flash TP6 with per-rank Engram partitions), #219 (Helios Engram partitioned tables). Closed: #518 (
--target-head-quantization), #467 (TP2/TP4, moved to the recipes repo), #161 (TrellisMX TP2). Open issues: #119 (Orbit eviction removesflare download's default store), #118 (DeepSeek V4.1 context-free logits before token 128). Not among the project's priority contributors (@voipmonitor, @original-el8, @lukealonso). Appears in history as "Nero" on e9d509d6 (#433). - Area owners: ignition in the last 180 days is Luke Alonso (267 commits), Martin Vit (119), jasonc (70); tests/cli is Luke Alonso (103), Eugene Rakhmatulin (29), Martin Vit (20). The recent commits on planning.py's parameters machinery are Luke Alonso's (#545, #543), kbenkhaled's (#592) and Ray Dollete's (#212) — realistic reviewers are lukealonso and, for capability semantics, FujitsuPolycom (author of the row-shard capability gating in #499/#508) or PCCessna (#508).
- Engagement: none by anyone so far.
Community
No comments, no reviews, no inline comments, no reactions (pr_comments empty; orientation packet: "Reviews: none yet"). Notably there is also no flare-autobot "A case file has been opened" comment, which #499, #508, #533 and #545 all received within hours of opening — i.e. the automated review pipeline has not produced anything here, matching the missing CI. The description's "Discord: nero" is the only other channel named, the same handle as on #220, #433 and #467, so discussion may be happening off-GitHub. For comparison, #508 (+281/−21), #499 (+1546/−191) and #533 (+79/−31) all drew Autobot reviews whose blockers were mostly about evidence, metadata recording and doc truthfulness — the same classes of question this PR could attract.
Project fit
Where it lines up:
- Charter line 12 — "Keep the runtime small and model-agnostic. Ignition writes the recipes that handle model computation … shouldn't accumulate per-model branches": #635 adds no model branch; the policy lives in a recipe
RecipeParameterssubclass through the existing hook, and tests/preparation/test_core_boundary.py:39-67 (not opened) keeps core recipe-free. AGENTS.md:382-396 places official recipes inlocal-inference-lab/hyperflare-recipes, where the consumer lives. - Charter line 21 (prepare/serve on SM103, SM120, SM121) and "Support single-host and cross-node serving": the motivating GB10/SM121 cross-host vs SM120 PCIe case is inside the stated goals.
- AGENTS.md:72-140 four-part description (why / what changed / claimed benefit / evidence + limitations) is followed in order and names the untested part.
- docs/preparation-development.md:32-36 already says planning invokes
validate,filter_world_sizes,adjust_*; making the hook usable is consistent with the docs. No doc was updated, and no doc is made false (none states whatcontext.gpusholds at filter time).
Where it does not line up (facts):
- Charter "What gets merged" — PRs addressing a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs: #635 cites none of these.
- Charter review standard "Supported matrix & compatibility: check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target": the change touches the planning prologue for every recipe on every capability in
SUPPORTED_CAPABILITIES(SM87/103/110/120/121, planning.py:37-38), while the test covers only single-host synthetic SM120/SM121. - No design sign-off trailer (
Design-Signed-Off-By/design-review=…), unlike #499 and #533. AGENTS.md:376-381 approval is not triggered here, since this adds no captured-graph op.
Claims and evidence
| Claim | Backing | Status |
|---|---|---|
CUDA_VISIBLE_DEVICES="" pytest -q tests/cli/test_planning.py → 7 passed, 0 failed |
Author's statement; not run here | Unverified. No CI on head; the file does have exactly 7 test functions (tests/cli/test_planning.py:159, 223, 298, 402, 479, 521, 568), consistent |
New test covers automatic and explicit --gpus planning across SM120 and SM121 |
tests/cli/test_planning.py:590-596 | Verified in the diff; four assertions on synthetic Gpu tuples, no hardware |
filter_world_sizes now receives GPUs on both call sites |
planning.py:574, 611-613 | Verified in the diff |
Pre-GPU params.validate(pre_context) and out-of-range --gpus error behaviour unchanged |
planning.py:563, 569-571 kept verbatim | Verified for messages and calls; but their relative order with the empty-plan_sizes UsageError changed (finding 1) |
Backward compatible for recipes that ignore context.gpus |
Both in-repo overrides ignore it (tests/cli/test_planning.py:81, tests/cli/test_commands.py:55); no signature/default/manifest/CLI change | Verified |
| Cross-host SM121 GB10 RoCE TP vs single-host SM120 PCIe collectives is the real need | Only the description and the author's prior PRs (#161, #220, #467) | No in-repo evidence; multi-host --ranks/topology path untested (serve.py:421 feeds peer GPUs) |
| Live 3-node SM121 export/qualification/serving validated the hook | Companion PR in an external repo | Not inspectable from here; description discloses that this is where the hardware validation sits |
Reach
- Blast radius: every
ignition export,debug-serve,benchandplanpath goes throughplan()(ignition/cli/preparation.py:70-79, ignition/cli/serve.py:422-431, ignition/cli/bench.py:187-188 (not opened)). All recipes and all supported capabilities pass through the reordered prologue. - No user-facing surface: no CLI flag, default, manifest field, schema, dependency or doc changed. The only user-visible difference is the error-precedence swap for inputs that would fail either way (finding 1).
- Recipe authors: the hook becomes architecture-aware; behaviour now differs between automatic and explicit
--gpus, and under multi-host planningcontext.gpuscomes from peer topology (serve.py:421) rather than local NVML. A recipe filtering oncontext.gpusalso cannot seeworld_size, so it can only prune the set. - Tests/maintainers: in-repo overrides need no change; no fixture depends on
context.gpusbeing empty (the neighbouring SM103 rejection in tests/cli/test_planning.py:105 readscontext.gpusinsidevalidate, which still gets it viafit()at planning.py:469-478 and via 582). - Deployment/cross-repo: must land before (or with) the companion recipes PR;
AGENTS.md:382-396and tests/preparation/test_core_boundary.py:39-67 (not opened) keep the model-specific policy out of this repo.
Process
- Open, marked ready for review, opened and last updated 2026-11-30 (age: same day as this case file). One commit (c2ef797, author Jonathan Gutierrez), 2 files, +41/−5 (ignition/planning.py +9/−5; tests/cli/test_planning.py +32/−0), no docs, no Rust, no schema.
- No labels; no reviews; no comments; no CI checks on the head even though
.github/workflows/python-cpu.yml:3-33(not opened) runs the CPU suite onpull_request— the absence looks like a trigger/fork condition rather than a missing workflow, but it is unexplained. - No design sign-off, no maintainer request, no issue reference, no linked reproduction.
- Rebase-clean: no main-side changes to either file since 0a8c20f.
Open questions / what could not be found
- Why no CI check ran, and whether the author's
7 passedwas withCUDA_VISIBLE_DEVICES=""locally — not determinable from the repository. - The companion
hyperflare-recipesDeepSeek V4.1 TP3 PR (the only real consumer and the only live SM121/multi-host evidence) is external and was not read. - Whether the error-precedence swap is intentional or incidental; nothing in the description or code comments says.
- Whether multi-host planning (
--ranks, topology-derived GPUs from ignition/cli/serve.py:421) benefits from and correctly exercises the new argument; no test covers it. - No issue, TODO entry or maintainer request was found that asks for GPU-aware world-size filtering; the only rationale in the repo is the PR description plus the author's prior SM121 TP work.
- Nothing was found in the charter or roadmap that contradicts the change; nothing found that asks for it either.