fix(colocate): derive num_gpus_per_node from actor_num_gpus_per_node - #2012
fix(colocate): derive num_gpus_per_node from actor_num_gpus_per_node#2012aoshen02 wants to merge 1 commit into
Conversation
In colocate mode the rollout engines share the actor's physical nodes, so
the GPUs-per-physical-node always equals actor_num_gpus_per_node.
`--num-gpus-per-node` defaults to 8 (an 8-GPU/node assumption). On hardware
with a different per-node GPU count (e.g. 4x GB200/node) that default is
wrong for *multi-node* colocate runs.
`_allocate_rollout_engine_addr_and_ports_normal` computes
`num_engines_per_node = num_gpus_per_node // rollout_num_gpus_per_engine`
and then `node_index = local_rank // num_engines_per_node`. With
num_gpus_per_node=8 but only 4 GPUs/node and rollout_num_gpus_per_engine=2,
num_engines_per_node becomes 4 instead of 2, so every engine maps to
node_index=0 and is handed the head node's IP. Worker-node engines then
fail to bind:
OSError: [Errno 99] Cannot assign requested address
-> vLLM/SGLang server exited unexpectedly
The help text already documents the manual workaround ("if you use less
than 8 gpus per node under colocate mode, you should set this number"),
but it is silently easy to forget and the failure is opaque. Since the
value is fully determined in colocate mode, derive it automatically.
Single-node 8-GPU runs are unaffected (actor_num_gpus_per_node == 8 ==
default, so the override is a no-op). Non-colocate (disaggregated) runs are
untouched, preserving the ability to configure a rollout cluster with a
different per-node GPU count than the actor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
FYI -- we hit this exact bug while validating a SkyPilot launch tutorial for the docs (#2303). Repro 2 nodes × 4×H100 on Kubernetes; equivalent to the quick-start Qwen3-4B recipe in colocate mode with With the default Workaround Setting +1 for deriving it from |
Problem
In colocate mode the rollout engines share the actor's physical nodes, so the GPUs-per-physical-node always equals
actor_num_gpus_per_node. But--num-gpus-per-nodedefaults to8(an 8-GPU/node assumption). On hardware with a different per-node GPU count (e.g. 4× GB200/node), that default is wrong for multi-node colocate runs._allocate_rollout_engine_addr_and_ports_normaldoes:With
num_gpus_per_node=8but only 4 GPUs/node androllout_num_gpus_per_engine=2,num_engines_per_nodebecomes4instead of2, so every engine maps tonode_index=0and is handed the head node's IP. Worker-node engines then fail to bind:The help text already documents the manual workaround ("If you are going to use less than 8 gpus per node under colocate mode, you should set this number"), but it's silently easy to forget and the resulting failure is opaque.
Fix
Since the value is fully determined in colocate mode, derive it automatically from
actor_num_gpus_per_node:Scope / safety
actor_num_gpus_per_node == 8 == default, so the override is a no-op.if args.colocate:block), preserving the ability to configure a rollout cluster with a different per-node GPU count than the actor.Verification
Reproduced and fixed on a 2-node, 4-GPU/node Blackwell colocate run:
Errno 99.colocate: overriding num_gpus_per_node 8 -> 4; engines split correctly across head (engines 0,1) and worker (engines 2,3); bind succeeds.