Skip to content

Fix placement group crash for external engines under debug_rollout_only - #2170

Merged
zhuzilin merged 3 commits into
THUDM:mainfrom
coding-famer:fix/rolloutonly
Aug 12, 2026
Merged

Fix placement group crash for external engines under debug_rollout_only#2170
zhuzilin merged 3 commits into
THUDM:mainfrom
coding-famer:fix/rolloutonly

Conversation

@coding-famer

@coding-famer coding-famer commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

With --rollout-external-engine-addrs + --debug-rollout-only, rollout_num_gpus gets overwritten by the remote engines' GPU count (overriding local actor dims), yet _get_placement_group_layout returns (0, 0) for this combo, the empty placement group mismatches the non-zero actor world_size and crashes with IndexError here

placement_group_bundle_index=reordered_bundle_indices[rank],
.

Skip the actor-dim override when rollout_external in the debug_rollout_only branch, and return (actor_num_gpus, 0) from _get_placement_group_layout so the PG fits the placeholder training actors.

Note: this fix assumes the node has GPUs available to create the placeholder training actors.

Also updated the unit test, since the previous (0, 0) expectation would lead to the crash.

@zhuzilin
zhuzilin merged commit 916b33a into THUDM:main Aug 12, 2026
55 checks passed
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.

2 participants