Skip to content

Commit 0ffac7f

Browse files
authored
fix: Incorrect stats size during inference of throughput benchmark when concurrency > num_prompts (#2928)
* fix: issue#2927 * fix: issue#2927, format
1 parent e20999f commit 0ffac7f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

benchmark/profile_throughput.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,14 @@ def main():
345345
requests = sample_requests(args.dataset, args.num_prompts,
346346
engine.tokenizer)
347347

348-
engine.process_request(requests,
349-
temperature=args.temperature,
350-
top_p=args.top_p,
351-
top_k=args.top_k,
352-
concurrency=args.concurrency,
353-
stream_output=True)
348+
engine.process_request(
349+
requests,
350+
temperature=args.temperature,
351+
top_p=args.top_p,
352+
top_k=args.top_k,
353+
concurrency=args.concurrency
354+
if args.concurrency < args.num_prompts else args.num_prompts,
355+
stream_output=True)
354356

355357

356358
if __name__ == '__main__':

0 commit comments

Comments
 (0)