Fix for mac caching test (#10151)
* Fix for mac * Fixed rtti comparison * used defined
This commit is contained in:
parent
d62d185ac5
commit
e34ff009e0
@ -11,7 +11,7 @@ namespace ov {
|
||||
|
||||
bool Any::equal(std::type_index lhs, std::type_index rhs) {
|
||||
auto result = lhs == rhs;
|
||||
#ifdef __ANDROID__
|
||||
#if (defined(__ANDROID__) || defined(__APPLE__)) && defined(__clang__)
|
||||
if (!result) {
|
||||
result = std::strcmp(lhs.name(), rhs.name()) == 0;
|
||||
}
|
||||
|
@ -240,20 +240,24 @@ public:
|
||||
try {
|
||||
return {_ptr->GetMetric(name, arguments), _so};
|
||||
} catch (ie::Exception&) {
|
||||
auto ro_properties = _ptr->GetMetric(METRIC_KEY(SUPPORTED_METRICS), arguments)
|
||||
.as<std::vector<std::string>>();
|
||||
auto rw_properties = _ptr->GetMetric(METRIC_KEY(SUPPORTED_CONFIG_KEYS), arguments)
|
||||
.as<std::vector<std::string>>();
|
||||
std::vector<ov::PropertyName> supported_properties;
|
||||
for (auto&& ro_property : ro_properties) {
|
||||
if (ro_property != METRIC_KEY(SUPPORTED_METRICS) &&
|
||||
ro_property != METRIC_KEY(SUPPORTED_CONFIG_KEYS)) {
|
||||
supported_properties.emplace_back(ro_property, PropertyMutability::RO);
|
||||
try {
|
||||
auto ro_properties = _ptr->GetMetric(METRIC_KEY(SUPPORTED_METRICS), arguments)
|
||||
.as<std::vector<std::string>>();
|
||||
for (auto&& ro_property : ro_properties) {
|
||||
if (ro_property != METRIC_KEY(SUPPORTED_METRICS) &&
|
||||
ro_property != METRIC_KEY(SUPPORTED_CONFIG_KEYS)) {
|
||||
supported_properties.emplace_back(ro_property, PropertyMutability::RO);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (auto&& rw_property : rw_properties) {
|
||||
supported_properties.emplace_back(rw_property, PropertyMutability::RW);
|
||||
}
|
||||
} catch (ie::Exception&) {}
|
||||
try {
|
||||
auto rw_properties = _ptr->GetMetric(METRIC_KEY(SUPPORTED_CONFIG_KEYS), arguments)
|
||||
.as<std::vector<std::string>>();
|
||||
for (auto&& rw_property : rw_properties) {
|
||||
supported_properties.emplace_back(rw_property, PropertyMutability::RW);
|
||||
}
|
||||
} catch (ie::Exception&) {}
|
||||
supported_properties.emplace_back(ov::supported_properties.name(), PropertyMutability::RO);
|
||||
return supported_properties;
|
||||
}
|
||||
|
@ -220,11 +220,7 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this<ie::ICore
|
||||
}
|
||||
|
||||
bool DeviceSupportsConfigKey(const ov::InferencePlugin& plugin, const std::string& key) const {
|
||||
try {
|
||||
return util::contains(plugin.get_property(ov::supported_properties), key);
|
||||
} catch (...) {
|
||||
return false;
|
||||
}
|
||||
return util::contains(plugin.get_property(ov::supported_properties), key);
|
||||
}
|
||||
|
||||
bool DeviceSupportsImportExport(const ov::InferencePlugin& plugin) const {
|
||||
@ -242,11 +238,7 @@ class CoreImpl : public ie::ICore, public std::enable_shared_from_this<ie::ICore
|
||||
}
|
||||
|
||||
bool DeviceSupportsCacheDir(const ov::InferencePlugin& plugin) const {
|
||||
try {
|
||||
return util::contains(plugin.get_property(ov::supported_properties), ov::cache_dir);
|
||||
} catch (...) {
|
||||
return false;
|
||||
}
|
||||
return util::contains(plugin.get_property(ov::supported_properties), ov::cache_dir);
|
||||
}
|
||||
|
||||
ov::SoPtr<ie::IExecutableNetworkInternal> compile_model_impl(const InferenceEngine::CNNNetwork& network,
|
||||
|
Loading…
Reference in New Issue
Block a user