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:
parent
eb7d7e4413
commit
3a909a7f5f
@ -23,9 +23,9 @@ Following the OpenVINO notions of “devices”, the Auto-device has “AUTO”
|
||||
|
||||
| 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.
|
||||
|
||||
There are two ways to use Auto-device:
|
||||
|
@ -5,10 +5,10 @@ int main() {
|
||||
InferenceEngine::Core ie;
|
||||
InferenceEngine::CNNNetwork network = ie.ReadNetwork("sample.xml");
|
||||
// "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)
|
||||
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");
|
||||
//! [part1]
|
||||
return 0;
|
||||
|
@ -415,11 +415,6 @@ DECLARE_CONFIG_KEY(CACHE_DIR);
|
||||
|
||||
#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
|
||||
|
||||
#include "hetero/hetero_plugin_config.hpp"
|
||||
|
@ -18,7 +18,7 @@ const std::vector<std::map<std::string, std::string>> multiConfigsCallback = {
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -21,7 +21,7 @@ const std::vector<std::map<std::string, std::string>> MulticonfigsIOBlob = {
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -23,7 +23,7 @@ const std::vector<std::map<std::string, std::string>> MulticonfigsMultithreading
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -22,7 +22,7 @@ const std::vector<std::map<std::string, std::string>> MulticonfigsWait = {
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -28,7 +28,7 @@ const std::vector<std::map<std::string, std::string>> multiConfigs = {
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -20,7 +20,7 @@ namespace {
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -20,7 +20,7 @@ namespace {
|
||||
};
|
||||
|
||||
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,
|
||||
|
@ -14,8 +14,9 @@ namespace {
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> autoconfigs = {
|
||||
{{InferenceEngine::KEY_AUTO_DEVICE_LIST, CommonTestUtils::DEVICE_GPU}},
|
||||
{{InferenceEngine::KEY_AUTO_DEVICE_LIST , std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}}
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_GPU}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES,
|
||||
std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest,
|
||||
|
@ -14,8 +14,8 @@ const std::vector<std::map<std::string, std::string>> configs = {
|
||||
};
|
||||
|
||||
const std::vector<std::map<std::string, std::string>> autoconfigs = {
|
||||
{{InferenceEngine::KEY_AUTO_DEVICE_LIST, CommonTestUtils::DEVICE_GPU}},
|
||||
{{InferenceEngine::KEY_AUTO_DEVICE_LIST , std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}}
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_GPU}},
|
||||
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, std::string(CommonTestUtils::DEVICE_CPU) + "," + CommonTestUtils::DEVICE_GPU}}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestMultithreadingTests,
|
||||
|
Loading…
Reference in New Issue
Block a user