From 3740ba9226f833b7a01766e3f58637946447ca60 Mon Sep 17 00:00:00 2001 From: "Wang, Yang" Date: Wed, 12 Apr 2023 05:06:20 +0800 Subject: [PATCH] [IE Sample] incorrect nstreams retrieved from plugin (#16849) * Retrieve the ov::num_streams through compiledModel rather than through plugin. * Update python version. --- samples/cpp/benchmark_app/main.cpp | 4 ++-- tools/benchmark_tool/openvino/tools/benchmark/main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/cpp/benchmark_app/main.cpp b/samples/cpp/benchmark_app/main.cpp index 9e142b2ae84..1145a6558fa 100644 --- a/samples/cpp/benchmark_app/main.cpp +++ b/samples/cpp/benchmark_app/main.cpp @@ -863,9 +863,9 @@ int main(int argc, char* argv[]) { for (auto&& ds : device_nstreams) { try { const std::string key = getDeviceTypeFromName(ds.first) + "_THROUGHPUT_STREAMS"; - device_nstreams[ds.first] = core.get_property(ds.first, key).as(); + device_nstreams[ds.first] = compiledModel.get_property(key).as(); } catch (const ov::Exception&) { - device_nstreams[ds.first] = core.get_property(ds.first, ov::num_streams.name()).as(); + device_nstreams[ds.first] = compiledModel.get_property(ov::num_streams.name()).as(); } } diff --git a/tools/benchmark_tool/openvino/tools/benchmark/main.py b/tools/benchmark_tool/openvino/tools/benchmark/main.py index b308e67b0fb..facea8fd220 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/main.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/main.py @@ -476,10 +476,10 @@ def main(): for device in device_number_streams.keys(): try: key = get_device_type_from_name(device) + '_THROUGHPUT_STREAMS' - device_number_streams[device] = benchmark.core.get_property(device, key) + device_number_streams[device] = compiled_model.get_property(key) except: key = 'NUM_STREAMS' - device_number_streams[device] = benchmark.core.get_property(device, key) + device_number_streams[device] = compiled_model.get_property(key) # ------------------------------------ 9. Creating infer requests and preparing input data ---------------------- next_step()