Explore report · NVIDIA/hyperflare-inference #635

Raw Markdown for agents: https://autobot.eidonix.com/p/5117ddcf-2af9-45c1-b267-d3e5503f27a7.md

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

  1. Undeclared error-precedence swap. Before the PR, plan_sizes = params.filter_world_sizes(...) and its UsageError("no supported tensor-parallel size remains for …") ran before the out-of-range --gpus check. After the PR the --gpus index check runs first and the parameter error second (ignition/planning.py:569-576). Consequence: --gpus 9 against 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.
  2. validate() and filter_world_sizes() now disagree about GPUs. params.validate(pre_context) at ignition/planning.py:563 still receives gpus=() (the ParameterContext default, ignition/parameters.py:130), while the filter called immediately after receives real GPUs (574). A second validate with gpus=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.
  3. 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.
  4. Automatic vs explicit planning expose different GPU sets. Automatic passes tuple(supported); explicit --gpus passes the exact chosen tuple even if some of those devices are unsupported (the unsupported-device CapacityError at 587-589 fires afterwards). A recipe that gates on context.gpus therefore behaves differently on the two paths — exactly the axis the new test exercises (tests/cli/test_planning.py:590-596).
  5. 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 run validation lives in a companion PR in local-inference-lab/hyperflare-recipes (DeepSeek V4.1 TP3) that cannot be inspected from this repo. The test uses synthetic planning.Gpu descriptors 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.
  6. No CI ran on the head ("no checks"), although .github/workflows/python-cpu.yml:3-33 (not opened) runs pytest tests/ -q with CUDA_VISIBLE_DEVICES="" on every pull_request. The author's reported 7 passed cannot be verified from here; the file does contain 7 def test_ functions (tests/cli/test_planning.py:159, 223, 298, 402, 479, 521, 568), consistent with the claim.
  7. 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.
  8. The hook is four days old and this is its completion, not a reversal. #545 (merged 2026-11-26) introduced filter_world_sizes and ParameterContext.gpus; gpus just 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 left ignition/planning.py — the strongest structural argument for doing this through a recipe hook.
  9. 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):

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.

Recent activity

ignition/planning.py is high-churn maintainer code and changed almost daily before this PR:

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

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:

Where it does not line up (facts):

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

Process

Open questions / what could not be found