Skip to content

Commit 05a2c0c

Browse files
authored
Update OpenVINO-ExecutionProvider.Md
update openvino-executionprovider.md for shared library
1 parent 26e6ced commit 05a2c0c

File tree

1 file changed

+8
-41
lines changed

1 file changed

+8
-41
lines changed

docs/execution_providers/OpenVINO-ExecutionProvider.md

Lines changed: 8 additions & 41 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:-
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
@@ -66,40 +67,6 @@ sess = onnxruntime.InferenceSession(<path_to_model_file>, options)
6667
SessionOptions::SetGraphOptimizationLevel(ORT_DISABLE_ALL);
6768
```
6869

69-
### 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-
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.
72-
73-
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.
74-
75-
### Python API
76-
```
77-
import onnxruntime
78-
onnxruntime.capi._pybind_state.set_openvino_device("<harware_option>")
79-
# Create session after this
80-
```
81-
*This property persists and gets applied to new sessions until it is explicity unset. To unset, assign a null string ("").*
82-
83-
### C/C++ API
84-
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.
96-
```
97-
std::string settings_str;
98-
...
99-
settings_str.append("device_id|<device_id>\n");
100-
Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProviderEx_OpenVINO(sf, settings_str.c_str()));
101-
```
102-
10370
## ONNX Layers supported using OpenVINO
10471

10572
The table below shows the ONNX layers supported and validated using OpenVINO Execution Provider.The below table also lists the Intel hardware support for each of the layers. CPU refers to Intel<sup>®</sup>
@@ -280,4 +247,4 @@ Improved throughput that multiple devices can deliver (compared to single-device
280247
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)
281248

282249
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).
250+
[documentation](https://docs.openvinotoolkit.org/latest/openvino_docs_IE_DG_supported_plugins_MULTI.html#introducing_multi_device_execution).

0 commit comments

Comments
 (0)