Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
Signed-off-by: Raasz, Pawel <[email protected]>
  • Loading branch information
praasz committed Dec 10, 2024
1 parent 2772f3d commit 46c05ba
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
7 changes: 5 additions & 2 deletions src/inference/src/dev/core_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,8 @@ ov::Plugin ov::CoreImpl::get_plugin(const std::string& pluginName) const {
}
}
}

// set global device-id independent settings to plugin
plugin.set_property(desc.defaultConfig);
});
}
Expand Down Expand Up @@ -980,6 +982,7 @@ ov::AnyMap ov::CoreImpl::get_supported_property(const std::string& full_device_n
if (device_priorities_it != return_properties.end()) {
return_properties.erase(device_priorities_it);
}

return return_properties;
}

Expand All @@ -998,7 +1001,7 @@ ov::AnyMap ov::CoreImpl::get_supported_property(const std::string& full_device_n

// try to search against OV API 2.0' mutable supported_properties
try {
for (auto&& property : ICore::get_property(device_name, ov::supported_properties)) {
for (auto&& property : ICore::get_property(device_name, ov::supported_properties, {})) {
if (property.is_mutable()) {
supported_config_keys.emplace_back(std::move(property));
}
Expand All @@ -1008,7 +1011,7 @@ ov::AnyMap ov::CoreImpl::get_supported_property(const std::string& full_device_n

// try to search against internal supported_properties
try {
for (auto&& property : ICore::get_property(device_name, ov::internal::supported_properties)) {
for (auto&& property : ICore::get_property(device_name, ov::internal::supported_properties, {})) {
if (property.is_mutable()) {
supported_config_keys.emplace_back(std::move(property));
}
Expand Down
12 changes: 3 additions & 9 deletions src/plugins/auto_batch/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,10 @@ DeviceInformation Plugin::parse_batch_device(const std::string& device_with_batc
return {std::move(deviceName), {{}}, static_cast<uint32_t>(batch)};
}

DeviceInformation Plugin::parse_only_meta_device(const std::string& devices_batch_config,
const ov::AnyMap& user_config) const {
auto meta_device = parse_batch_device(devices_batch_config);
meta_device.device_config = get_core()->get_supported_property(meta_device.device_name, user_config);
return meta_device;
}

DeviceInformation Plugin::parse_meta_device(const std::string& devices_batch_config,
const ov::AnyMap& user_config) const {
auto meta_device = parse_only_meta_device(devices_batch_config, user_config);
auto meta_device = parse_batch_device(devices_batch_config);
meta_device.device_config = get_core()->get_supported_property(meta_device.device_name, user_config);
// check that no irrelevant config-keys left
for (const auto& k : user_config) {
const auto& name = k.first;
Expand Down Expand Up @@ -146,7 +140,7 @@ std::shared_ptr<ov::ICompiledModel> Plugin::compile_model(const std::shared_ptr<
if (device_batch == full_properties.end()) {
OPENVINO_THROW("ov::device::priorities key for AUTO BATCH is not set for BATCH device");
}
auto meta_device = parse_only_meta_device(device_batch->second.as<std::string>(), properties);
auto meta_device = parse_meta_device(device_batch->second.as<std::string>(), properties);

const auto& device_name = meta_device.device_name;
const auto& device_config = meta_device.device_config;
Expand Down
3 changes: 0 additions & 3 deletions src/plugins/auto_batch/src/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ class Plugin : public ov::IPlugin {
static DeviceInformation parse_batch_device(const std::string& device_with_batch);

private:
DeviceInformation parse_only_meta_device(const std::string& devices_batch_config,
const ov::AnyMap& user_config) const;

mutable ov::AnyMap m_plugin_config;
};
} // namespace autobatch_plugin
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/hetero/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ ov::Any ov::hetero::Plugin::get_property(const std::string& name, const ov::AnyM
return decltype(ov::supported_properties)::value_type(std::move(supported_properties));
} else if (ov::internal::supported_properties == name) {
return decltype(ov::internal::supported_properties)::value_type{
ov::PropertyName{ov::internal::caching_properties.name(), ov::PropertyMutability::RO},
};
ov::PropertyName{ov::internal::caching_properties.name(), ov::PropertyMutability::RO}};
} else if (ov::device::full_name == name) {
return decltype(ov::device::full_name)::value_type{get_device_name()};
} else if (ov::internal::caching_properties == name) {
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/intel_cpu/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio
#endif
ov::PropertyName{ov::internal::exclusive_async_requests.name(), ov::PropertyMutability::RW},
ov::PropertyName{ov::internal::compiled_model_runtime_properties.name(), ov::PropertyMutability::RO},
};
ov::PropertyName{ov::internal::compiled_model_runtime_properties_supported.name(),
ov::PropertyMutability::RO}};
} else if (name == ov::device::full_name) {
return decltype(ov::device::full_name)::value_type(deviceFullName);
} else if (name == ov::available_devices) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,6 @@ TEST_P(OVCompiledModelBaseTest, canLoadCorrectNetworkToGetExecutableWithIncorrec
for (const auto& confItem : configuration) {
config.emplace(confItem.first, confItem.second);
}

bool is_meta_devices = target_device.find("AUTO") != std::string::npos ||
target_device.find("MULTI") != std::string::npos ||
target_device.find("HETERO") != std::string::npos;
Expand Down

0 comments on commit 46c05ba

Please sign in to comment.