From 14df316a516494575c971f8dd644d78048439f35 Mon Sep 17 00:00:00 2001 From: eaidova Date: Tue, 8 Oct 2024 20:10:59 +0400 Subject: [PATCH] disable md5 check assert for CB --- llm_bench/python/benchmark.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/llm_bench/python/benchmark.py b/llm_bench/python/benchmark.py index 7fb6d1757b..9dcfe74f66 100644 --- a/llm_bench/python/benchmark.py +++ b/llm_bench/python/benchmark.py @@ -308,13 +308,14 @@ def run_text_generation_genai(input_text, num, model, tokenizer, args, iter_data log.warning(f"[{num}] Prompt[{prompt_index}]'s md5 {result_md5_list} " f"is different from md5 of the {num - 1} iteration {prev_md5}") llm_bench_utils.metrics_print.print_generated(num, warm_up=(num == 0), generated=generated_text[0]) - if num == 1: - # if the device is CPU, throw exception - if args['devices'].lower().startswith('cpu') is True: + if not args.get("use_cb", False): + if num == 1: + # if the device is CPU, throw exception + if args['devices'].lower().startswith('cpu') is True: + assert (result_md5_list == prev_md5) + else: + # throw exception assert (result_md5_list == prev_md5) - else: - # throw exception - assert (result_md5_list == prev_md5) else: llm_bench_utils.metrics_print.print_generated(num, warm_up=(num == 0), generated=generated_text[0]) @@ -814,7 +815,7 @@ def get_argprser(): llm_bench_utils.model_utils.add_stateful_model_arguments(parser) parser.add_argument("--genai", action="store_true", help="Use OpenVINO GenAI optimized pipelines for benchmarking") parser.add_argument("--use_cb", action="store_true", help="Use Continuous Batching inference mode") - parser.add_argument("--cb_config", required=False, default=None, help="Path to file with Continuous Batching Scheduler settings") + parser.add_argument("--cb_config", required=False, default=None, help="Path to file with Continuous Batching Scheduler settings or dict") parser.add_argument( '--end_token_stopping', action='store_true',