* Removed Intel MYRIAD plugin * Removed Intel MYIAD from CI files * Removed Intel MYRIAD from cmake folder * Removed MYRIAD, HDDL from samples * Removed MYRIAD, HDDL from scripts folder * Removed MYRIAD from bindings folder (C and Python API) * Removed MYRIAD tests * Removed MYRIAD from tests folder * Removed MYRIAD from tools folder * Removed HDDL (VAD), MYRIAD (NSC2) from documentation * Fixed build for AUTO unit tests * Fixed clang code style * Fixed comments and issues * removed MYRIAD from AUTO tests * Disabled MULTI tests in CI * Update docs/OV_Runtime_UG/auto_device_selection.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> * Update docs/get_started/get_started_demos.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> * Update docs/OV_Runtime_UG/deployment/local-distribution.md Co-authored-by: Yuan Xu <yuan1.xu@intel.com> Co-authored-by: Yuan Xu <yuan1.xu@intel.com>
37 lines
1.4 KiB
C++
37 lines
1.4 KiB
C++
#include <openvino/openvino.hpp>
|
|
|
|
int main() {
|
|
ov::Core core;
|
|
|
|
// Read a network in IR, PaddlePaddle, or ONNX format:
|
|
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
|
|
{
|
|
//! [part4]
|
|
// Example 1
|
|
ov::CompiledModel compiled_model0 = core.compile_model(model, "AUTO",
|
|
ov::hint::model_priority(ov::hint::Priority::HIGH));
|
|
ov::CompiledModel compiled_model1 = core.compile_model(model, "AUTO",
|
|
ov::hint::model_priority(ov::hint::Priority::MEDIUM));
|
|
ov::CompiledModel compiled_model2 = core.compile_model(model, "AUTO",
|
|
ov::hint::model_priority(ov::hint::Priority::LOW));
|
|
/************
|
|
Assume that all the devices (CPU, GPU, and MYRIAD) can support all the models.
|
|
Result: compiled_model0 will use GPU, compiled_model1 will use MYRIAD, compiled_model2 will use CPU.
|
|
************/
|
|
|
|
// Example 2
|
|
ov::CompiledModel compiled_model3 = core.compile_model(model, "AUTO",
|
|
ov::hint::model_priority(ov::hint::Priority::LOW));
|
|
ov::CompiledModel compiled_model4 = core.compile_model(model, "AUTO",
|
|
ov::hint::model_priority(ov::hint::Priority::MEDIUM));
|
|
ov::CompiledModel compiled_model5 = core.compile_model(model, "AUTO",
|
|
ov::hint::model_priority(ov::hint::Priority::LOW));
|
|
/************
|
|
Assume that all the devices (CPU, GPU, and MYRIAD) can support all the models.
|
|
Result: compiled_model3 will use GPU, compiled_model4 will use GPU, compiled_model5 will use MYRIAD.
|
|
************/
|
|
//! [part4]
|
|
}
|
|
return 0;
|
|
}
|