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
This commit is contained in:
Karol Blaszczak
2022-06-08 16:56:37 +02:00
committed by GitHub
parent 41a0d3a0f8
commit fe41b8eacc
7 changed files with 221 additions and 281 deletions

View File

@@ -1,20 +1,21 @@
#include <openvino/openvino.hpp>
int main() {
ov::AnyMap hddl_config, gpu_config;
ov::AnyMap myriad_config, gpu_config;
//! [part4]
// configure the HDDL device first
ov::Core core;
// Read a network in IR, PaddlePaddle, or ONNX format:
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
// compile the modle on the multi-device,
// while specifying the configuration (devices along with priorities
// and the configuration of devices):
// When compiling the model on MULTI, configure GPU and HDDL
// (devices, priorities, and device configurations):
ov::CompiledModel compileModel = core.compile_model(model, "MULTI",
ov::device::priorities("HDDL", "GPU"),
ov::device::properties("HDDL", hddl_config),
ov::device::properties("GPU", gpu_config));
ov::device::properties("GPU", gpu_config),
ov::device::properties("HDDL", myriad_config));
// query the optimal number of requests:
// Optionally, query the optimal number of requests:
uint32_t nireq = compileModel.get_property(ov::optimal_number_of_infer_requests);
//! [part4]
return 0;