Files
openvino/docs/snippets/AUTO1.cpp
Yuan Hu 3a909a7f5f 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>
2021-10-20 19:44:58 +03:00

16 lines
762 B
C++

#include <ie_core.hpp>
int main() {
//! [part1]
InferenceEngine::Core ie;
InferenceEngine::CNNNetwork network = ie.ReadNetwork("sample.xml");
// "AUTO" plugin is (globally) pre-configured with the explicit option:
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", {{"MULTI_DEVICE_PRIORITIES", "CPU,GPU"}});
InferenceEngine::ExecutableNetwork exec2 = ie.LoadNetwork(network, "AUTO:CPU,GPU");
//! [part1]
return 0;
}