[template] Fix log_level, model_priority, full_device_name tests (#20133)

This commit is contained in:
Sofya Balandina 2023-10-02 13:27:36 +01:00 committed by GitHub
parent 98153f8be1
commit f94445668b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 1 deletions

View File

@ -54,6 +54,10 @@ Configuration::Configuration(const ov::AnyMap& config, const Configuration& defa
num_requests = tmp_i; num_requests = tmp_i;
else else
OPENVINO_THROW("Incorrect value, it should be unsigned integer: ", key); OPENVINO_THROW("Incorrect value, it should be unsigned integer: ", key);
} else if (ov::log::level == key) {
log_level = value.as<ov::log::Level>();
} else if (ov::hint::model_priority == key) {
model_priority = value.as<ov::hint::Priority>();
} else if (throwOnUnsupported) { } else if (throwOnUnsupported) {
OPENVINO_THROW("Property was not found: ", key); OPENVINO_THROW("Property was not found: ", key);
} }
@ -90,6 +94,10 @@ ov::Any Configuration::Get(const std::string& name) const {
return execution_mode; return execution_mode;
} else if (name == ov::hint::num_requests) { } else if (name == ov::hint::num_requests) {
return num_requests; return num_requests;
} else if (name == ov::log::level) {
return log_level;
} else if (name == ov::hint::model_priority) {
return model_priority;
} else { } else {
OPENVINO_THROW("Property was not found: ", name); OPENVINO_THROW("Property was not found: ", name);
} }

View File

@ -41,6 +41,9 @@ struct Configuration {
// unused // unused
ov::element::Type inference_precision = ov::element::undefined; ov::element::Type inference_precision = ov::element::undefined;
ov::hint::ExecutionMode execution_mode = ov::hint::ExecutionMode::ACCURACY; ov::hint::ExecutionMode execution_mode = ov::hint::ExecutionMode::ACCURACY;
ov::log::Level log_level = ov::log::Level::NO;
ov::hint::Priority model_priority = ov::hint::Priority::DEFAULT;
}; };
// ! [configuration:header] // ! [configuration:header]

View File

@ -237,7 +237,8 @@ ov::Any ov::template_plugin::Plugin::get_property(const std::string& name, const
ov::hint::inference_precision, ov::hint::inference_precision,
ov::hint::execution_mode, ov::hint::execution_mode,
ov::num_streams, ov::num_streams,
ov::template_plugin::disable_transformations}; ov::template_plugin::disable_transformations,
ov::log::level};
return rw_properties; return rw_properties;
}; };
if (ov::supported_properties == name) { if (ov::supported_properties == name) {

View File

@ -367,6 +367,10 @@ TEST_P(OVCheckChangePropComplieModleGetPropTests_DEVICE_ID, ChangeCorrectDeviceP
auto device_ids = core->get_available_devices(); auto device_ids = core->get_available_devices();
for (auto&& device_name_with_id : device_ids) { for (auto&& device_name_with_id : device_ids) {
if (device_name_with_id.find(target_device) == std::string::npos) {
continue;
}
std::string device_name = device_name_with_id; std::string device_name = device_name_with_id;
std::string device_id = ""; std::string device_id = "";
auto pos = device_name_with_id.find('.'); auto pos = device_name_with_id.find('.');