Files
openvino/docs/snippets/AUTO1.cpp
T
Xie ZhengtianandMaxim Shevtsov 79290a7dc0 [Doc] Add doc for Auto-Device Plugin 2021.4 (#5982)
* [Doc] Add doc for Auto-Device Plugin 2021.4 (#6190)

* Add doc for Auto-Device Plugin

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>

* Update doc for auto-device plugin

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>

* Update auto-device plugin doc

* Add openvino_docs_IE_DG_supported_plugins_AUTO into web page

Signed-off-by: Zhengtian Xie <zhengtian.xie@intel.com>

* Update AUTO.md

Co-authored-by: Maxim Shevtsov <maxim.y.shevtsov@intel.com>
2021-08-13 14:23:44 +03:00

16 lines
748 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({{"AUTO_DEVICE_LIST", "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 exec2 = ie.LoadNetwork(network, "AUTO:CPU,GPU");
//! [part1]
return 0;
}