[AUTO] Remove exclusive_asyc_requests property from AUTO plugin (#16840)
* Remove exclusive_asyc_requests property from AUTO plugin * Update test case * Add test case to test incorrect config * Remove the test case related to exclusive_asyc_requests property of AUTO plugin
This commit is contained in:
1 parent
67c07ccebe
commit
1037f24c46
8 files changed
+29
-54
No files matched your search
@@ -28,8 +28,6 @@ void PluginConfig::set_default() {
|
||||
std::make_tuple(ov::hint::num_requests, 0, UnsignedTypeValidator()),
|
||||
std::make_tuple(ov::intel_auto::enable_startup_fallback, true),
|
||||
std::make_tuple(ov::intel_auto::enable_runtime_fallback, true),
|
||||
// Legacy API properties
|
||||
std::make_tuple(exclusive_asyc_requests, false),
|
||||
// RO for register only
|
||||
std::make_tuple(ov::device::full_name),
|
||||
std::make_tuple(ov::device::capabilities),
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
#include <vector>
|
||||
namespace MultiDevicePlugin {
|
||||
using namespace InferenceEngine;
|
||||
// legacy config
|
||||
static constexpr ov::Property<bool, ov::PropertyMutability::RW> exclusive_asyc_requests{"EXCLUSIVE_ASYNC_REQUESTS"};
|
||||
|
||||
class BaseValidator {
|
||||
public:
|
||||
|
||||
-17
@@ -77,10 +77,6 @@ namespace {
|
||||
{InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::NO}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS, InferenceEngine::PluginConfigParams::YES}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS, InferenceEngine::PluginConfigParams::NO}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::LATENCY},
|
||||
{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT_NUM_REQUESTS, "1"}}
|
||||
@@ -115,13 +111,6 @@ namespace {
|
||||
{InferenceEngine::PluginConfigParams::KEY_MODEL_PRIORITY, InferenceEngine::PluginConfigParams::MODEL_PRIORITY_LOW}}
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> ExcluAsyncReqConfigs = {
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS, InferenceEngine::PluginConfigParams::YES}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , CommonTestUtils::DEVICE_CPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS, InferenceEngine::PluginConfigParams::NO}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, CorrectConfigTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_CPU),
|
||||
@@ -140,12 +129,6 @@ namespace {
|
||||
::testing::ValuesIn(AutoConfigs)),
|
||||
CorrectConfigTests::getTestCaseName);
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, ExclusiveAsyncReqTests,
|
||||
::testing::Combine(
|
||||
::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(ExcluAsyncReqConfigs)),
|
||||
CorrectConfigTests::getTestCaseName);
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> inconfigs = {
|
||||
{{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, "DOESN'T EXIST"}},
|
||||
{{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::LATENCY},
|
||||
|
||||
-16
@@ -274,22 +274,6 @@ namespace {
|
||||
::testing::ValuesIn(auto_batch_configs())),
|
||||
CorrectConfigTests::getTestCaseName);
|
||||
|
||||
auto ExcluAsyncReqConfigs = []() {
|
||||
return std::vector<std::map<std::string, std::string>>{
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_GPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS,
|
||||
InferenceEngine::PluginConfigParams::YES}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_GPU},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS,
|
||||
InferenceEngine::PluginConfigParams::NO}}};
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests,
|
||||
ExclusiveAsyncReqTests,
|
||||
::testing::Combine(::testing::Values(CommonTestUtils::DEVICE_AUTO),
|
||||
::testing::ValuesIn(ExcluAsyncReqConfigs())),
|
||||
CorrectConfigTests::getTestCaseName);
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> gpu_prop_config = {{
|
||||
{InferenceEngine::PluginConfigParams::KEY_PERFORMANCE_HINT, InferenceEngine::PluginConfigParams::THROUGHPUT},
|
||||
{InferenceEngine::PluginConfigParams::KEY_EXCLUSIVE_ASYNC_REQUESTS, InferenceEngine::PluginConfigParams::YES},
|
||||
|
||||
+15
@@ -642,6 +642,21 @@ TEST_P(OVCompiledModelBaseTest, loadIncorrectV11Model) {
|
||||
EXPECT_NO_THROW(core->compile_model(function, target_device, configuration));
|
||||
}
|
||||
|
||||
TEST_P(OVCompiledModelBaseTest, canLoadCorrectNetworkToGetExecutableWithIncorrectConfig) {
|
||||
std::map<std::string, ov::Any> config = {{"abc", "def"}};
|
||||
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;
|
||||
if (is_meta_devices) {
|
||||
EXPECT_NO_THROW(auto execNet = core->compile_model(function, target_device, config));
|
||||
} else {
|
||||
EXPECT_ANY_THROW(auto execNet = core->compile_model(function, target_device, config));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(OVAutoExecutableNetworkTest, AutoNotImplementedSetConfigToExecNet) {
|
||||
std::map<std::string, ov::Any> config;
|
||||
for (const auto& confItem : configuration) {
|
||||
|
||||
-9
@@ -129,15 +129,6 @@ TEST(OVExecutableNetworkBaseTest, smoke_LoadNetworkToDefaultDeviceNoThrow) {
|
||||
EXPECT_NO_THROW(auto execNet = core->compile_model(function));
|
||||
}
|
||||
|
||||
TEST_P(OVExecutableNetworkBaseTest, canLoadCorrectNetworkToGetExecutableWithIncorrectConfig) {
|
||||
std::set<std::string> metaPlugins = {"AUTO", "MULTI", "HETERO"};
|
||||
if (metaPlugins.end() != std::find(metaPlugins.begin(), metaPlugins.end(), target_device)) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
ov::AnyMap incorrectConfig = {{"abc", "def"}};
|
||||
EXPECT_ANY_THROW(auto execNet = core->compile_model(function, target_device, incorrectConfig));
|
||||
}
|
||||
|
||||
TEST_P(OVExecutableNetworkBaseTest, canLoadCorrectNetworkToGetExecutableAndCreateInferRequest) {
|
||||
auto execNet = core->compile_model(function, target_device, configuration);
|
||||
EXPECT_NO_THROW(auto req = execNet.create_infer_request());
|
||||
|
||||
@@ -249,6 +249,5 @@ using IncorrectConfigSingleOptionTests = BehaviorTestsSingleOption;
|
||||
using IncorrectConfigAPITests = CorrectConfigTests;
|
||||
using CorrectConfigCheck = CorrectConfigTests;
|
||||
using DefaultValuesConfigTests = CorrectConfigTests;
|
||||
using ExclusiveAsyncReqTests = CorrectConfigTests;
|
||||
|
||||
} // namespace BehaviorTestsDefinitions
|
||||
@@ -92,8 +92,20 @@ TEST_P(CorrectSingleOptionDefaultValueConfigTests, CheckDefaultValueOfConfig) {
|
||||
|
||||
// Setting correct config doesn't throw
|
||||
TEST_P(CorrectConfigTests, SetCorrectConfig) {
|
||||
ASSERT_NO_THROW(ie->GetMetric(target_device, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
|
||||
ASSERT_NO_THROW(ie->SetConfig(configuration, target_device));
|
||||
InferenceEngine::Parameter metric;
|
||||
bool has_unsupported_config = false;
|
||||
ASSERT_NO_THROW(metric = ie->GetMetric(target_device, METRIC_KEY(SUPPORTED_CONFIG_KEYS)));
|
||||
auto keys = metric.as<std::vector<std::string>>();
|
||||
|
||||
for (const auto& configItem : configuration) {
|
||||
if (std::find(keys.begin(), keys.end(), configItem.first) == keys.end()) {
|
||||
has_unsupported_config = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!has_unsupported_config) {
|
||||
ASSERT_NO_THROW(ie->SetConfig(configuration, target_device));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(CorrectConfigTests, CanLoadNetworkWithCorrectConfig) {
|
||||
@@ -188,11 +200,6 @@ TEST_P(DefaultValuesConfigTests, CanSetDefaultValueBackToPlugin) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(ExclusiveAsyncReqTests, excluAsyncReqTests) {
|
||||
ASSERT_NO_THROW(ie->SetConfig(configuration, target_device));
|
||||
ASSERT_NO_THROW(ie->LoadNetwork(cnnNet, target_device, configuration));
|
||||
}
|
||||
|
||||
TEST_P(SetPropLoadNetWorkGetPropTests, SetPropLoadNetWorkGetProperty) {
|
||||
ASSERT_NO_THROW(ie->SetConfig(configuration, target_device));
|
||||
|
||||
|
||||
Reference in new issue
Block a user