Skip to content

Commit a640f72

Browse files
authored
fix
1 parent 72f4eb3 commit a640f72

File tree

2 files changed

+3
-3
lines changed
  • lightllm/server/router/model_infer/mode_backend

2 files changed

+3
-3
lines changed

lightllm/server/router/model_infer/mode_backend/chunked_prefill/impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def post_handel(self, run_reqs: List[InferReq], next_token_ids, next_token_logpr
5454

5555
req_obj.cur_kv_len = len(req_obj.get_chuncked_input_token_ids())
5656
if req_obj.cur_kv_len < req_obj.get_cur_total_len():
57-
if self.local_tp_rank < self.dp_size:
57+
if self.is_master_in_dp:
5858
req_obj.shm_req.shm_cur_kv_len = req_obj.cur_kv_len
5959
continue
6060

@@ -67,7 +67,7 @@ def post_handel(self, run_reqs: List[InferReq], next_token_ids, next_token_logpr
6767
if req_obj.finish_status.is_finished() or req_obj.shm_req.router_aborted:
6868
finished_req_ids.append(req_obj.shm_req.request_id)
6969

70-
if self.local_tp_rank < self.dp_size:
70+
if self.is_master_in_dp:
7171
# shm_cur_kv_len shm_cur_output_len 是 router 调度进程需要读的信息
7272
# finish_token_index finish_status candetoken_out_len 是
7373
# detokenization 进程需要的信息,注意这些变量的写入顺序避免异步协同问题。

lightllm/server/router/model_infer/mode_backend/continues_batch/impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def post_handel(self, run_reqs: List[InferReq], next_token_ids, next_token_logpr
5555
if req_obj.finish_status.is_finished() or req_obj.shm_req.router_aborted:
5656
finished_req_ids.append(req_obj.shm_req.request_id)
5757

58-
if self.local_tp_rank < self.dp_size:
58+
if self.is_master_in_dp:
5959
# shm_cur_kv_len shm_cur_output_len 是 router 调度进程需要读的信息
6060
# finish_token_index finish_status candetoken_out_len 是
6161
# detokenization 进程需要的信息,注意这些变量的写入顺序避免异步协同问题。

0 commit comments

Comments
 (0)