Skip to content

Commit 38d4226

Browse files
committed
support pd split
1 parent 7e28db3 commit 38d4226

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

lightllm/server/api_cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,6 @@ def make_argument_parser() -> argparse.ArgumentParser:
541541
"--disable_dp_prompt_cache_fetch",
542542
action="store_true",
543543
default=False,
544-
help="""Disable prefix prompt cache fetch for data parallel inference.
545-
Enabled by default, but currently not supported for pd separated mode""",
544+
help="""Disable prefix prompt cache fetch for data parallel inference, enabled by default.""",
546545
)
547546
return parser

lightllm/server/api_start.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,12 @@ def normal_or_p_d_start(args):
270270

271271
send_and_receive_node_ip(args) # 多机用于收发node ip
272272
# PD 分离模式下必须禁用 DP prompt cache fetch,且 dp 必须 > 1
273-
if not args.disable_dp_prompt_cache_fetch:
274-
if args.run_mode != "normal" or args.dp <= 1:
275-
args.disable_dp_prompt_cache_fetch = True
276-
logger.warning(
277-
"""PD split mode or dp <= 1 does not support dp_prompt_cache_fetch;
278-
overriding disable_dp_prompt_cache_fetch to True"""
279-
)
273+
if not args.disable_dp_prompt_cache_fetch and args.dp <= 1:
274+
args.disable_dp_prompt_cache_fetch = True
275+
logger.warning(
276+
"""dp <= 1 does not support dp_prompt_cache_fetch;
277+
overriding disable_dp_prompt_cache_fetch to True"""
278+
)
280279

281280
set_env_start_args(args)
282281
logger.info(f"all start args:{args}")

lightllm/server/router/model_infer/mode_backend/continues_batch/pd_mode/prefill_node_impl/prefill_impl_for_dp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def __init__(self, info_queue: mp.Queue, mem_queue: mp.Queue) -> None:
1717

1818
def init_custom(self):
1919
ChunckedPrefillForPrefillNode.init_custom(self)
20+
super().init_custom()
2021
return
2122

2223
def _pre_handle_finished_reqs(self, finished_reqs):

lightllm/server/router/model_infer/mode_backend/pd_nixl/prefill_node_impl/prefill_impl_for_dp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def __init__(self, info_queue: mp.Queue, mem_queue: mp.Queue) -> None:
1818

1919
def init_custom(self):
2020
NIXLChunckedPrefillForPrefillNode.init_custom(self)
21+
super().init_custom()
2122
return
2223

2324
def _filter_not_ready_reqs(self, req_ids: List[int]) -> List[InferReq]:

0 commit comments

Comments
 (0)