OpenVINO Execution Provider plugin for ONNX Runtime
Project description
ONNX Runtime OpenVINO Execution Provider Plugin
This package provides the OpenVINO™ Execution Provider plugin for ONNX Runtime.
Installation
Prerequisites
-
ONNX Runtime: Install separately (this package does NOT include ONNX Runtime)
pip install onnxruntime>=1.23.0
-
Platform: Pre-built wheels available for:
- Windows x64
- Linux x86_64 (manylinux_2_28 compatible — glibc 2.28+, e.g. RHEL 8, Ubuntu 20.04+)
Install the Plugin
pip install onnxruntime-ep-openvino
Note: This package is distributed as binary wheels only. If no wheel is available for your platform/Python version, installation will fail. Source builds are not supported.
Usage
Basic Example
import onnxruntime as ort
import onnxruntime_ep_openvino as openvino_ep
# Get the plugin library path
ep_lib_path = openvino_ep.get_library_path()
# Register the plugin with ONNX Runtime
registration_name = "openvino_ep"
ort.register_execution_provider_library(registration_name, ep_lib_path)
# Get the EP name
ep_name = openvino_ep.get_ep_name()
# Get available OpenVINO devices
all_ep_devices = ort.get_ep_devices()
openvino_devices = [d for d in all_ep_devices if d.ep_name == ep_name]
if not openvino_devices:
raise RuntimeError("No OpenVINO devices found")
# Select OpenVINO CPU device
cpu_devices = [d for d in openvino_devices if d.ep_metadata.get("ov_device") == "CPU"]
if not cpu_devices:
raise RuntimeError("No OpenVINO CPU device found")
# Create session options
sess_options = ort.SessionOptions()
# Add OpenVINO EP to the session
ep_options = {}
sess_options.add_provider_for_devices([cpu_devices[0]], ep_options)
# Create inference session
model_path = "path/to/model.onnx"
session = ort.InferenceSession(model_path, sess_options=sess_options)
# Run inference
# ... your inference code here ...
# Clean up
del session
# Unregister the library after all sessions are closed
ort.unregister_execution_provider_library(registration_name)
Helper Functions
get_library_path()
Returns the full path to the OpenVINO EP plugin library.
import onnxruntime_ep_openvino as openvino_ep
lib_path = openvino_ep.get_library_path()
print(f"Plugin library: {lib_path}")
get_ep_name()
Returns the name of the Execution Provider: "OpenVINOExecutionProvider"
ep_name = openvino_ep.get_ep_name()
print(f"EP name: {ep_name}")
get_ep_names()
Returns a list containing the EP name (for compatibility with multi-EP plugins).
ep_names = openvino_ep.get_ep_names()
# Returns: ['OpenVINOExecutionProvider']
Troubleshooting
Library Not Found
If you get a FileNotFoundError, ensure:
- The package is properly installed:
pip list | grep onnxruntime-ep-openvino - Reinstall if needed:
pip install --force-reinstall onnxruntime-ep-openvino
Note: OpenVINO and TBB libraries are bundled with the package - no separate installation needed!
No Devices Found
If get_ep_devices() doesn't return OpenVINO devices:
- Check that the plugin is registered before calling
get_ep_devices() - Verify your hardware is supported by OpenVINO
- Restart your Python session after installation
Version Compatibility
- Requires ONNX Runtime 1.23.0 or later
License
This project is licensed under the MIT License
Copyright © Intel Corporation. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onnxruntime_ep_openvino-1.4.1-py3-none-win_amd64.whl.
File metadata
- Download URL: onnxruntime_ep_openvino-1.4.1-py3-none-win_amd64.whl
- Upload date:
- Size: 63.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c464174116a0929315de7cb9accb52591ebe5ce8de53a6355274c3970468240
|
|
| MD5 |
5abdb767cd35a70701bbdec447bb6bad
|
|
| BLAKE2b-256 |
98cab7d21d86c50c5b96717bff75d9f684cfa3c23c87395c8a9bd9ed09e853e8
|
File details
Details for the file onnxruntime_ep_openvino-1.4.1-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: onnxruntime_ep_openvino-1.4.1-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 53.2 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63af2996809a63db4d7b965b1827ade94e8153c6e11438bd46c2407dc3a07399
|
|
| MD5 |
43093fed1a984e58b85418f260d5f82a
|
|
| BLAKE2b-256 |
8b43a0057ddd60b8364213e5870c6c3dc196a5ae2aa57a38a26af6dca070f0dd
|