@@ -77,10 +77,8 @@ class Req(ctypes.Structure):
7777 ("prompt_cache_len" , ctypes .c_int ), # 用于记录prompt cache 的命中长度,用于统计
7878 ("is_paused" , ctypes .c_bool ), # 标记一个Req因为显存资源管理的原因被临时暂停了。
7979 ("finish_status" , FinishStatus ),
80+ # 这个标记变量是http_server 写入,其他进程读取,用于标记该请求是否因为断网被aborted。
8081 ("is_aborted" , ctypes .c_bool ),
81- # 这个标记变量是router进程读取到is_aborted信息后,router 进程标记该请求已经被abort处理
82- # 等待推理进程处理,防止router进程反复给推理进程发送abort指令。
83- ("router_aborted" , ctypes .c_bool ),
8482 # 当FinishStatus 是正常结束状态时,finish_token_index 用于标识结束的
8583 # token 的index位置
8684 ("finish_token_index" , ctypes .c_int ),
@@ -100,7 +98,8 @@ class Req(ctypes.Structure):
10098 ("mtp_accepted_token_num" , ctypes .c_int ),
10199 # mtp_step 保存一个mtp使用的常量参数,用于快速访问,不会被外部输入初始化
102100 ("_mtp_step" , ctypes .c_int ),
103- # stop_str_matched用于判断停止字符串是否匹配成功
101+ # stop_str_matched 用于判断停止字符串是否匹配成功, detokenization 进程写入,router 进程读取
102+ # 然后router发停止命令给推理进程,推理进程停止输出
104103 ("stop_str_matched" , ctypes .c_bool ),
105104 ]
106105
@@ -129,7 +128,6 @@ def init(
129128 self .is_paused = False
130129 self .finish_status = FinishStatus ()
131130 self .is_aborted = False
132- self .router_aborted = False
133131 self .shm_infer_released = False
134132 self .shm_cur_kv_len = 0
135133 self .shm_cur_output_len = 0
0 commit comments