fix(colocate): derive num_gpus_per_node from actor_num_gpus_per_node#2012
Open
aoshen02 wants to merge 1 commit into
Open
fix(colocate): derive num_gpus_per_node from actor_num_gpus_per_node#2012aoshen02 wants to merge 1 commit into
aoshen02 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.