Files
openvino/docs/snippets/HETERO0.cpp
2021-12-09 17:19:18 +03:00

15 lines
330 B
C++

#include <ie_core.hpp>
#include <ngraph/function.hpp>
#include <ngraph/variant.hpp>
int main() {
InferenceEngine::Core core;
auto network = core.ReadNetwork("sample.xml");
auto function = network.getFunction();
//! [part0]
for (auto && op : function->get_ops())
op->get_rt_info()["affinity"] = "CPU";
//! [part0]
return 0;
}