Fix memory pool index error (#616)

This commit is contained in:
Ying Sheng
2024-07-13 16:45:11 -07:00
committed by GitHub
parent 0feca02dd9
commit 5949b1ca0e
4 changed files with 9 additions and 11 deletions

View File

@@ -315,7 +315,7 @@ class ModelTpServer:
def get_new_fill_batch(self) -> Optional[Batch]:
running_bs = len(self.running_batch.reqs) if self.running_batch is not None else 0
if running_bs > self.max_running_requests:
if running_bs >= self.max_running_requests:
return
# Compute matched prefix length
@@ -393,7 +393,7 @@ class ModelTpServer:
else:
break
if running_bs + len(can_run_list) > self.max_running_requests:
if running_bs + len(can_run_list) >= self.max_running_requests:
break
if len(can_run_list) == 0: