Files
openvino/docs/snippets/MULTI0.cpp
Karol Blaszczak fe41b8eacc Docs multiplugin page-wide tabs merge (#11461) (#11784)
* Docs multiplugin page-wide tabs merge

porting to master changes aligning multi plugin with other articles already present in 22.1

* Update docs/snippets/MULTI4.cpp

* Update docs/snippets/MULTI4.cpp
2022-06-08 16:56:37 +02:00

27 lines
821 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("HDDL,GPU"));
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:HDDL,GPU");
ov::CompiledModel compileModel2 = core.compile_model(model, "MULTI", ov::device::priorities("HDDL,GPU"));
//! [part0]
return 0;
}