Commit 7d1b0c5e authored by lizhigong's avatar lizhigong
Browse files

fix bug in zero-overhead core

parent ed4b88d5
...@@ -177,11 +177,11 @@ def zero_overhead_update_from_output(scheduler:Scheduler, ...@@ -177,11 +177,11 @@ def zero_overhead_update_from_output(scheduler:Scheduler,
# loop can be a performance bottleneck. We should do our best to avoid # loop can be a performance bottleneck. We should do our best to avoid
# expensive operations inside the loop. # expensive operations inside the loop.
for request in scheduler.running: for request in scheduler.running:
req_id = request.request_id
if request.is_finished(): if request.is_finished():
if req_id in requsets_valid_token_len: if req_id in requsets_valid_token_len:
requsets_valid_token_len.pop(req_id) requsets_valid_token_len.pop(req_id)
continue continue
req_id = request.request_id
num_tokens_scheduled = num_scheduled_tokens.get(req_id, 0) num_tokens_scheduled = num_scheduled_tokens.get(req_id, 0)
if num_tokens_scheduled == 0: if num_tokens_scheduled == 0:
# The request was not scheduled in this step. # The request was not scheduled in this step.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment