[Auto PLUGIN] update Auto docs (#10889)
* update Auto docs
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update python snippets
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove vpu, fix a mistaken in python code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update MYRIAD device full name
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update API name
old API use name Inference Engine API
NEW API usen name OpenVINO Runtime API 2.0
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update tab name, and code format
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix AUTO4 format issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update set_property code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* auto draft
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* mv code into .cpp and .py
modify the devicelist part accoding to the review
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove priority list in code and document
modify the begning of the document
remove perfomance data
remove old API
use compile_model instead of set_property
add a image about cpu accelerate
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix mis print and code is not match document
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* try to fix doc build issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix snippets code compile issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
2022-03-19 23:25:35 +08:00
|
|
|
#include <openvino/openvino.hpp>
|
2021-08-13 19:23:44 +08:00
|
|
|
|
2023-01-16 11:02:17 +04:00
|
|
|
int main() {
|
[Auto PLUGIN] update Auto docs (#10889)
* update Auto docs
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update python snippets
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove vpu, fix a mistaken in python code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update MYRIAD device full name
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update API name
old API use name Inference Engine API
NEW API usen name OpenVINO Runtime API 2.0
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update tab name, and code format
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix AUTO4 format issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update set_property code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* auto draft
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* mv code into .cpp and .py
modify the devicelist part accoding to the review
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove priority list in code and document
modify the begning of the document
remove perfomance data
remove old API
use compile_model instead of set_property
add a image about cpu accelerate
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix mis print and code is not match document
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* try to fix doc build issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix snippets code compile issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
2022-03-19 23:25:35 +08:00
|
|
|
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));
|
|
|
|
|
/************
|
2023-03-08 14:29:08 +01:00
|
|
|
Assume that all the devices (CPU and GPUs) can support all the models.
|
|
|
|
|
Result: compiled_model0 will use GPU.1, compiled_model1 will use GPU.0, compiled_model2 will use CPU.
|
[Auto PLUGIN] update Auto docs (#10889)
* update Auto docs
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update python snippets
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove vpu, fix a mistaken in python code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update MYRIAD device full name
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update API name
old API use name Inference Engine API
NEW API usen name OpenVINO Runtime API 2.0
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update tab name, and code format
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix AUTO4 format issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update set_property code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* auto draft
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* mv code into .cpp and .py
modify the devicelist part accoding to the review
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove priority list in code and document
modify the begning of the document
remove perfomance data
remove old API
use compile_model instead of set_property
add a image about cpu accelerate
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix mis print and code is not match document
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* try to fix doc build issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix snippets code compile issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
2022-03-19 23:25:35 +08:00
|
|
|
************/
|
|
|
|
|
|
|
|
|
|
// 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));
|
|
|
|
|
/************
|
2023-03-08 14:29:08 +01:00
|
|
|
Assume that all the devices (CPU and GPUs) can support all the models.
|
|
|
|
|
Result: compiled_model3 will use GPU.1, compiled_model4 will use GPU.1, compiled_model5 will use GPU.0.
|
[Auto PLUGIN] update Auto docs (#10889)
* update Auto docs
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update python snippets
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove vpu, fix a mistaken in python code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update MYRIAD device full name
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update API name
old API use name Inference Engine API
NEW API usen name OpenVINO Runtime API 2.0
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update tab name, and code format
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix AUTO4 format issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* update set_property code
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* auto draft
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* mv code into .cpp and .py
modify the devicelist part accoding to the review
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* remove priority list in code and document
modify the begning of the document
remove perfomance data
remove old API
use compile_model instead of set_property
add a image about cpu accelerate
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix mis print and code is not match document
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* try to fix doc build issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
* fix snippets code compile issue
Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
2022-03-19 23:25:35 +08:00
|
|
|
************/
|
|
|
|
|
//! [part4]
|
|
|
|
|
}
|
2021-08-13 19:23:44 +08:00
|
|
|
return 0;
|
|
|
|
|
}
|