replace AUTO_DEVICE_LIST with MULTI_DEVICE_PRIORITY in test cases (#7932)

* replace AUTO_DEVICE_LIST with MULTI_DEVICE_PRIORITY in test case

Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>

* remove KEY_AUTO_DEVICE_LIST

Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
This commit is contained in:
Yuan Hu 2021-10-21 00:44:58 +08:00 committed by GitHub
parent eb7d7e4413
commit 3a909a7f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 18 additions and 22 deletions

View File

@ -23,9 +23,9 @@ Following the OpenVINO notions of “devices”, the Auto-device has “AUTO”
| Parameter name | Parameter values | Default | Description | | Parameter name | Parameter values | Default | Description |
| :--- | :--- | :--- |:-----------------------------------------------------------------------------| | :--- | :--- | :--- |:-----------------------------------------------------------------------------|
| "AUTO_DEVICE_LIST" | comma-separated device names <span style="color:red">with no spaces</span>| N/A | Device candidate list to be selected | | "MULTI_DEVICE_PRIORITIES" | comma-separated device names <span style="color:red">with no spaces</span>| N/A | Device candidate list to be selected |
You can use the configuration name directly as a string or use <code>IE::KEY_AUTO_DEVICE_LIST</code> from <code>ie_plugin_config.hpp</code>, You can use the configuration name directly as a string or use <code>InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES</code> from <code>multi-device/multi_device_config.hpp</code>,
which defines the same string. which defines the same string.
There are two ways to use Auto-device: There are two ways to use Auto-device:

View File

@ -5,10 +5,10 @@ int main() {
InferenceEngine::Core ie; InferenceEngine::Core ie;
InferenceEngine::CNNNetwork network = ie.ReadNetwork("sample.xml"); InferenceEngine::CNNNetwork network = ie.ReadNetwork("sample.xml");
// "AUTO" plugin is (globally) pre-configured with the explicit option: // "AUTO" plugin is (globally) pre-configured with the explicit option:
ie.SetConfig({{"AUTO_DEVICE_LIST", "CPU,GPU"}}, "AUTO"); ie.SetConfig({{"MULTI_DEVICE_PRIORITIES", "CPU,GPU"}}, "AUTO");
// the below 3 lines are equivalent (the first line leverages the pre-configured AUTO, while second and third explicitly pass the same settings) // the below 3 lines are equivalent (the first line leverages the pre-configured AUTO, while second and third explicitly pass the same settings)
InferenceEngine::ExecutableNetwork exec0 = ie.LoadNetwork(network, "AUTO", {}); InferenceEngine::ExecutableNetwork exec0 = ie.LoadNetwork(network, "AUTO", {});
InferenceEngine::ExecutableNetwork exec1 = ie.LoadNetwork(network, "AUTO", {{"AUTO_DEVICE_LIST", "CPU,GPU"}}); InferenceEngine::ExecutableNetwork exec1 = ie.LoadNetwork(network, "AUTO", {{"MULTI_DEVICE_PRIORITIES", "CPU,GPU"}});
InferenceEngine::ExecutableNetwork exec2 = ie.LoadNetwork(network, "AUTO:CPU,GPU"); InferenceEngine::ExecutableNetwork exec2 = ie.LoadNetwork(network, "AUTO:CPU,GPU");
//! [part1] //! [part1]
return 0; return 0;

View File

@ -415,11 +415,6 @@ DECLARE_CONFIG_KEY(CACHE_DIR);
#define DECLARE_AUTO_CONFIG_KEY(name) DECLARE_CONFIG_KEY(AUTO_##name) #define DECLARE_AUTO_CONFIG_KEY(name) DECLARE_CONFIG_KEY(AUTO_##name)
/**
* @brief Limit device list config option, with comma-separated devices listed
*/
DECLARE_AUTO_CONFIG_KEY(DEVICE_LIST);
} // namespace InferenceEngine } // namespace InferenceEngine
#include "hetero/hetero_plugin_config.hpp" #include "hetero/hetero_plugin_config.hpp"

View File

@ -18,7 +18,7 @@ const std::vector<std::map<std::string, std::string>> multiConfigsCallback = {
}; };
const std::vector<std::map<std::string, std::string>> autoConfigsCallback = { const std::vector<std::map<std::string, std::string>> autoConfigsCallback = {
{{AUTO_CONFIG_KEY(DEVICE_LIST), targetDevice}} {{MULTI_CONFIG_KEY(DEVICE_PRIORITIES), targetDevice}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestCallbackTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestCallbackTests,

View File

@ -21,7 +21,7 @@ const std::vector<std::map<std::string, std::string>> MulticonfigsIOBlob = {
}; };
const std::vector<std::map<std::string, std::string>> AutoconfigsIOBlob = { const std::vector<std::map<std::string, std::string>> AutoconfigsIOBlob = {
{{ AUTO_CONFIG_KEY(DEVICE_LIST), targetDevice}} {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES), targetDevice}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest,

View File

@ -23,7 +23,7 @@ const std::vector<std::map<std::string, std::string>> MulticonfigsMultithreading
}; };
const std::vector<std::map<std::string, std::string>> AutoconfigsMultithreading = { const std::vector<std::map<std::string, std::string>> AutoconfigsMultithreading = {
{{ AUTO_CONFIG_KEY(DEVICE_LIST), targetDevice}} {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES), targetDevice}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestMultithreadingTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestMultithreadingTests,

View File

@ -22,7 +22,7 @@ const std::vector<std::map<std::string, std::string>> MulticonfigsWait = {
}; };
const std::vector<std::map<std::string, std::string>> AutoconfigsWait = { const std::vector<std::map<std::string, std::string>> AutoconfigsWait = {
{{ AUTO_CONFIG_KEY(DEVICE_LIST) , targetDevice}} {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , targetDevice}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestWaitTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestWaitTests,

View File

@ -28,7 +28,7 @@ const std::vector<std::map<std::string, std::string>> multiConfigs = {
}; };
const std::vector<std::map<std::string, std::string>> autoConfigs = { const std::vector<std::map<std::string, std::string>> autoConfigs = {
{{ InferenceEngine::KEY_AUTO_DEVICE_LIST , targetDevice}} {{ InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , targetDevice}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessTest, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessTest,

View File

@ -20,7 +20,7 @@ namespace {
}; };
const std::vector<std::map<std::string, std::string>> Autoconfigs = { const std::vector<std::map<std::string, std::string>> Autoconfigs = {
{{ AUTO_CONFIG_KEY(DEVICE_LIST) , CommonTestUtils::DEVICE_CPU}} {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest,

View File

@ -20,7 +20,7 @@ namespace {
}; };
const std::vector<std::map<std::string, std::string>> Autoconfigs = { const std::vector<std::map<std::string, std::string>> Autoconfigs = {
{{ AUTO_CONFIG_KEY(DEVICE_LIST) , CommonTestUtils::DEVICE_CPU}} {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestWaitTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestWaitTests,

View File

@ -14,8 +14,9 @@ namespace {
}; };
const std::vector<std::map<std::string, std::string>> autoconfigs = { const std::vector<std::map<std::string, std::string>> autoconfigs = {
{{InferenceEngine::KEY_AUTO_DEVICE_LIST, CommonTestUtils::DEVICE_GPU}}, {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_GPU}},
{{InferenceEngine::KEY_AUTO_DEVICE_LIST , std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}} {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES,
std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest,

View File

@ -14,8 +14,8 @@ const std::vector<std::map<std::string, std::string>> configs = {
}; };
const std::vector<std::map<std::string, std::string>> autoconfigs = { const std::vector<std::map<std::string, std::string>> autoconfigs = {
{{InferenceEngine::KEY_AUTO_DEVICE_LIST, CommonTestUtils::DEVICE_GPU}}, {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_GPU}},
{{InferenceEngine::KEY_AUTO_DEVICE_LIST , std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}} {{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}}
}; };
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestMultithreadingTests, INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestMultithreadingTests,