[IE Sample] incorrect nstreams retrieved from plugin (#16849)

* Retrieve the ov::num_streams through compiledModel rather than through plugin.

* Update python version.
This commit is contained in:
Wang, Yang 2023-04-12 05:06:20 +08:00 committed by GitHub
parent 920900fbda
commit 3740ba9226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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<std::string>();
device_nstreams[ds.first] = compiledModel.get_property(key).as<std::string>();
} catch (const ov::Exception&) {
device_nstreams[ds.first] = core.get_property(ds.first, ov::num_streams.name()).as<std::string>();
device_nstreams[ds.first] = compiledModel.get_property(ov::num_streams.name()).as<std::string>();
}
}

View File

@ -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()