Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
02080179
Unverified
Commit
02080179
authored
Feb 04, 2026
by
Isotr0py
Committed by
GitHub
Feb 04, 2026
Browse files
[Bugfix] Fix torchrun PP broadcast deadlock with async scheduling (#33701)
Signed-off-by:
Isotr0py
<
mozf@mail2.sysu.edu.cn
>
parent
1b8fe6f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
tests/distributed/test_torchrun_example.py
tests/distributed/test_torchrun_example.py
+0
-3
tests/distributed/test_torchrun_example_moe.py
tests/distributed/test_torchrun_example_moe.py
+0
-3
vllm/v1/worker/gpu_model_runner.py
vllm/v1/worker/gpu_model_runner.py
+4
-1
No files found.
tests/distributed/test_torchrun_example.py
View file @
02080179
...
@@ -32,9 +32,6 @@ llm = LLM(
...
@@ -32,9 +32,6 @@ llm = LLM(
gpu_memory_utilization
=
random
.
uniform
(
0.7
,
0.9
),
gpu_memory_utilization
=
random
.
uniform
(
0.7
,
0.9
),
swap_space
=
random
.
randint
(
1
,
4
),
swap_space
=
random
.
randint
(
1
,
4
),
seed
=
0
,
seed
=
0
,
# FIXME(Isotr0py): async scheduling causes deadlock
# on torchrun with PP, need to investigate further.
async_scheduling
=
False
,
)
)
outputs
=
llm
.
generate
(
prompts
,
sampling_params
)
outputs
=
llm
.
generate
(
prompts
,
sampling_params
)
...
...
tests/distributed/test_torchrun_example_moe.py
View file @
02080179
...
@@ -39,9 +39,6 @@ llm = LLM(
...
@@ -39,9 +39,6 @@ llm = LLM(
gpu_memory_utilization
=
random
.
uniform
(
0.7
,
0.9
),
gpu_memory_utilization
=
random
.
uniform
(
0.7
,
0.9
),
swap_space
=
random
.
randint
(
1
,
4
),
swap_space
=
random
.
randint
(
1
,
4
),
seed
=
0
,
seed
=
0
,
# FIXME(Isotr0py): async scheduling causes deadlock
# on torchrun with PP, need to investigate further.
async_scheduling
=
False
,
)
)
outputs
=
llm
.
generate
(
prompts
,
sampling_params
)
outputs
=
llm
.
generate
(
prompts
,
sampling_params
)
...
...
vllm/v1/worker/gpu_model_runner.py
View file @
02080179
...
@@ -3666,7 +3666,10 @@ class GPUModelRunner(
...
@@ -3666,7 +3666,10 @@ class GPUModelRunner(
)
)
if
self
.
use_async_scheduling
:
if
self
.
use_async_scheduling
:
pp
=
get_pp_group
()
pp
=
get_pp_group
()
if
pp
.
world_size
>
1
and
pp
.
is_last_rank
:
# For torchrun external_launcher PP mode with broadcast_pp_output=True,
# PP outputs have been broadcasted to all ranks at logits computation.
# Therefore, here is no need to send sampled token ids again in this case.
if
not
self
.
broadcast_pp_output
and
pp
.
world_size
>
1
and
pp
.
is_last_rank
:
self
.
_pp_broadcast_prev_sampled_token_ids
(
self
.
_pp_broadcast_prev_sampled_token_ids
(
sampler_output
.
sampled_token_ids
sampler_output
.
sampled_token_ids
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment