fix(pd): do not abort when req.disagg_prefill_dp_rank is used (#27546)

Co-authored-by: Qiaolin Yu <liin1211@outlook.com>
This commit is contained in:
Lawrence Wu
2026-07-10 21:08:02 -07:00
committed by GitHub
co-authored by Qiaolin Yu
parent 90688366d9
commit bbcfcaeefe
7 changed files with 32 additions and 4 deletions
@@ -112,6 +112,7 @@ class BaseKVSender(ABC):
bootstrap_room: int,
dest_tp_ranks: List[int],
pp_rank: int,
req_has_disagg_prefill_dp_rank: bool = False,
): ...
@abstractmethod
@@ -957,6 +957,7 @@ class CommonKVSender(BaseKVSender):
bootstrap_room: int,
dest_tp_ranks: List[int],
pp_rank: int,
req_has_disagg_prefill_dp_rank: bool = False,
):
self.kv_mgr = mgr
self.bootstrap_room = bootstrap_room
@@ -975,7 +976,7 @@ class CommonKVSender(BaseKVSender):
return
self.kv_mgr.update_status(self.bootstrap_room, KVPoll.Bootstrapping)
if self.kv_mgr.server_args.dp_size > 1:
if self.kv_mgr.server_args.dp_size > 1 and not req_has_disagg_prefill_dp_rank:
if self.kv_mgr.server_args.load_balance_method != "follow_bootstrap_room":
self._register_prefill_dp_rank()
elif (
@@ -43,6 +43,7 @@ class FakeKVSender(BaseKVSender):
bootstrap_room: int,
dest_tp_ranks: List[int],
pp_rank: int,
req_has_disagg_prefill_dp_rank: bool = False,
):
self.kv_mgr = mgr
self.has_sent = False
@@ -1751,8 +1751,16 @@ class MooncakeKVSender(CommonKVSender):
bootstrap_room: int,
dest_tp_ranks: List[int],
pp_rank: int,
req_has_disagg_prefill_dp_rank: bool = False,
):
super().__init__(mgr, bootstrap_addr, bootstrap_room, dest_tp_ranks, pp_rank)
super().__init__(
mgr,
bootstrap_addr,
bootstrap_room,
dest_tp_ranks,
pp_rank,
req_has_disagg_prefill_dp_rank,
)
self.conclude_state = None
self.init_time = time.time()
self._init_trace_ctx()
@@ -1392,8 +1392,16 @@ class MoriKVSender(CommonKVSender):
bootstrap_room: int,
dest_tp_ranks: List[int],
pp_rank: int,
req_has_disagg_prefill_dp_rank: bool = False,
):
super().__init__(mgr, bootstrap_addr, bootstrap_room, dest_tp_ranks, pp_rank)
super().__init__(
mgr,
bootstrap_addr,
bootstrap_room,
dest_tp_ranks,
pp_rank,
req_has_disagg_prefill_dp_rank,
)
self.transfer_statuses: List[TransferStatus] = []
self.pending_infos: Optional[List[TransferInfo]] = None
self.conclude_state: Optional[KVPoll] = None
@@ -2391,8 +2391,16 @@ class NixlKVSender(CommonKVSender):
bootstrap_room: int,
dest_tp_ranks: List[int],
pp_rank: int,
req_has_disagg_prefill_dp_rank: bool = False,
):
super().__init__(mgr, bootstrap_addr, bootstrap_room, dest_tp_ranks, pp_rank)
super().__init__(
mgr,
bootstrap_addr,
bootstrap_room,
dest_tp_ranks,
pp_rank,
req_has_disagg_prefill_dp_rank,
)
self.has_sent = False
self.chunk_id = 0
self._send_failed = False
@@ -269,6 +269,7 @@ class PrefillBootstrapQueue:
bootstrap_room=req.bootstrap_room,
dest_tp_ranks=dest_tp_ranks,
pp_rank=self.pp_rank,
req_has_disagg_prefill_dp_rank=req.disagg_prefill_dp_rank is not None,
)
self._process_req(req)
req.pending_bootstrap = True