Files
openvino/docs/snippets/MULTI0.cpp
Karol Blaszczak 3dbea43ef1 [DOCS] remove mentions of myriad throughout docs (#15690)
* remove ov::device::thermal

ov::device::thermal was only supported on myriad

* additional cleanup

* remove myriad from AUTO and MULTI

auto n multi n hetero

+ remove mentions of listing myriad devices

* two final fixes

* Update ov_auto.py

---------

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
2023-03-08 17:29:08 +04:00

27 lines
831 B
C++

#include <openvino/openvino.hpp>
int main() {
//! [part0]
ov::Core core;
// Read a model in IR, PaddlePaddle, or ONNX format:
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
// Option 1
// Pre-configure MULTI globally with explicitly defined devices,
// and compile the model on MULTI using the newly specified default device list.
core.set_property("MULTI", ov::device::priorities("GPU.1,GPU.0"));
ov::CompiledModel compileModel0 = core.compile_model(model, "MULTI");
// Option 2
// Specify the devices to be used by MULTI explicitly at compilation.
// The following lines are equivalent:
ov::CompiledModel compileModel1 = core.compile_model(model, "MULTI:GPU.1,GPU.0");
ov::CompiledModel compileModel2 = core.compile_model(model, "MULTI", ov::device::priorities("GPU.1,GPU.0"));
//! [part0]
return 0;
}