Files
openvino/docs/snippets/AUTO5.cpp
Xie Zhengtian 59ffa90724 [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>
2021-06-16 16:51:01 +03:00

16 lines
660 B
C++

#include <ie_core.hpp>
int main() {
std::string device_name = "AUTO:CPU,GPU";
const std::map< std::string, std::string > full_config = {};
//! [part5]
InferenceEngine::Core ie;
InferenceEngine::CNNNetwork network = ie.ReadNetwork("sample.xml");
// 'device_name' can be "AUTO:CPU,GPU" to configure the auto-device to use CPU and GPU
InferenceEngine::ExecutableNetwork exeNetwork = ie.LoadNetwork(network, device_name, full_config);
// new metric allows to query the optimization capabilities
std::vector<std::string> device_cap = exeNetwork.GetMetric(METRIC_KEY(OPTIMIZATION_CAPABILITIES));
//! [part5]
return 0;
}