Skip to content

Commit 8168c91

Browse files
sfatimarsfatimar
andauthored
Sahar/fix documentation shared lib (#5926)
* Update OpenVINO-ExecutionProvider.Md update openvino-executionprovider.md for shared library * Update Build.md updated --build_shared_lib flag for building openvino shared provider lib * Update Dockerfile.openvino building for shared library with the new changes for openvino shared lib * Revert "Update Build.md" This reverts commit c9cf5fe. * Revert "Update Dockerfile.openvino " This reverts commit e1624e4. * Update OpenVINO-ExecutionProvider.md fix documentation to the shared library Co-authored-by: sfatimar <sahar.fatima@intel/com>
1 parent 8736865 commit 8168c91

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

docs/execution_providers/OpenVINO-ExecutionProvider.md

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ session.set_providers(['OpenVINOExecutionProvider'], [{Key1 : Value1, Key2 : Val
2020
*Note that this causes the InferenceSession to be re-initialized, which may cause model recompilation and hardware re-initialization*
2121

2222
### C/C++ API
23-
All the options (key-value pairs) need to be concantenated into a string as shown below and passed to OrtSessionOptionsAppendExecutionProviderEx_OpenVINO() API as shown below:-
23+
All the options shown below are passed to SessionOptionsAppendExecutionProvider_OpenVINO() API and populated in the struct OrtOpenVINOProviderOptions in an example shown below, for example for CPU device type:-
2424

2525
```
26-
std::string settings_str;
27-
settings_str.append("Key1|Value1\n");
28-
settings_str.append("Key2|Value2\n");
29-
settings_str.append("Key3|Value3\n");
30-
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProviderEx_OpenVINO(sf, settings_str.c_str()));
26+
OrtOpenVINOProviderOptions options;
27+
options.device_type = "CPU_FP32";
28+
options.enable_vpu_fast_compile = 0;
29+
options.device_id = "";
30+
options.num_of_threads = 8;
31+
SessionOptionsAppendExecutionProvider_OpenVINO(session_options, &options);
3132
```
3233

3334
### Available configuration options
@@ -67,7 +68,7 @@ SessionOptions::SetGraphOptimizationLevel(ORT_DISABLE_ALL);
6768
```
6869

6970
### Deprecated: Dynamic device type selection
70-
**Note: This API has been deprecated. Please use the Key-Value mechanism mentioned above to set the 'device-type' option.**
71+
**Note: This API has been deprecated. Please use the mechanism mentioned above to set the 'device-type' option.**
7172
When ONNX Runtime is built with OpenVINO Execution Provider, a target hardware option needs to be provided. This build time option becomes the default target harware the EP schedules inference on. However, this target may be overriden at runtime to schedule inference on a different hardware as shown below.
7273

7374
Note. This dynamic hardware selection is optional. The EP falls back to the build-time default selection if no dynamic hardware option value is specified.
@@ -82,22 +83,12 @@ onnxruntime.capi._pybind_state.set_openvino_device("<harware_option>")
8283

8384
### C/C++ API
8485

85-
Append the settings string "device_type|<hardware_option>\n" to the EP settings string. Example shown below for the CPU_FP32 option:
86-
```
87-
std::string settings_str;
88-
...
89-
settings_str.append("device_type|CPU_FP32\n");
90-
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProviderEx_OpenVINO(sf, settings_str.c_str()));
91-
```
92-
93-
94-
### C/C++ API
95-
Append the settings string "device_id|<device_id>\n" to the EP settings string, where <device_id> is the unique identifier of the hardware device.
86+
Append the settings string "<hardware_option>" to the EP settings string. Example shown below for the CPU_FP32 option:
9687
```
9788
std::string settings_str;
9889
...
99-
settings_str.append("device_id|<device_id>\n");
100-
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProviderEx_OpenVINO(sf, settings_str.c_str()));
90+
settings_str.append("CPU_FP32");
91+
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_OpenVINO(sf, settings_str.c_str()));
10192
```
10293

10394
## ONNX Layers supported using OpenVINO
@@ -280,4 +271,4 @@ Improved throughput that multiple devices can deliver (compared to single-device
280271
More consistent performance, since the devices can now share the inference burden (so that if one device is becoming too busy, another device can take more of the load)
281272

282273
For more information on Multi-Device plugin of OpenVINO, please refer to the following
283-
[documentation](https://docs.openvinotoolkit.org/latest/openvino_docs_IE_DG_supported_plugins_MULTI.html#introducing_multi_device_execution).
274+
[documentation](https://docs.openvinotoolkit.org/latest/openvino_docs_IE_DG_supported_plugins_MULTI.html#introducing_multi_device_execution).

0 commit comments

Comments
 (0)