Skip to content

Commit

Permalink
[template] Add device ro props and fix compile_model props test
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalandi committed Sep 18, 2023
1 parent 49df8fa commit dfb8baf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/plugins/template/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,9 @@ ov::Any ov::template_plugin::Plugin::get_property(const std::string& name, const
ov::device::full_name,
ov::device::architecture,
ov::device::capabilities,
ov::range_for_async_infer_requests};
ov::device::type,
ov::range_for_async_infer_requests,
ov::execution_devices};
return ro_properties;
};
const auto& default_rw_properties = []() {
Expand Down Expand Up @@ -267,13 +269,17 @@ ov::Any ov::template_plugin::Plugin::get_property(const std::string& name, const
// TODO: return device architecture for device specified by DEVICE_ID config
std::string arch = "TEMPLATE";
return decltype(ov::device::architecture)::value_type(arch);
} else if (ov::device::type == name) {
return decltype(ov::device::type)::value_type(ov::device::Type::INTEGRATED);
} else if (ov::internal::caching_properties == name) {
std::vector<ov::PropertyName> caching_properties = {ov::device::architecture};
return decltype(ov::internal::caching_properties)::value_type(caching_properties);
} else if (ov::device::capabilities == name) {
// TODO: fill actual list of supported capabilities: e.g. Template device supports only FP32 and EXPORT_IMPORT
std::vector<std::string> capabilities = {ov::device::capability::FP32, ov::device::capability::EXPORT_IMPORT};
return decltype(ov::device::capabilities)::value_type(capabilities);
} else if (ov::execution_devices == name) {
return decltype(ov::execution_devices)::value_type{"TEMPLATE"};
} else if (ov::range_for_async_infer_requests == name) {
// TODO: fill with actual values
using uint = unsigned int;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using namespace ov::test::conformance;
//

INSTANTIATE_TEST_SUITE_P(
ov_compiled_model, OVClassCompiledModelGetPropertyTest,
ov_compiled_model_mandatory, OVClassCompiledModelGetPropertyTest,
::testing::ValuesIn(return_all_possible_device_combination()));

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,7 @@ TEST_P(OVSetPropComplieModleGetPropTests, SetPropertyAndComplieModelWithPropsWor

std::vector<ov::AnyMap> OVPropertiesTestsWithCompileModelProps::getROMandatoryProperties() {
std::vector<ov::AnyMap> res;
res.push_back({{ov::PropertyName(ov::model_name.name(), ov::model_name.mutability), nullptr}});
res.push_back({{ov::PropertyName(ov::device::full_name.name(), ov::model_name.mutability), nullptr}});
res.push_back({{ov::PropertyName(ov::optimal_number_of_infer_requests.name(), ov::optimal_number_of_infer_requests.mutability), nullptr}});
res.push_back({{ov::PropertyName(ov::device::full_name.name(), ov::device::full_name.mutability), nullptr}});
res.push_back({{ov::PropertyName(ov::device::architecture.name(), ov::device::architecture.mutability), nullptr}});
res.push_back({{ov::PropertyName(ov::device::type.name(), ov::device::type.mutability), nullptr}});
res.push_back({{ov::PropertyName(ov::execution_devices.name(), ov::execution_devices.mutability), nullptr}});
Expand Down

0 comments on commit dfb8baf

Please sign in to comment.