Repository navigation
Conversation
|
A case file has been opened for 635. Future reviews will auto-run 90 minutes after code updates are pushed.
|
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Changes RequestedThe layering is right — resolving candidate GPUs before
Walkthrough
Merge Risk: Low · up to
|
Before this change, `ignition.planning.plan()` called `params.filter_world_sizes(world_sizes, pre_context)` with `pre_context.gpus == ()` both when computing `plan_sizes` and inside `candidates()`. Recipes whose valid tensor-parallel world sizes depend on GPU architecture—such as cross-host SM121 RoCE tensor parallelism versus single-host SM120 PCIe collectives—could not inspect `context.gpus` during world-size filtering, even though `fit()` already populates `context.gpus`. Resolving `supported` and `chosen` GPUs—and validating that explicitly selected GPUs have supported architectures—ahead of `filter_world_sizes()` exposes the same GPU metadata to world-size filtering without changing `RecipeParameters` signatures, introducing model-specific logic into `ignition.planning`, or turning unsupported-hardware `CapacityError` (exit 4) into a misleading parameter `UsageError` (exit 2). In `ignition/planning.py`, built `supported` directly as a tuple, moved explicit `--gpus` bounds checks and the `if not gpu.supported:` `CapacityError` check ahead of `params.filter_world_sizes()`, passed `replace(pre_context, gpus=filter_gpus)` where `filter_gpus` is `chosen` when explicitly selected or `supported` otherwise, and passed `replace(pre_context, root=candidate_params, gpus=filter_gpus)` inside `candidates()`. Documented the `context.gpus` and `context.world_size` contract on `ParameterGroup.filter_world_sizes` in `ignition/parameters.py`. Added `test_filter_world_sizes_receives_selected_or_supported_gpus` to `tests/cli/test_planning.py` reusing `_recipe()` and `_gpu()` to cover automatic and explicit `--gpus` planning across SM120, SM121, and unsupported SM90 GPUs. Recipes can now gate valid tensor-parallel world sizes on GPU capability during both automatic and explicit `--gpus` planning while preserving hardware `CapacityError` classification for unsupported GPUs and backward compatibility for recipes that ignore `context.gpus`. Validated with `CUDA_VISIBLE_DEVICES="" pytest -q tests/cli/test_planning.py tests/cli/test_commands.py tests/cli/test_parameters.py tests/cli/test_gpu_discovery.py` (29 passed, 0 failed), covering automatic and explicit `--gpus` selection across SM120, SM121, and unsupported SM90 GPUs. Limitation: these unit tests run on CPU with synthetic `Gpu` descriptors; live 3-node SM121 export and `flare run` serving validation using this hook are provided in `local-inference-lab/hyperflare-recipes#103`. Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b Signed-off-by: Jonathan Gutierrez <phialpha0@gmail.com>
c2ef797 to
3c3c4df
Compare
|
Addressed all review items from the Autobot report:
Re-verified |
Autobot ReviewFull Review · Value Proposition · Case File Recommendation: Ready To MergeThe Round 1 should-fix and cleanup items are cleanly addressed at head
Walkthrough
Merge Risk: Low · up to
|
Why this change is needed and why this approach
Before this change,
ignition.planning.plan()calledparams.filter_world_sizes(world_sizes, pre_context)withpre_context.gpus == ()both when computingplan_sizesand insidecandidates(). Recipes whose valid tensor-parallel world sizes depend on GPU architecture—such as cross-host SM121 (GB10) RoCE tensor parallelism versus single-host SM120 PCIe collectives—could not inspectcontext.gpusduring world-size filtering, even thoughfit()already populatescontext.gpus.Resolving
supportedandchosenGPUs—and checking that explicitly selected GPUs have supported architectures—ahead ofparams.filter_world_sizes()exposes the same GPU metadata to world-size filtering without changingRecipeParameterssignatures, introducing model-specific logic intoignition.planning, or turning an unsupported-hardwareCapacityError(exit 4) into a misleading parameterUsageError(exit 2).What changed
ignition/planning.py: constructedsupporteddirectly as a tuple, moved explicit--gpusbounds checks and theif not gpu.supported:CapacityErrorcheck ahead ofparams.filter_world_sizes(), passedreplace(pre_context, gpus=filter_gpus)wherefilter_gpusischosenwhen explicitly selected orsupportedotherwise, and passedreplace(pre_context, root=candidate_params, gpus=filter_gpus)insidecandidates(). Pre-GPUparams.validate(pre_context)and out-of-range--gpuserror behavior are unchanged.ignition/parameters.py: documented thecontext.gpusandcontext.world_sizecontract onParameterGroup.filter_world_sizes.tests/cli/test_planning.py: addedtest_filter_world_sizes_receives_selected_or_supported_gpus(reusing_recipe()and_gpu()) covering automatic and explicit--gpusplanning across SM120, SM121, and unsupported SM90 GPUs.Claimed benefit
Recipes can gate valid tensor-parallel world sizes on GPU capability during both automatic and explicit
--gpusplanning while preservingCapacityErrorclassification for unsupported hardware and backward compatibility for recipes that ignorecontext.gpus.Supporting evidence and material limitations
CUDA_VISIBLE_DEVICES="" pytest -q tests/cli/test_planning.py tests/cli/test_commands.py tests/cli/test_parameters.py tests/cli/test_gpu_discovery.pypassed (29 passed, 0 failed), exercising automatic and explicit--gpusselection across SM120, SM121, and unsupported SM90 GPUs alongside all existing CLI planning, command, parameter, and discovery tests.Gpudescriptors. Live 3-node SM121 export, qualification, andflare runserving validation using this hook are provided in the companion DeepSeek V4.1 TP3 PR: Enable cross-host SM121 RoCE TP3 for DeepSeek V4.1 local-inference-lab/hyperflare-recipes#103.Discord: nero