From 84f46bd04860ccd07e1ea69f78f43a9742094016 Mon Sep 17 00:00:00 2001 From: Zlobin Vladimir Date: Fri, 26 May 2023 18:52:15 +0400 Subject: [PATCH] benchmark_app: except ALLOW_AUTO_BATCHING (#17731) * benchmark_app: except ALLOW_AUTO_BATCHING Running benchmark_app.py with -b 1 -d CPU fails with `Unsupported property ALLOW_AUTO_BATCHING by CPU plugin`. C++ benchmark_app sets ALLOW_AUTO_BATCHING in ov::Core::compile_model() call, which doesn't trigger the error. * Move `ALLOW_AUTO_BATCHING` to `device_config` --- tools/benchmark_tool/openvino/tools/benchmark/benchmark.py | 3 --- tools/benchmark_tool/openvino/tools/benchmark/main.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/benchmark_tool/openvino/tools/benchmark/benchmark.py b/tools/benchmark_tool/openvino/tools/benchmark/benchmark.py index 73d74634f40..11024268a1d 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/benchmark.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/benchmark.py @@ -59,9 +59,6 @@ class Benchmark: def set_cache_dir(self, cache_dir: str): self.core.set_property({'CACHE_DIR': cache_dir}) - def set_allow_auto_batching(self, flag: bool): - self.core.set_property({'ALLOW_AUTO_BATCHING': flag}) - def read_model(self, path_to_model: str): model_filename = os.path.abspath(path_to_model) head, ext = os.path.splitext(model_filename) diff --git a/tools/benchmark_tool/openvino/tools/benchmark/main.py b/tools/benchmark_tool/openvino/tools/benchmark/main.py index 2addf462543..d6692b66d28 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/main.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/main.py @@ -324,7 +324,7 @@ def main(): ## If set batch size, disable the auto batching if args.batch_size: logger.warning("Batch size is set. Auto batching will be disabled") - benchmark.set_allow_auto_batching(False) + device_config["ALLOW_AUTO_BATCHING"] = False topology_name = "" load_from_file_enabled = is_flag_set_in_command_line('load_from_file') or is_flag_set_in_command_line('lfile')