Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
hnyls2002 committed Oct 4, 2024
1 parent 3834869 commit 7ec9132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions python/sglang/srt/managers/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ def handle_embedding_request(
self.waiting_queue.append(req)

def get_new_prefill_batch(self) -> Optional[ScheduleBatch]:
if len(self.waiting_queue) == 0 and self.current_inflight_req is None:
return None

running_bs = (
len(self.running_batch.reqs) if self.running_batch is not None else 0
)
Expand Down
2 changes: 1 addition & 1 deletion test/srt/test_bench_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_offline_throughput_default(self):
def test_offline_throughput_non_stream_small_batch_size(self):
res = run_bench_serving(
model=DEFAULT_MODEL_NAME_FOR_TEST,
num_prompts=50,
num_prompts=200,
request_rate=float("inf"),
dataset_name="sharegpt",
random_input_len=None,
Expand Down

0 comments on commit 7ec9132

Please sign in to comment.