From 3a909a7f5f2f388821b25eabf67a7cb895f03ff5 Mon Sep 17 00:00:00 2001 From: Yuan Hu Date: Thu, 21 Oct 2021 00:44:58 +0800 Subject: [PATCH] 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 * remove KEY_AUTO_DEVICE_LIST Signed-off-by: Hu, Yuan2 --- docs/IE_DG/supported_plugins/AUTO.md | 4 ++-- docs/snippets/AUTO1.cpp | 4 ++-- .../src/inference_engine/include/ie/ie_plugin_config.hpp | 5 ----- .../src/behavior/infer_request/callback.cpp | 2 +- .../src/behavior/infer_request/io_blob.cpp | 2 +- .../src/behavior/infer_request/multitheading.cpp | 2 +- .../src/behavior/infer_request/wait.cpp | 2 +- .../src/behavior/preprocessing/set_preprocess.cpp | 2 +- .../behavior/infer_request/io_blob.cpp | 2 +- .../shared_tests_instances/behavior/infer_request/wait.cpp | 2 +- .../behavior/infer_request/io_blob.cpp | 7 ++++--- .../behavior/infer_request/multithreading.cpp | 6 +++--- 12 files changed, 18 insertions(+), 22 deletions(-) diff --git a/docs/IE_DG/supported_plugins/AUTO.md b/docs/IE_DG/supported_plugins/AUTO.md index 55a5e01f212..ce795fa06e3 100644 --- a/docs/IE_DG/supported_plugins/AUTO.md +++ b/docs/IE_DG/supported_plugins/AUTO.md @@ -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 with no spaces| N/A | Device candidate list to be selected | +| "MULTI_DEVICE_PRIORITIES" | comma-separated device names with no spaces| N/A | Device candidate list to be selected | -You can use the configuration name directly as a string or use IE::KEY_AUTO_DEVICE_LIST from ie_plugin_config.hpp, +You can use the configuration name directly as a string or use InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES from multi-device/multi_device_config.hpp, which defines the same string. There are two ways to use Auto-device: diff --git a/docs/snippets/AUTO1.cpp b/docs/snippets/AUTO1.cpp index 22487b5aeb0..c85e1396bc1 100644 --- a/docs/snippets/AUTO1.cpp +++ b/docs/snippets/AUTO1.cpp @@ -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; diff --git a/inference-engine/src/inference_engine/include/ie/ie_plugin_config.hpp b/inference-engine/src/inference_engine/include/ie/ie_plugin_config.hpp index 76d63512f21..09f62301f7e 100644 --- a/inference-engine/src/inference_engine/include/ie/ie_plugin_config.hpp +++ b/inference-engine/src/inference_engine/include/ie/ie_plugin_config.hpp @@ -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" diff --git a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/callback.cpp b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/callback.cpp index 92c1cba64a2..871b5a59bd8 100644 --- a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/callback.cpp +++ b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/callback.cpp @@ -18,7 +18,7 @@ const std::vector> multiConfigsCallback = { }; const std::vector> autoConfigsCallback = { - {{AUTO_CONFIG_KEY(DEVICE_LIST), targetDevice}} + {{MULTI_CONFIG_KEY(DEVICE_PRIORITIES), targetDevice}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestCallbackTests, diff --git a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/io_blob.cpp b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/io_blob.cpp index 4e288e5baaa..37cc8246e7b 100644 --- a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/io_blob.cpp +++ b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/io_blob.cpp @@ -21,7 +21,7 @@ const std::vector> MulticonfigsIOBlob = { }; const std::vector> AutoconfigsIOBlob = { - {{ AUTO_CONFIG_KEY(DEVICE_LIST), targetDevice}} + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES), targetDevice}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest, diff --git a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/multitheading.cpp b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/multitheading.cpp index 7e319ed74d0..f921b4311b9 100644 --- a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/multitheading.cpp +++ b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/multitheading.cpp @@ -23,7 +23,7 @@ const std::vector> MulticonfigsMultithreading }; const std::vector> AutoconfigsMultithreading = { - {{ AUTO_CONFIG_KEY(DEVICE_LIST), targetDevice}} + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES), targetDevice}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestMultithreadingTests, diff --git a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/wait.cpp b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/wait.cpp index 2496bdf26f2..44ee45c5a1b 100644 --- a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/wait.cpp +++ b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/infer_request/wait.cpp @@ -22,7 +22,7 @@ const std::vector> MulticonfigsWait = { }; const std::vector> AutoconfigsWait = { - {{ AUTO_CONFIG_KEY(DEVICE_LIST) , targetDevice}} + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , targetDevice}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestWaitTests, diff --git a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/preprocessing/set_preprocess.cpp b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/preprocessing/set_preprocess.cpp index 1eef28fb789..e3fc083aec6 100644 --- a/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/preprocessing/set_preprocess.cpp +++ b/inference-engine/tests/functional/plugin/conformance/test_runner/api_conformance_runner/src/behavior/preprocessing/set_preprocess.cpp @@ -28,7 +28,7 @@ const std::vector> multiConfigs = { }; const std::vector> autoConfigs = { - {{ InferenceEngine::KEY_AUTO_DEVICE_LIST , targetDevice}} + {{ InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES , targetDevice}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestPreprocessTest, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/io_blob.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/io_blob.cpp index 67acfc8cd2e..cd8a653e514 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/io_blob.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/io_blob.cpp @@ -20,7 +20,7 @@ namespace { }; const std::vector> Autoconfigs = { - {{ AUTO_CONFIG_KEY(DEVICE_LIST) , CommonTestUtils::DEVICE_CPU}} + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestIOBBlobTest, diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/wait.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/wait.cpp index 06368b81ae2..dd0c221e327 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/wait.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/behavior/infer_request/wait.cpp @@ -20,7 +20,7 @@ namespace { }; const std::vector> Autoconfigs = { - {{ AUTO_CONFIG_KEY(DEVICE_LIST) , CommonTestUtils::DEVICE_CPU}} + {{ MULTI_CONFIG_KEY(DEVICE_PRIORITIES) , CommonTestUtils::DEVICE_CPU}} }; INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests, InferRequestWaitTests, diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/io_blob.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/io_blob.cpp index e987f8939d6..45be1bd152c 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/io_blob.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/io_blob.cpp @@ -14,8 +14,9 @@ namespace { }; const std::vector> 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, @@ -117,4 +118,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, InferRequestIOBBlobSetLayoutT ::testing::ValuesIn(autoconfigs)), InferRequestIOBBlobSetLayoutTest::getTestCaseName); -} // namespace \ No newline at end of file +} // namespace diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/multithreading.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/multithreading.cpp index afd7478a4cc..a23ea031001 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/multithreading.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/behavior/infer_request/multithreading.cpp @@ -14,8 +14,8 @@ const std::vector> configs = { }; const std::vector> 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, @@ -36,4 +36,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_Auto_BehaviorTests, InferRequestMultithreadingTes ::testing::ValuesIn(autoconfigs)), InferRequestMultithreadingTests::getTestCaseName); -} // namespace \ No newline at end of file +} // namespace