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:
co-authored by
Qiaolin Yu
parent
90688366d9
commit
bbcfcaeefe
@@ -112,6 +112,7 @@ class BaseKVSender(ABC):
|
|||||||
bootstrap_room: int,
|
bootstrap_room: int,
|
||||||
dest_tp_ranks: List[int],
|
dest_tp_ranks: List[int],
|
||||||
pp_rank: int,
|
pp_rank: int,
|
||||||
|
req_has_disagg_prefill_dp_rank: bool = False,
|
||||||
): ...
|
): ...
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|||||||
@@ -957,6 +957,7 @@ class CommonKVSender(BaseKVSender):
|
|||||||
bootstrap_room: int,
|
bootstrap_room: int,
|
||||||
dest_tp_ranks: List[int],
|
dest_tp_ranks: List[int],
|
||||||
pp_rank: int,
|
pp_rank: int,
|
||||||
|
req_has_disagg_prefill_dp_rank: bool = False,
|
||||||
):
|
):
|
||||||
self.kv_mgr = mgr
|
self.kv_mgr = mgr
|
||||||
self.bootstrap_room = bootstrap_room
|
self.bootstrap_room = bootstrap_room
|
||||||
@@ -975,7 +976,7 @@ class CommonKVSender(BaseKVSender):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.kv_mgr.update_status(self.bootstrap_room, KVPoll.Bootstrapping)
|
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":
|
if self.kv_mgr.server_args.load_balance_method != "follow_bootstrap_room":
|
||||||
self._register_prefill_dp_rank()
|
self._register_prefill_dp_rank()
|
||||||
elif (
|
elif (
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ class FakeKVSender(BaseKVSender):
|
|||||||
bootstrap_room: int,
|
bootstrap_room: int,
|
||||||
dest_tp_ranks: List[int],
|
dest_tp_ranks: List[int],
|
||||||
pp_rank: int,
|
pp_rank: int,
|
||||||
|
req_has_disagg_prefill_dp_rank: bool = False,
|
||||||
):
|
):
|
||||||
self.kv_mgr = mgr
|
self.kv_mgr = mgr
|
||||||
self.has_sent = False
|
self.has_sent = False
|
||||||
|
|||||||
@@ -1751,8 +1751,16 @@ class MooncakeKVSender(CommonKVSender):
|
|||||||
bootstrap_room: int,
|
bootstrap_room: int,
|
||||||
dest_tp_ranks: List[int],
|
dest_tp_ranks: List[int],
|
||||||
pp_rank: 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.conclude_state = None
|
||||||
self.init_time = time.time()
|
self.init_time = time.time()
|
||||||
self._init_trace_ctx()
|
self._init_trace_ctx()
|
||||||
|
|||||||
@@ -1392,8 +1392,16 @@ class MoriKVSender(CommonKVSender):
|
|||||||
bootstrap_room: int,
|
bootstrap_room: int,
|
||||||
dest_tp_ranks: List[int],
|
dest_tp_ranks: List[int],
|
||||||
pp_rank: 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.transfer_statuses: List[TransferStatus] = []
|
||||||
self.pending_infos: Optional[List[TransferInfo]] = None
|
self.pending_infos: Optional[List[TransferInfo]] = None
|
||||||
self.conclude_state: Optional[KVPoll] = None
|
self.conclude_state: Optional[KVPoll] = None
|
||||||
|
|||||||
@@ -2391,8 +2391,16 @@ class NixlKVSender(CommonKVSender):
|
|||||||
bootstrap_room: int,
|
bootstrap_room: int,
|
||||||
dest_tp_ranks: List[int],
|
dest_tp_ranks: List[int],
|
||||||
pp_rank: 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.has_sent = False
|
||||||
self.chunk_id = 0
|
self.chunk_id = 0
|
||||||
self._send_failed = False
|
self._send_failed = False
|
||||||
|
|||||||
@@ -269,6 +269,7 @@ class PrefillBootstrapQueue:
|
|||||||
bootstrap_room=req.bootstrap_room,
|
bootstrap_room=req.bootstrap_room,
|
||||||
dest_tp_ranks=dest_tp_ranks,
|
dest_tp_ranks=dest_tp_ranks,
|
||||||
pp_rank=self.pp_rank,
|
pp_rank=self.pp_rank,
|
||||||
|
req_has_disagg_prefill_dp_rank=req.disagg_prefill_dp_rank is not None,
|
||||||
)
|
)
|
||||||
self._process_req(req)
|
self._process_req(req)
|
||||||
req.pending_bootstrap = True
|
req.pending_bootstrap = True
|
||||||
|
|||||||
Reference in New Issue
Block a user