A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 8, 22:45 UTC
[Bugfix] Fix torchrun PP broadcast deadlock with async scheduling (#33701)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
Isotr0py committed
Feb 4, 2026 at 10:17 UTC
02080179a3fc92c339b93040838f44b72313e07b
3 files changed
+4
-7
tests/distributed/test_torchrun_example.py
-3
@@ -32,9 +32,6 @@ llm = LLM(
32
gpu_memory_utilization=random.uniform(0.7, 0.9),
33
swap_space=random.randint(1, 4),
34
seed=0,
35
- # FIXME(Isotr0py): async scheduling causes deadlock
36
- # on torchrun with PP, need to investigate further.
37
- async_scheduling=False,
35
)
36
37
outputs = llm.generate(prompts, sampling_params)
tests/distributed/test_torchrun_example_moe.py
-3
@@ -39,9 +39,6 @@ llm = LLM(
39
gpu_memory_utilization=random.uniform(0.7, 0.9),
40
swap_space=random.randint(1, 4),
41
seed=0,
42
- # FIXME(Isotr0py): async scheduling causes deadlock
43
- # on torchrun with PP, need to investigate further.
44
- async_scheduling=False,
42
)
43
44
outputs = llm.generate(prompts, sampling_params)
vllm/v1/worker/gpu_model_runner.py
+4
-1
@@ -3666,7 +3666,10 @@ class GPUModelRunner(
3666
)
3667
if self.use_async_scheduling:
3668
pp = get_pp_group()
3669
- if pp.world_size > 1 and pp.is_last_rank:
3669
+ # For torchrun external_launcher PP mode with broadcast_pp_output=True,
3670
+ # PP outputs have been broadcasted to all ranks at logits computation.
3671
+ # Therefore, here is no need to send sampled token ids again in this case.
3672
+ if not self.broadcast_pp_output and pp.world_size > 1 and pp.is_last_rank:
3673
self._pp_broadcast_prev_sampled_token_ids(
3674
sampler_output.sampled_token_ids
3675
)