Skip to content

Commit

Permalink
try fo fix test document issue
Browse files Browse the repository at this point in the history
Signed-off-by: Hu, Yuan2 <[email protected]>
  • Loading branch information
tiger100256-hu committed Mar 17, 2022
1 parent efc4497 commit c4db970
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
11 changes: 11 additions & 0 deletions docs/OV_Runtime_UG/multi_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Basically, there are three ways to specify the devices to be use by the "MULTI":
@sphinxdirective

.. tab:: C++

.. doxygensnippet:: docs/snippets/MULTI0.cpp
:language: cpp
:fragment: [part0]
Expand All @@ -49,6 +50,7 @@ Notice that the priorities of the devices can be changed in real time for the ex
@sphinxdirective

.. tab:: C++

.. doxygensnippet:: docs/snippets/MULTI1.cpp
:language: cpp
:fragment: [part1]
Expand Down Expand Up @@ -77,6 +79,7 @@ A simple programmatic way to enumerate the devices and use with the multi-device
@sphinxdirective

.. tab:: C++

.. doxygensnippet:: docs/snippets/MULTI2.cpp
:language: cpp
:fragment: [part2]
Expand All @@ -96,6 +99,7 @@ So the explicit configuration to use both would be "MULTI:MYRIAD.1.2-ma2480,MYRI
@sphinxdirective

.. tab:: C++

.. doxygensnippet:: docs/snippets/MULTI3.cpp
:language: cpp
:fragment: [part3]
Expand All @@ -108,6 +112,7 @@ As discussed in the first section, you shall configure each individual device as
@sphinxdirective

.. tab:: C++

.. doxygensnippet:: docs/snippets/MULTI4.cpp
:language: cpp
:fragment: [part4]
Expand All @@ -125,6 +130,7 @@ You can use the [configure devices](supported_plugins/config_properties.md) to q
@sphinxdirective

.. tab:: C++

.. doxygensnippet:: docs/snippets/MULTI5.cpp
:language: cpp
:fragment: [part5]
Expand Down Expand Up @@ -193,6 +199,7 @@ You can set the configuration directly as a string, or use the metric key `MULTI
@sphinxdirective

.. tab:: Python

.. doxygensnippet:: docs/snippets/ov_multi.py
:language: python
:fragment: [Option_1]
Expand All @@ -205,6 +212,7 @@ You can set the configuration directly as a string, or use the metric key `MULTI
@sphinxdirective

.. tab:: Python

.. doxygensnippet:: docs/snippets/ov_multi.py
:language: python
:fragment: [Option_2]
Expand Down Expand Up @@ -235,6 +243,7 @@ A simple programmatic way to enumerate the devices and use with the multi-device
@sphinxdirective

.. tab:: Python

.. doxygensnippet:: docs/snippets/ov_multi.py
:language: python
:fragment: [available_devices_1]
Expand All @@ -255,6 +264,7 @@ So the explicit configuration to use both would be "MULTI:MYRIAD.1.2-ma2480,MYRI
@sphinxdirective

.. tab:: Python

.. doxygensnippet:: docs/snippets/ov_multi.py
:language: python
:fragment: [available_devices_2]
Expand All @@ -268,6 +278,7 @@ It is possible to configure each individual device as usual and then create the
@sphinxdirective

.. tab:: Python

.. doxygensnippet:: docs/snippets/ov_multi.py
:language: python
:fragment: [set_property]
Expand Down
1 change: 0 additions & 1 deletion docs/snippets/MULTI0.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <openvino/openvino.hpp>

int main() {
using namespace InferenceEngine;
//! [part0]
ov::Core core;
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
Expand Down
1 change: 0 additions & 1 deletion docs/snippets/MULTI1.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <openvino/openvino.hpp>

int main() {
using namespace InferenceEngine;
//! [part1]
ov::Core core;
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
Expand Down
1 change: 0 additions & 1 deletion docs/snippets/MULTI2.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <openvino/openvino.hpp>

int main() {
using namespace InferenceEngine;
//! [part2]
ov::Core core;
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
Expand Down
8 changes: 4 additions & 4 deletions docs/snippets/ov_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
model_path = "/openvino_CI_CD/result/install_pkg/tests/test_model_zoo/core/models/ir/add_abc.xml"
path_to_model = "/openvino_CI_CD/result/install_pkg/tests/test_model_zoo/core/models/ir/add_abc.xml"
def Option_1():
#! [option_1]
#! [Option_1]
core = Core()

# Read a network in IR or ONNX format
model = core.read_model(model_path)
compiled_model = core.compile_model(model=model, device_name="MULTI:CPU,GPU")
#! [option_1]
#! [Option_1]

def Option_2():
#! [option_2]
#! [Option_2]
core = Core()

# Read a network in IR or ONNX format
Expand All @@ -23,7 +23,7 @@ def Option_2():
core.set_property(device_name="MULTI", properties={"MULTI_DEVICE_PRIORITIES":"GPU"})
core.set_property(device_name="MULTI", properties={"MULTI_DEVICE_PRIORITIES":"HDDL,GPU"})
core.set_property(device_name="MULTI", properties={"MULTI_DEVICE_PRIORITIES":"CPU,HDDL,GPU"})
#! [option_2]
#! [Option_2]

def available_devices_1():
#! [available_devices_1]
Expand Down

0 comments on commit c4db970

Please sign in to comment.