Repository navigation
Create the continuous batching CPU group with local synchronization - #48302
Merged
Merged
Conversation
DistributedHelper creates the TP CPU (gloo) group with a plain new_group, which requires every rank of the default group to participate in the call. When the TP group is a subset of the world (one continuous batching manager per node, data parallelism across nodes), the concurrent per-subset calls deadlock in gloo's connectFullMesh until timeout. use_local_synchronization restricts the creation to the group members, which is exactly the situation here; for the world-spanning TP case it is a no-op behavior-wise.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Contributor
CI recapDashboard: View test results in Grafana |
sbucaille
pushed a commit
to sbucaille/transformers
that referenced
this pull request
Sep 16, 2026
…uggingface#48302) * Create the continuous batching CPU group with local synchronization DistributedHelper creates the TP CPU (gloo) group with a plain new_group, which requires every rank of the default group to participate in the call. When the TP group is a subset of the world (one continuous batching manager per node, data parallelism across nodes), the concurrent per-subset calls deadlock in gloo's connectFullMesh until timeout. use_local_synchronization restricts the creation to the group members, which is exactly the situation here; for the world-spanning TP case it is a no-op behavior-wise. * Trim comment
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.
What does this PR do?
Part of #48294.
DistributedHelpercreates the TP CPU (gloo) group with a plaindist.new_group, which requires every rank of the default group to participate in the call. That holds when the TP group spans the whole world (the current CB TP setup), but not when the TP group is a subset: with one CB manager per node and data parallelism across nodes (16 ranks, two 8-rank TP groups), the two concurrent per-subset calls deadlock in gloo'sconnectFullMeshuntil timeout:Change: pass
use_local_synchronization=Truewhen the TP group is a strict subset of the world, restricting group creation to the member ranks. The world-spanning case keeps the current call unchanged.Validation: a 2-node run (TP sharding within each node, weights replicated across nodes, gradients all-reduced across nodes, both nodes generating with CB while training) deadlocks before and works after, on Qwen3-0.6B (TP8 x DP2) and Qwen3-30B-A3B (TP4 x DP2).
Who can review?
@remi-or (continuous batching)