From e85c473d59bfe8858ae0708cb8f2f1e27dd2ab42 Mon Sep 17 00:00:00 2001 From: Alexey Lebedev Date: Tue, 15 Feb 2022 10:34:14 +0300 Subject: [PATCH] [tools] fix bin processing in benchmark app (#10366) * fix bin reading * Remove unsupported type --- tools/benchmark_tool/openvino/tools/benchmark/main.py | 2 +- .../openvino/tools/benchmark/utils/inputs_filling.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/benchmark_tool/openvino/tools/benchmark/main.py b/tools/benchmark_tool/openvino/tools/benchmark/main.py index 128ceecb784..ec8cd50231e 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/main.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/main.py @@ -331,7 +331,7 @@ def run(args): try: logger.info(f' {k} , {benchmark.core.get_property(device, k)}') except: - logger.info(f' {k} , UNSUPPORTED TYPE ') + pass # Update number of streams diff --git a/tools/benchmark_tool/openvino/tools/benchmark/utils/inputs_filling.py b/tools/benchmark_tool/openvino/tools/benchmark/utils/inputs_filling.py index 5e809a81f80..cc7f53bbb45 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/utils/inputs_filling.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/utils/inputs_filling.py @@ -215,7 +215,7 @@ def get_binary_tensors(binary_paths, info, batch_sizes): logger.info("Prepare binary file " + binary_filename) binary_file_size = os.path.getsize(binary_filename) - blob_size = dtype().nbytes * int(np.prod(shape)) + blob_size = dtype.itemsize * int(np.prod(shape)) if blob_size != binary_file_size: raise Exception( f"File {binary_filename} contains {binary_file_size} bytes but network expects {blob_size}")