Skip to content

[2.0] Default resources.gpu_type and gpus_per_node from srtslurm.yaml - #392

Closed
ishandhanani wants to merge 1 commit into
idhanani/srt2-06-alias-resolverfrom
idhanani/srt2-07-cluster-gpu-defaults
Closed

ishandhanani wants to merge 1 commit into
idhanani/srt2-06-alias-resolverfrom
idhanani/srt2-07-cluster-gpu-defaults

Conversation

@ishandhanani

@ishandhanani ishandhanani commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Seventh PR of the 2.0 stack (plan: #385, Track 2 step 9). Stacked on #391; the diff against that branch is what to review.

gpu_type and gpus_per_node describe the cluster, not the deployment, yet 100% of recipes repeat them. This makes both inheritable so one recipe can move between clusters unchanged.

  • resources.gpu_type is now optional (str | None); a recipe that omits it inherits srtslurm.yaml default_gpu_type.
  • resources.gpus_per_node inherits the cluster gpus_per_node when omitted (else the existing default of 4).
  • ClusterConfig gains default_gpu_type.

Applied in resolve_config_with_defaults; an explicit recipe value always wins. The fields stay valid in recipes so a run is self-describing for result rollups. No consumer required gpu_type to be non-None (it is metadata plus the TRT-LLM numactl in (...) check, which handles None). Additive: existing recipes are unaffected.

Validation

  • ruff clean; full suite: 1763 passed
  • tests/test_configs.py::TestClusterGpuDefaults: inherit when omitted, recipe value wins, loads with neither recipe nor cluster value
  • Cluster: PASSED. srtslurm.yaml got default_gpu_type: b200; job 11924 ran examples/sglang/sglang-router-agg.yaml with resources.gpu_type and gpus_per_node stripped. It submitted (schema accepted the missing gpu_type), and the two aggregated workers launched on CUDA devices 0 and 1, confirming the inherited gpus_per_node=8 drove GPU slicing.

Stack

...7 of the stack; see #386-#391 for the earlier PRs.

gpu_type and gpus_per_node describe the cluster, not the deployment, yet
every recipe repeated them. Make both inheritable so one recipe can move
between clusters unchanged:

- resources.gpu_type is now optional (str | None); a recipe that omits it
  inherits srtslurm.yaml default_gpu_type.
- resources.gpus_per_node inherits the cluster gpus_per_node when omitted
  (else the existing default of 4).
- ClusterConfig gains default_gpu_type.

Applied in resolve_config_with_defaults; an explicit recipe value always
wins. The fields stay valid in recipes so a run is self-describing for
result rollups. No consumer required gpu_type to be non-None.

Docs: config-reference resources + cluster tables; regenerated
schema-reference.

Part of the 2.0 plan: #385
@ishandhanani

Copy link
Copy Markdown
Collaborator Author

Consolidated into #407, which carries these same commits as one PR against main (this description is reproduced there as one of its parts). Closing to keep review in one place; the branch stays for per-step reference via stack #398.

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.

1 participant