Add throughput benchmarking script (#133)

This commit is contained in:
Woosuk Kwon
2023-05-28 03:20:05 -07:00
committed by GitHub
parent 337871c6fd
commit 211318d44a
12 changed files with 145 additions and 257 deletions

View File

@@ -87,6 +87,9 @@ class Scheduler:
def has_unfinished_seqs(self) -> bool:
return self.waiting or self.running or self.swapped
def get_num_unfinished_seq_groups(self) -> int:
return len(self.waiting) + len(self.running) + len(self.swapped)
def _schedule(self) -> Tuple[SchedulerOutputs, List[str]]:
# Blocks that need to be swaped or copied before model execution.
blocks_to_swap_in: Dict[int, int] = {}