Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
7d121448
Unverified
Commit
7d121448
authored
Oct 31, 2025
by
popsiclexu
Committed by
GitHub
Oct 30, 2025
Browse files
[Bug fix][PD Dissaggregation] fix prefill hanging issue with PP and DP Attention, (#12368)
parent
6a63a985
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
python/sglang/srt/disaggregation/prefill.py
python/sglang/srt/disaggregation/prefill.py
+6
-3
python/sglang/srt/managers/scheduler_pp_mixin.py
python/sglang/srt/managers/scheduler_pp_mixin.py
+7
-2
No files found.
python/sglang/srt/disaggregation/prefill.py
View file @
7d121448
...
@@ -588,7 +588,7 @@ class SchedulerDisaggregationPrefillMixin:
...
@@ -588,7 +588,7 @@ class SchedulerDisaggregationPrefillMixin:
"""
"""
polls
=
poll_and_all_reduce
(
polls
=
poll_and_all_reduce
(
[
req
.
disagg_kv_sender
for
req
in
self
.
disagg_prefill_inflight_queue
],
[
req
.
disagg_kv_sender
for
req
in
self
.
disagg_prefill_inflight_queue
],
self
.
tp_worker
.
get_
tp_group
().
cpu_group
,
self
.
tp_worker
.
get_
attention_tp_
cpu_group
()
,
)
)
transferred_rids
:
List
[
str
]
=
[]
transferred_rids
:
List
[
str
]
=
[]
...
@@ -722,8 +722,11 @@ class SchedulerDisaggregationPrefillMixin:
...
@@ -722,8 +722,11 @@ class SchedulerDisaggregationPrefillMixin:
else
:
else
:
data
=
None
data
=
None
if
self
.
tp_size
!=
1
:
if
self
.
attn_
tp_size
!=
1
:
data
=
broadcast_pyobj
(
data
=
broadcast_pyobj
(
data
,
self
.
tp_group
.
rank
,
self
.
tp_cpu_group
,
src
=
self
.
tp_group
.
ranks
[
0
]
data
,
self
.
attn_tp_group
.
rank
,
self
.
attn_tp_cpu_group
,
src
=
self
.
attn_tp_group
.
ranks
[
0
],
)
)
return
data
return
data
python/sglang/srt/managers/scheduler_pp_mixin.py
View file @
7d121448
...
@@ -4,7 +4,7 @@ from sglang.srt.layers.logits_processor import LogitsProcessorOutput
...
@@ -4,7 +4,7 @@ from sglang.srt.layers.logits_processor import LogitsProcessorOutput
from
sglang.srt.managers.schedule_batch
import
ScheduleBatch
from
sglang.srt.managers.schedule_batch
import
ScheduleBatch
from
sglang.srt.managers.utils
import
GenerationBatchResult
from
sglang.srt.managers.utils
import
GenerationBatchResult
from
sglang.srt.model_executor.forward_batch_info
import
PPProxyTensors
from
sglang.srt.model_executor.forward_batch_info
import
PPProxyTensors
from
sglang.srt.utils
import
DynamicGradMode
,
point_to_point_pyobj
from
sglang.srt.utils
import
DynamicGradMode
,
point_to_point_pyobj
,
require_mlp_sync
class
SchedulerPPMixin
:
class
SchedulerPPMixin
:
...
@@ -236,7 +236,12 @@ class SchedulerPPMixin:
...
@@ -236,7 +236,12 @@ class SchedulerPPMixin:
tmbs
[
mb_id
]
=
transferred_rids
tmbs
[
mb_id
]
=
transferred_rids
self
.
process_prefill_chunk
()
self
.
process_prefill_chunk
()
mbs
[
mb_id
]
=
self
.
get_new_batch_prefill
()
batch
=
self
.
get_new_batch_prefill
()
if
require_mlp_sync
(
self
.
server_args
):
batch
=
self
.
prepare_mlp_sync_batch
(
batch
)
mbs
[
mb_id
]
=
batch
self
.
running_mbs
[
mb_id
]
=
self
.
running_batch
self
.
running_mbs
[
mb_id
]
=
self
.
running_batch
self
.
cur_batch
=
mbs
[
mb_id
]
self
.
cur_batch
=
mbs
[
mb_id
]
...
...
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