Revert "the proxy device with id should be also a proxy device. (#21248)" (#21271)

This reverts commit c491381a0d.
This commit is contained in:
Ilya Lavrenov 2023-11-24 17:49:37 +04:00 committed by GitHub
parent 758524978b
commit e087ed083c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 29 deletions

View File

@ -325,9 +325,8 @@ bool ov::CoreImpl::is_proxy_device(const ov::Plugin& plugin) const {
}
bool ov::CoreImpl::is_proxy_device(const std::string& dev_name) const {
#ifdef PROXY_PLUGIN_ENABLED
auto parsed = ov::parseDeviceNameIntoConfig(dev_name);
return pluginRegistry.find(parsed._deviceName) != pluginRegistry.end() &&
pluginRegistry.at(parsed._deviceName).pluginCreateFunc == ov::proxy::create_plugin;
return pluginRegistry.find(dev_name) != pluginRegistry.end() &&
pluginRegistry.at(dev_name).pluginCreateFunc == ov::proxy::create_plugin;
#else
return false;
#endif

View File

@ -9,7 +9,7 @@
using namespace ov::proxy::tests;
TEST_F(ProxyTests, can_parse_and_inherit_batch_property) {
register_plugin_support_reshape(core, "MOCK_DEVICE", {{ov::proxy::configuration::alias.name(), "MOCK_DEVICE"}});
register_plugin_support_reshape(core, "MOCK_DEVICE", {{ov::proxy::configuration::alias.name(), "ALIAS_MOCK"}});
auto available_devices = core.get_available_devices();
auto model = create_model_with_add();
auto compiled_model_default = core.compile_model(model, "MOCK_DEVICE", ov::hint::performance_mode("THROUGHPUT"));
@ -32,28 +32,3 @@ TEST_F(ProxyTests, can_parse_and_inherit_batch_property) {
ov::hint::allow_auto_batching(false));
EXPECT_ANY_THROW(compiled_model_no_batch.get_property(ov::auto_batch_timeout));
}
TEST_F(ProxyTests, can_parse_and_inherit_batch_property_for_device_name_with_id) {
register_plugin_support_reshape(core, "MOCK_DEVICE", {{ov::proxy::configuration::alias.name(), "MOCK_DEVICE"}});
auto available_devices = core.get_available_devices();
auto model = create_model_with_add();
auto compiled_model_default = core.compile_model(model, "MOCK_DEVICE.1", ov::hint::performance_mode("THROUGHPUT"));
#ifdef ENABLE_AUTO_BATCH
EXPECT_NO_THROW(compiled_model_default.get_property(ov::auto_batch_timeout)); // batch enabled by default
EXPECT_EQ(compiled_model_default.get_property(ov::auto_batch_timeout), 1000); // default value
#endif
auto compiled_model_with_batch = core.compile_model(model,
"MOCK_DEVICE.1",
ov::hint::performance_mode("THROUGHPUT"),
ov::hint::allow_auto_batching(true),
ov::auto_batch_timeout(8));
#ifdef ENABLE_AUTO_BATCH
EXPECT_NO_THROW(compiled_model_with_batch.get_property(ov::auto_batch_timeout));
EXPECT_EQ(compiled_model_with_batch.get_property(ov::auto_batch_timeout), 8);
#endif
auto compiled_model_no_batch = core.compile_model(model,
"MOCK_DEVICE.2",
ov::hint::performance_mode("THROUGHPUT"),
ov::hint::allow_auto_batching(false));
EXPECT_ANY_THROW(compiled_model_no_batch.get_property(ov::auto_batch_timeout));
}