openvino: Unable to get working OpenVINO/ONNX GPU accelleration on Ubuntu 24.04, Intel i7 1355U
OpenVINO Version
onnxruntime-openvino 1.17.1
Operating System
Other (Please specify in description)
Hardware Architecture
x86 (64 bits)
Target Platform
DT Research tablet DT302-RP with Intel i7 1355U , running Ubuntu 24.04 LTS
Build issue description
We are trying to evaluate the possible performance improvement when running AI inference through the OpenVINO framework. Our AI models are ONNX based, and as such the integration between OpenVINO and ONNX need to work.
We have tried using the provided demonstration Docker container, but it is unable to find the GPU.
Installing the OpenVINO framework on the host OS directly, does provide the GPU as an option, but the Python version on Ubuntu 24.04 is too new that there is a PIP package available for the OpenVINO ONNX integration. We have then continued to build the ONNX integration manually, which worked, but the OpenVINO execution provider does not load.
Build script or step-by-step to reproduce
Run the provided docker container:
sentispec-admin@sentispec-DT302RP-dsv-1:~$ docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri openvino/onnxruntime_ep_ubuntu20:latest
onnxruntimedev@f997be011eee:~$ python3 -c "from openvino import Core; print(Core().available_devices)"
['CPU', 'GNA']
onnxruntimedev@f997be011eee:~$ pip list
Package Version
-------------------- --------------------
coloredlogs 15.0.1
dbus-python 1.2.16
distro-info 0.23+ubuntu1.1
flatbuffers 23.5.26
humanfriendly 10.0
mpmath 1.3.0
numpy 1.24.4
onnxruntime-openvino 1.17.1
packaging 23.2
pip 23.3.2
protobuf 4.25.3
PyGObject 3.36.0
python-apt 2.0.1+ubuntu0.20.4.1
setuptools 45.2.0
sympy 1.12
unattended-upgrades 0.1
wheel 0.34.2
[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: python3.8 -m pip install --upgrade pip
onnxruntimedev@f997be011eee:~$
Install OpenVINO manually on host OS:
Follow: https://docs.openvino.ai/2022.3/openvino_docs_install_guides_configurations_for_intel_gpu.html
pip install openvino newest version
root@sentispec-DT302RP-dsv-1:~# source openvino_env/bin/activate (openvino_env) root@sentispec-DT302RP-dsv-1:~# python3 -c "from openvino import Core; print(Core().available_devices)" ['CPU', 'GPU'] (openvino_env) root@sentispec-DT302RP-dsv-1:~#
Build ONNX with OpenVino wheel to manual installation:
https://onnxruntime.ai/docs/build/eps.html#linux-4
pip install /home/sentispec-admin/onnxruntime_openvino-1.19.0-cp312-cp312-linux_x86_64.whl
Try to use it:
(openvino_env) root@sentispec-DT302RP-dsv-1:~# python3
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import onnxruntime as ort
>>> session = ort.InferenceSession("/path/to/model", providers=["OpenVINOExecutionProvider"])
/root/openvino_env/lib/python3.12/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'OpenVINOExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
Happy to provide any details, decided to keep it as short as possible for now. I am aware ubuntu 24.04 is not currently officially supported but was thinking that it is planned e.g. also regarding this: https://github.com/openvinotoolkit/openvino/pull/23905
Relevant log output
No response
Issue submission checklist
- I’m reporting an issue. It’s not a question.
- I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (3 by maintainers)
happy to report that it works now with the updated docker images:
when testing above, i forgot the additional --group-add which makes it work on the onnx docker image release a couple of months ago.
@khhsenti also based on the System Requirements for environment it lists Python 3.8 to Python 3.11 as a requirement. I see that on the details you are using Python 3.12.3 as it is the default version on Ubuntu 24.04. If not already done so, is it possible to try using Python 3.11 if you are building ONNX with OpenVINO?
Note I am able to access the GPU within Docker on a Meteor Lake system (Core Ultra 7 155H running Ubuntu 24.04 natively on host) using the openvino/ubuntu22_runtime image. This Docker image has driver 23.13.26032.30, whereas openvino/onnxruntime_ep_ubuntu20 has 22.43.24595 which is a bit old (released almost 2 years ago on Dec 2022). So the issue may also be due the fact this image contains an outdated graphics driver.
FYI I’ve tried the steps below and this working for me, hope it does for you as well.
@khhsenti I just setup my own docker from base 24.04 image, added their installs and got gpu acceleration successfully.