[AUTO Plugin] AUTO/MULTI should not support the meta plugin appearing in candidate device list (#14739)
* Eisable meta plugin repeatedly loading network to itself. * Remove the test case that allows device candidate list containing meta plugin.
This commit is contained in:
parent
b8636222c3
commit
1f9b2c2ba6
@ -354,6 +354,9 @@ IExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadNetworkImpl(cons
|
|||||||
std::unordered_map<std::string, InferenceEngine::Parameter> multiNetworkConfig;
|
std::unordered_map<std::string, InferenceEngine::Parameter> multiNetworkConfig;
|
||||||
std::vector<DeviceInformation> metaDevices;
|
std::vector<DeviceInformation> metaDevices;
|
||||||
auto priorities = fullConfig.find(MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES);
|
auto priorities = fullConfig.find(MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES);
|
||||||
|
if (priorities->second.find("AUTO") != std::string::npos || priorities->second.find("MULTI") != std::string::npos) {
|
||||||
|
IE_THROW() << "The device candidate list should not include the meta plugin for " << GetName() << " device";
|
||||||
|
}
|
||||||
// If the user sets the property, insert the property into the deviceConfig
|
// If the user sets the property, insert the property into the deviceConfig
|
||||||
auto insertPropToConfig = [&](std::string property,
|
auto insertPropToConfig = [&](std::string property,
|
||||||
std::string& deviceName,
|
std::string& deviceName,
|
||||||
|
@ -307,4 +307,24 @@ INSTANTIATE_TEST_SUITE_P(smoke_MULTI_DoNotReturnDefaultHintTest,
|
|||||||
OVClassLoadNetWorkDoNotReturnDefaultHintTest,
|
OVClassLoadNetWorkDoNotReturnDefaultHintTest,
|
||||||
::testing::Combine(::testing::Values("MULTI:CPU"),
|
::testing::Combine(::testing::Values("MULTI:CPU"),
|
||||||
::testing::ValuesIn(default_multi_properties)));
|
::testing::ValuesIn(default_multi_properties)));
|
||||||
} // namespace
|
|
||||||
|
const std::vector<ov::AnyMap> configsWithEmpty = {{}};
|
||||||
|
const std::vector<ov::AnyMap> configsWithMetaPlugin = {{ov::device::priorities("AUTO")},
|
||||||
|
{ov::device::priorities("MULTI")},
|
||||||
|
{ov::device::priorities("AUTO", "MULTI")},
|
||||||
|
{ov::device::priorities("AUTO", "CPU")},
|
||||||
|
{ov::device::priorities("MULTI", "CPU")}};
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
smoke_MULTI_AUTO_DoNotSupportMetaPluginLoadingItselfRepeatedlyWithEmptyConfigTest,
|
||||||
|
OVClassLoadNetworkWithCondidateDeviceListContainedMetaPluginTest,
|
||||||
|
::testing::Combine(::testing::Values("MULTI:AUTO", "AUTO:MULTI", "MULTI:CPU,AUTO", "AUTO:CPU,MULTI"),
|
||||||
|
::testing::ValuesIn(configsWithEmpty)),
|
||||||
|
::testing::PrintToStringParamName());
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_SUITE_P(smoke_MULTI_AUTO_DoNotSupportMetaPluginLoadingItselfRepeatedlyTest,
|
||||||
|
OVClassLoadNetworkWithCondidateDeviceListContainedMetaPluginTest,
|
||||||
|
::testing::Combine(::testing::Values("MULTI", "AUTO"),
|
||||||
|
::testing::ValuesIn(configsWithMetaPlugin)),
|
||||||
|
::testing::PrintToStringParamName());
|
||||||
|
} // namespace
|
||||||
|
@ -124,6 +124,7 @@ using OVClassSetLogLevelConfigTest = OVClassBaseTestP;
|
|||||||
using OVClassSpecificDeviceTestSetConfig = OVClassBaseTestP;
|
using OVClassSpecificDeviceTestSetConfig = OVClassBaseTestP;
|
||||||
using OVClassSpecificDeviceTestGetConfig = OVClassBaseTestP;
|
using OVClassSpecificDeviceTestGetConfig = OVClassBaseTestP;
|
||||||
using OVClassLoadNetworkWithCorrectPropertiesTest = OVClassSetDevicePriorityConfigTest;
|
using OVClassLoadNetworkWithCorrectPropertiesTest = OVClassSetDevicePriorityConfigTest;
|
||||||
|
using OVClassLoadNetworkWithCondidateDeviceListContainedMetaPluginTest = OVClassSetDevicePriorityConfigTest;
|
||||||
using OVClassLoadNetWorkReturnDefaultHintTest = OVClassSetDevicePriorityConfigTest;
|
using OVClassLoadNetWorkReturnDefaultHintTest = OVClassSetDevicePriorityConfigTest;
|
||||||
using OVClassLoadNetWorkDoNotReturnDefaultHintTest = OVClassSetDevicePriorityConfigTest;
|
using OVClassLoadNetWorkDoNotReturnDefaultHintTest = OVClassSetDevicePriorityConfigTest;
|
||||||
using OVClassLoadNetworkAndCheckSecondaryPropertiesTest = OVClassSetDevicePriorityConfigTest;
|
using OVClassLoadNetworkAndCheckSecondaryPropertiesTest = OVClassSetDevicePriorityConfigTest;
|
||||||
@ -1095,6 +1096,11 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkWithBigDeviceIDThrows) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_P(OVClassLoadNetworkWithCondidateDeviceListContainedMetaPluginTest, LoadNetworkRepeatedlyWithMetaPluginTestThrow) {
|
||||||
|
ov::Core ie = createCoreWithTemplate();
|
||||||
|
ASSERT_THROW(ie.compile_model(actualNetwork, target_device, configuration), ov::Exception);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_P(OVClassLoadNetworkWithCorrectPropertiesTest, LoadNetworkWithCorrectPropertiesTest) {
|
TEST_P(OVClassLoadNetworkWithCorrectPropertiesTest, LoadNetworkWithCorrectPropertiesTest) {
|
||||||
ov::Core ie = createCoreWithTemplate();
|
ov::Core ie = createCoreWithTemplate();
|
||||||
OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork, target_device, configuration));
|
OV_ASSERT_NO_THROW(ie.compile_model(actualNetwork, target_device, configuration));
|
||||||
@ -1175,31 +1181,6 @@ TEST_P(OVClassLoadNetworkTest, LoadNetworkHETEROAndDeviceIDThrows) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// LoadNetwork with AUTO on MULTI combinations particular device
|
|
||||||
//
|
|
||||||
TEST_P(OVClassLoadNetworkTest, LoadNetworkMULTIwithAUTONoThrow) {
|
|
||||||
ov::Core ie = createCoreWithTemplate();
|
|
||||||
if (supportsDeviceID(ie, target_device) && supportsAvaliableDevices(ie, target_device)) {
|
|
||||||
std::string devices;
|
|
||||||
auto availableDevices = ie.get_property(target_device, ov::available_devices);
|
|
||||||
for (auto&& device : availableDevices) {
|
|
||||||
devices += target_device + '.' + device;
|
|
||||||
if (&device != &(availableDevices.back())) {
|
|
||||||
devices += ',';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
OV_ASSERT_NO_THROW(
|
|
||||||
ie.compile_model(actualNetwork,
|
|
||||||
CommonTestUtils::DEVICE_MULTI,
|
|
||||||
ov::device::properties(CommonTestUtils::DEVICE_AUTO, ov::device::priorities(devices)),
|
|
||||||
ov::device::properties(CommonTestUtils::DEVICE_MULTI,
|
|
||||||
ov::device::priorities(CommonTestUtils::DEVICE_AUTO, target_device))));
|
|
||||||
} else {
|
|
||||||
GTEST_FAIL() << "Device does not support DeviceID property" << std::endl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// LoadNetwork with HETERO on MULTI combinations particular device
|
// LoadNetwork with HETERO on MULTI combinations particular device
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user