[PD] Support PD with context parallel after refactor (#19504)

Signed-off-by: Shangming Cai <csmthu@gmail.com>
Co-authored-by: Vladislav Nosivskoy <vladnosiv@gmail.com>
This commit is contained in:
Shangming Cai
2026-02-28 13:11:15 +08:00
committed by GitHub
co-authored by Vladislav Nosivskoy
parent 0404ef9023
commit b01f3590be
5 changed files with 192 additions and 89 deletions
@@ -13,7 +13,7 @@ import torch.distributed
from tqdm import tqdm
from sglang.srt.disaggregation.base.conn import KVPoll
from sglang.srt.disaggregation.utils import poll_and_all_reduce
from sglang.srt.disaggregation.utils import poll_and_all_reduce_attn_cp_tp_group
from sglang.srt.distributed.parallel_state import P2PWork
from sglang.srt.environ import envs
from sglang.srt.layers.dp_attention import (
@@ -1082,8 +1082,9 @@ class SchedulerPPMixin:
"""
Used by PP, get the required rids with the given poll statuses.
"""
polls = poll_and_all_reduce(
polls = poll_and_all_reduce_attn_cp_tp_group(
[req.disagg_kv_sender if is_send else req.kv_receiver for req in req_queue],
self.attn_cp_cpu_group,
self.attn_tp_cpu_group,
)
rids: List = []