Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get working OpenVINO/ONNX GPU accelleration on Ubuntu 24.04, Intel i7 1355U #24797

Closed
2 tasks done
khhsenti opened this issue May 31, 2024 · 16 comments
Closed
2 tasks done

Comments

@khhsenti
Copy link

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: #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.
@ilya-lavrenov
Copy link
Contributor

@preetha-intel

@jatinwadhwa921
Copy link

Hi @ilya-lavrenov ,

Installation of ONNX Runtime with OpenVINO

For installing ONNX Runtime, rather than using pip install openvino, please follow these steps:

  1. Download OpenVINO from the following archive: OpenVINO 2024.1 Linux.
  2. Extract the archive and run the setupvars.sh script located in the extracted OpenVINO directory to set up the environment variables.
  3. Build ONNX Runtime after setting up OpenVINO; this should resolve any installation issues.

Running Docker Container

Please use the following command to run the Docker container:

docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri --group-add=$(stat -c "%g" /dev/dri/render*) -v docker_val/:/docker_val <image_name:tag>

This command ensures that the container has the same group permissions as the host for the Direct Rendering Manager (DRM) devices, allowing you to perform inference using GPU devices.

We have tested this setup on Ubuntu 20.04, and i believe it should work on Ubuntu 24.04 as well.

@khhsenti
Copy link
Author

tried running the more elaborate docker command but does not seem to work:

Status: Downloaded newer image for openvino/onnxruntime_ep_ubuntu20:latest
groups: cannot find name for group ID 992
onnxruntimedev@a358b8916a2d:~$ python3 -c "from openvino import Core; print(Core().available_devices)"
['CPU', 'GNA']
onnxruntimedev@a358b8916a2d:~$

@khhsenti
Copy link
Author

tried to add the group in after the container has been created:

docker exec --user=root -it magical_chaplygin groupadd -g 992 render

But still does not work:

test@test-DT302RP:~/openvino$ docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri --group-add=$(stat -c "%g" /dev/dri/render*) --user root openvino/onnxruntime_ep_ubuntu20:latest
groups: cannot find name for group ID 992
root@ad4326d20d2c:/home/onnxruntimedev# groups
root render
root@ad4326d20d2c:/home/onnxruntimedev# python3 -c "from openvino import Core; print(Core().available_devices)"
['CPU', 'GNA']
root@ad4326d20d2c:/home/onnxruntimedev# ls -l /dev/dri/renderD128
crw-rw---- 1 root render 226, 128 Jun 10 07:03 /dev/dri/renderD128
root@ad4326d20d2c:/home/onnxruntimedev#

@jatinwadhwa921
Copy link

Hi, can you share the current GPU driver version that is installed in your ubuntu 24.04 OS and the link for installing the driver

@ncs1
Copy link

ncs1 commented Jun 19, 2024

I'm having the same issue,
GPU (ARC A770) doesn't identify in hello_query_device / clinfo inside docker environment.
Running ub24.04 latest kernel 6.9.5 (checked against ubuntu 6.8 generic one too)
Checked different openvino versions, and other images (intelanalytics).
Running the container with privileged, passing group id render,video doesn't fix it.

@khhsenti
Copy link
Author

Hi, can you share the current GPU driver version that is installed in your ubuntu 24.04 OS and the link for installing the driver

Sure. This is "stock Ubuntu 24.04 LTS", have not installed anything additional. So I don't think I have more details than the kernel version and how the driver informs us in dmesg. It did not look like you have to install a out-of-tree driver to make it work? As OpenVino does find the GPU on the host.

sentispec-admin@sentispec-DT302RP-1:~$ uname -a
Linux sentispec-DT302RP-dhl-1 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
sentispec-admin@sentispec-DT302RP-dhl-1:~$ sudo dmesg | grep i915
[sudo] password for sentispec-admin:
[    2.127483] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    2.145374] i915 0000:00:02.0: vgaarb: deactivate vga console
[    2.145538] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    2.146074] i915 0000:00:02.0: vgaarb: VGA decodes changed: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    2.148779] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/adlp_dmc.bin (v2.20)
[    2.180623] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/adlp_guc_70.bin version 70.20.0
[    2.180631] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc.bin version 7.9.3
[    2.204640] i915 0000:00:02.0: [drm] GT0: HuC: authenticated for all workloads
[    2.205161] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[    2.205171] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[    2.205907] i915 0000:00:02.0: [drm] GT0: GUC: RC enabled
[    2.207523] i915 0000:00:02.0: [drm] Protected Xe Path (PXP) protected content support initialized
[    3.346322] [drm] Initialized i915 1.6.0 20230929 for 0000:00:02.0 on minor 1
[    3.355474] i915 display info: display version: 13
[    3.355478] i915 display info: cursor_needs_physical: no
[    3.355480] i915 display info: has_cdclk_crawl: yes
[    3.355482] i915 display info: has_cdclk_squash: no
[    3.355484] i915 display info: has_ddi: yes
[    3.355486] i915 display info: has_dp_mst: yes
[    3.355488] i915 display info: has_dsb: yes
[    3.355490] i915 display info: has_fpga_dbg: yes
[    3.355492] i915 display info: has_gmch: no
[    3.355493] i915 display info: has_hotplug: yes
[    3.355495] i915 display info: has_hti: no
[    3.355497] i915 display info: has_ipc: yes
[    3.355498] i915 display info: has_overlay: no
[    3.355500] i915 display info: has_psr: yes
[    3.355502] i915 display info: has_psr_hw_tracking: no
[    3.355503] i915 display info: overlay_needs_physical: no
[    3.355505] i915 display info: supports_tv: no
[    3.355507] i915 display info: has_hdcp: yes
[    3.355508] i915 display info: has_dmc: yes
[    3.355510] i915 display info: has_dsc: yes
[    3.360394] fbcon: i915drmfb (fb0) is primary device
[    3.360405] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device

@ncs1
Copy link

ncs1 commented Jun 22, 2024

@khhsenti I just setup my own docker from base 24.04 image, added their installs and got gpu acceleration successfully.

@avitial
Copy link
Contributor

avitial commented Aug 13, 2024

@khhsenti has your issue here been addressed? According to the instructions there are no additional dependencies (i.e. graphics driver) to install within Docker. You can refer to Using OpenVINO™ Toolkit containers with GPU accelerators for additional guidance on accessing GPU.

Please note the latest release of OpenVINO 2024.3.0 just added preview support for Ubuntu 24.04 OS, you may want to have a try and see if the issue you encountered has been addressed in this latest drop. Check out the release notes for additional details. Hope this helps.

@avitial avitial self-assigned this Aug 13, 2024
@avitial
Copy link
Contributor

avitial commented Aug 22, 2024

@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.

# run docker image
$ docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri --group-add=$(stat -c "%g" /dev/dri/render*) -v docker_val/:/docker_val openvino/ubuntu22_runtime:latest

# set the following environment variables as per https://github.com/intel/compute-runtime/issues/720:
$ export NEOReadDebugKeys=1
$ export OverrideGpuAddressSpace=48

# run hello_query_device.py
$ source setupvars.sh
$ python3 samples/python/hello_query_device/hello_query_device.py
[ INFO ] Available devices:
[ INFO ] CPU :
[ INFO ]        SUPPORTED_PROPERTIES:
[ INFO ]                AVAILABLE_DEVICES:
[ INFO ]                RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
[ INFO ]                RANGE_FOR_STREAMS: 1, 22
[ INFO ]                EXECUTION_DEVICES: CPU
[ INFO ]                FULL_DEVICE_NAME: Intel(R) Core(TM) Ultra 7 155H
[ INFO ]                OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN, EXPORT_IMPORT
[ INFO ]                DEVICE_TYPE: Type.INTEGRATED
[ INFO ]                DEVICE_ARCHITECTURE: intel64
[ INFO ]                NUM_STREAMS: 1
[ INFO ]                INFERENCE_NUM_THREADS: 0
[ INFO ]                PERF_COUNT: False
[ INFO ]                INFERENCE_PRECISION_HINT: <Type: 'float32'>
[ INFO ]                PERFORMANCE_HINT: PerformanceMode.LATENCY
[ INFO ]                EXECUTION_MODE_HINT: ExecutionMode.PERFORMANCE
[ INFO ]                PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ]                ENABLE_CPU_PINNING: True
[ INFO ]                SCHEDULING_CORE_TYPE: SchedulingCoreType.ANY_CORE
[ INFO ]                MODEL_DISTRIBUTION_POLICY: set()
[ INFO ]                ENABLE_HYPER_THREADING: True
[ INFO ]                DEVICE_ID:
[ INFO ]                CPU_DENORMALS_OPTIMIZATION: False
[ INFO ]                LOG_LEVEL: Level.NO
[ INFO ]                CPU_SPARSE_WEIGHTS_DECOMPRESSION_RATE: 1.0
[ INFO ]                DYNAMIC_QUANTIZATION_GROUP_SIZE: 32
[ INFO ]                KV_CACHE_PRECISION: <Type: 'float16'>
[ INFO ]                AFFINITY: Affinity.HYBRID_AWARE
[ INFO ]
[ INFO ] GPU :
[ INFO ]        SUPPORTED_PROPERTIES:
[ INFO ]                AVAILABLE_DEVICES: 0
[ INFO ]                RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 2, 1
[ INFO ]                RANGE_FOR_STREAMS: 1, 2
[ INFO ]                OPTIMAL_BATCH_SIZE: 1
[ INFO ]                MAX_BATCH_SIZE: 1
[ INFO ]                DEVICE_ARCHITECTURE: GPU: vendor=0x8086 arch=v12.70.0
[ INFO ]                FULL_DEVICE_NAME: Intel(R) Graphics [0x7d55] (iGPU)
[ INFO ]                DEVICE_UUID: 8680557d080000000002000000000000
[ INFO ]                DEVICE_LUID: 409a0000499a0000
[ INFO ]                DEVICE_TYPE: Type.INTEGRATED
[ INFO ]                DEVICE_GOPS: {<Type: 'float16'>: 9216.0, <Type: 'float32'>: 4608.0, <Type: 'int8_t'>: 18432.0, <Type: 'uint8_t'>: 18432.0}
[ INFO ]                OPTIMIZATION_CAPABILITIES: FP32, BIN, FP16, INT8, EXPORT_IMPORT
[ INFO ]                GPU_DEVICE_TOTAL_MEM_SIZE: 26662154240
[ INFO ]                GPU_UARCH_VERSION: 12.70.0
[ INFO ]                GPU_EXECUTION_UNITS_COUNT: 128
[ INFO ]                GPU_MEMORY_STATISTICS: {}
[ INFO ]                PERF_COUNT: False
[ INFO ]                MODEL_PRIORITY: Priority.MEDIUM
[ INFO ]                GPU_HOST_TASK_PRIORITY: Priority.MEDIUM
[ INFO ]                GPU_QUEUE_PRIORITY: Priority.MEDIUM
[ INFO ]                GPU_QUEUE_THROTTLE: Priority.MEDIUM
[ INFO ]                GPU_ENABLE_SDPA_OPTIMIZATION: True
[ INFO ]                GPU_ENABLE_LOOP_UNROLLING: True
[ INFO ]                GPU_DISABLE_WINOGRAD_CONVOLUTION: False
[ INFO ]                CACHE_DIR:
[ INFO ]                CACHE_MODE: CacheMode.OPTIMIZE_SPEED
[ INFO ]                PERFORMANCE_HINT: PerformanceMode.LATENCY
[ INFO ]                EXECUTION_MODE_HINT: ExecutionMode.PERFORMANCE
[ INFO ]                COMPILATION_NUM_THREADS: 22
[ INFO ]                NUM_STREAMS: 1
[ INFO ]                PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ]                INFERENCE_PRECISION_HINT: <Type: 'float16'>
[ INFO ]                ENABLE_CPU_PINNING: False
[ INFO ]                DEVICE_ID: 0
[ INFO ]                DYNAMIC_QUANTIZATION_GROUP_SIZE: 0
# to check driver version
$ export gfx_version=$(dpkg-query --showformat='${Version}' --show intel-opencl-icd) && echo $gfx_version
22.43.24595.35+i538~20.04

@khhsenti
Copy link
Author

@avitial have been busy with something else lately, will take another look at this during next week.

Thank you for the pointers perhaps this is solved by the new release

@0312birdzhang
Copy link

I have some problem, and i found some models can run on GPU(like hello_classification sample), some not.
When hardcode core.compile_model with GPU, some error occurs:

    ...
    compiled_model = core.compile_model(model, 'GPU')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/myproject/.venv/lib/python3.12/site-packages/openvino/runtime/ie_api.py", line 543, in compile_model
    super().compile_model(model, device_name, {} if config is None else config),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Exception from src/inference/src/cpp/core.cpp:104:
Exception from src/inference/src/dev/plugin.cpp:53:
Check 'false' failed at src/plugins/intel_gpu/src/plugin/program_builder.cpp:185:
[GPU] ProgramBuilder build failed!
Program build failed(0_part_15):
5:13882:2: error: use of undeclared identifier 'eltwise0_data0'
 FUSED_OPS_VEC;
 ^
5:12712:2: note: expanded from macro 'FUSED_OPS_VEC'
....
5:13893:2: error: use of undeclared identifier 'eltwise0_data0'
 FUSED_OPS_SCALAR;
 ^
5:12800:2: note: expanded from macro 'FUSED_OPS_SCALAR'

openvino version: 2024.3.0

@khhsenti
Copy link
Author

khhsenti commented Aug 27, 2024

@avitial here is the output from running what you are suggesting:

sentispec-admin@sentispec-DT302RP-dhl-1:~$ docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri --group-add=$(stat -c "%g" /dev/dri/render*) openvino/ubuntu22_runtime:latest
groups: cannot find name for group ID 992
openvino@3770a58ce989:/opt/intel/openvino_2024.3.0.16041$ export NEOReadDebugKeys=1
openvino@3770a58ce989:/opt/intel/openvino_2024.3.0.16041$ export OverrideGpuAddressSpace=48
openvino@3770a58ce989:/opt/intel/openvino_2024.3.0.16041$ source setupvars.sh
[setupvars.sh] OpenVINO environment initialized
openvino@3770a58ce989:/opt/intel/openvino_2024.3.0.16041$ python3 samples/python/hello_query_device/hello_query_device.py
[ INFO ] Available devices:
[ INFO ] CPU :
[ INFO ] 	SUPPORTED_PROPERTIES:
[ INFO ] 		AVAILABLE_DEVICES: 
[ INFO ] 		RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
[ INFO ] 		RANGE_FOR_STREAMS: 1, 12
[ INFO ] 		EXECUTION_DEVICES: CPU
[ INFO ] 		FULL_DEVICE_NAME: 13th Gen Intel(R) Core(TM) i7-1355U
[ INFO ] 		OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN, EXPORT_IMPORT
[ INFO ] 		DEVICE_TYPE: Type.INTEGRATED
[ INFO ] 		DEVICE_ARCHITECTURE: intel64
[ INFO ] 		NUM_STREAMS: 1
[ INFO ] 		INFERENCE_NUM_THREADS: 0
[ INFO ] 		PERF_COUNT: False
[ INFO ] 		INFERENCE_PRECISION_HINT: <Type: 'float32'>
[ INFO ] 		PERFORMANCE_HINT: PerformanceMode.LATENCY
[ INFO ] 		EXECUTION_MODE_HINT: ExecutionMode.PERFORMANCE
[ INFO ] 		PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ] 		ENABLE_CPU_PINNING: True
[ INFO ] 		SCHEDULING_CORE_TYPE: SchedulingCoreType.ANY_CORE
[ INFO ] 		MODEL_DISTRIBUTION_POLICY: set()
[ INFO ] 		ENABLE_HYPER_THREADING: True
[ INFO ] 		DEVICE_ID: 
[ INFO ] 		CPU_DENORMALS_OPTIMIZATION: False
[ INFO ] 		LOG_LEVEL: Level.NO
[ INFO ] 		CPU_SPARSE_WEIGHTS_DECOMPRESSION_RATE: 1.0
[ INFO ] 		DYNAMIC_QUANTIZATION_GROUP_SIZE: 32
[ INFO ] 		KV_CACHE_PRECISION: <Type: 'float16'>
[ INFO ] 		AFFINITY: Affinity.HYBRID_AWARE
[ INFO ] 
[ INFO ] GPU :
[ INFO ] 	SUPPORTED_PROPERTIES:
[ INFO ] 		AVAILABLE_DEVICES: 0
[ INFO ] 		RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 2, 1
[ INFO ] 		RANGE_FOR_STREAMS: 1, 2
[ INFO ] 		OPTIMAL_BATCH_SIZE: 1
[ INFO ] 		MAX_BATCH_SIZE: 1
[ INFO ] 		DEVICE_ARCHITECTURE: GPU: vendor=0x8086 arch=v12.3.0
[ INFO ] 		FULL_DEVICE_NAME: Intel(R) Graphics [0xa721] (iGPU)
[ INFO ] 		DEVICE_UUID: 868021a7040000000002000000000000
[ INFO ] 		DEVICE_LUID: 409a0000499a0000
[ INFO ] 		DEVICE_TYPE: Type.INTEGRATED
[ INFO ] 		DEVICE_GOPS: {<Type: 'float16'>: 3993.599853515625, <Type: 'float32'>: 1996.7999267578125, <Type: 'int8_t'>: 7987.19970703125, <Type: 'uint8_t'>: 7987.19970703125}
[ INFO ] 		OPTIMIZATION_CAPABILITIES: FP32, BIN, FP16, INT8, EXPORT_IMPORT
[ INFO ] 		GPU_DEVICE_TOTAL_MEM_SIZE: 13163388928
[ INFO ] 		GPU_UARCH_VERSION: 12.3.0
[ INFO ] 		GPU_EXECUTION_UNITS_COUNT: 96
[ INFO ] 		GPU_MEMORY_STATISTICS: {}
[ INFO ] 		PERF_COUNT: False
[ INFO ] 		MODEL_PRIORITY: Priority.MEDIUM
[ INFO ] 		GPU_HOST_TASK_PRIORITY: Priority.MEDIUM
[ INFO ] 		GPU_QUEUE_PRIORITY: Priority.MEDIUM
[ INFO ] 		GPU_QUEUE_THROTTLE: Priority.MEDIUM
[ INFO ] 		GPU_ENABLE_SDPA_OPTIMIZATION: True
[ INFO ] 		GPU_ENABLE_LOOP_UNROLLING: True
[ INFO ] 		GPU_DISABLE_WINOGRAD_CONVOLUTION: False
[ INFO ] 		CACHE_DIR: 
[ INFO ] 		CACHE_MODE: CacheMode.OPTIMIZE_SPEED
[ INFO ] 		PERFORMANCE_HINT: PerformanceMode.LATENCY
[ INFO ] 		EXECUTION_MODE_HINT: ExecutionMode.PERFORMANCE
[ INFO ] 		COMPILATION_NUM_THREADS: 12
[ INFO ] 		NUM_STREAMS: 1
[ INFO ] 		PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ] 		INFERENCE_PRECISION_HINT: <Type: 'float16'>
[ INFO ] 		ENABLE_CPU_PINNING: False
[ INFO ] 		DEVICE_ID: 0
[ INFO ] 		DYNAMIC_QUANTIZATION_GROUP_SIZE: 0
[ INFO ]

driver version (on host):

sentispec-admin@sentispec-DT302RP-dhl-1:~$ dpkg-query --showformat='${Version}' --show intel-opencl-icd
dpkg-query: no packages found matching intel-opencl-icd

inside your suggested docker container:

openvino@726f23c593b5:/opt/intel/openvino_2024.3.0.16041$ dpkg-query --showformat='${Version}' --show intel-opencl-icd
23.13.26032.30

But, the Docker image suggested here, does not provide ONNX runtime, which is a requirement from our side. On the newest release of the ONNX docker image (openvino/onnxruntime_ep_ubuntu20:latest) i get:

onnxruntimedev@1e8612eebb6f:~$ python3 -c "from openvino import Core; print(Core().available_devices)"
['CPU']

onnxruntimedev@1e8612eebb6f:~$ dpkg-query --showformat='${Version}' --show intel-opencl-icd
22.43.24595.35+i538~20.04

@khhsenti
Copy link
Author

khhsenti commented Aug 27, 2024

i just tried building my own docker image based on: https://github.com/microsoft/onnxruntime/blob/main/dockerfiles/Dockerfile.openvino

it still does not work:

sentispec-admin@sentispec-DT302RP-dhl-1:~$ docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri 6f4428b35eb16278f356d95fd1c0ec9482fcb24154db243070631775600cda83
onnxruntimedev@d191149025e7:~$ python3 -c "from openvino import Core; print(Core().available_devices)"
['CPU']
onnxruntimedev@d191149025e7:~$ dpkg-query --showformat='${Version}' --show intel-opencl-icd
23.13.26032.30
onnxruntimedev@d191149025e7:~$ export NEOReadDebugKeys=1
onnxruntimedev@d191149025e7:~$ export OverrideGpuAddressSpace=48
onnxruntimedev@d191149025e7:~$ python3 /opt/intel/openvino_2024.2.0.15519/samples/python/hello_query_device/hello_query_device.py
[ INFO ] Available devices:
[ INFO ] CPU :
[ INFO ] 	SUPPORTED_PROPERTIES:
[ INFO ] 		AVAILABLE_DEVICES: 
[ INFO ] 		RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
[ INFO ] 		RANGE_FOR_STREAMS: 1, 12
[ INFO ] 		EXECUTION_DEVICES: CPU
[ INFO ] 		FULL_DEVICE_NAME: 13th Gen Intel(R) Core(TM) i7-1355U
[ INFO ] 		OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN, EXPORT_IMPORT
[ INFO ] 		DEVICE_TYPE: Type.INTEGRATED
[ INFO ] 		DEVICE_ARCHITECTURE: intel64
[ INFO ] 		NUM_STREAMS: 1
[ INFO ] 		INFERENCE_NUM_THREADS: 0
[ INFO ] 		PERF_COUNT: False
[ INFO ] 		INFERENCE_PRECISION_HINT: <Type: 'float32'>
[ INFO ] 		PERFORMANCE_HINT: PerformanceMode.LATENCY
[ INFO ] 		EXECUTION_MODE_HINT: ExecutionMode.PERFORMANCE
[ INFO ] 		PERFORMANCE_HINT_NUM_REQUESTS: 0
[ INFO ] 		ENABLE_CPU_PINNING: True
[ INFO ] 		SCHEDULING_CORE_TYPE: SchedulingCoreType.ANY_CORE
[ INFO ] 		MODEL_DISTRIBUTION_POLICY: set()
[ INFO ] 		ENABLE_HYPER_THREADING: True
[ INFO ] 		DEVICE_ID: 
[ INFO ] 		CPU_DENORMALS_OPTIMIZATION: False
[ INFO ] 		LOG_LEVEL: Level.NO
[ INFO ] 		CPU_SPARSE_WEIGHTS_DECOMPRESSION_RATE: 1.0
[ INFO ] 		DYNAMIC_QUANTIZATION_GROUP_SIZE: 0
[ INFO ] 		KV_CACHE_PRECISION: <Type: 'float16'>
[ INFO ] 		AFFINITY: Affinity.HYBRID_AWARE
[ INFO ]

will try to update it to use the latest release of the openvino/ubuntu22_runtime

@khhsenti
Copy link
Author

khhsenti commented Aug 27, 2024

happy to report that it works now with the updated docker images:

sentispec-admin@sentispec-DT302RP-dhl-1:~$ docker run -it --rm --device-cgroup-rule='c 189:* rmw' -v /dev/bus/usb:/dev/bus/usb --device /dev/dri:/dev/dri --group-add=$(stat -c "%g" /dev/dri/render*) openvino/onnxruntime_ep_ubuntu20:latest
groups: cannot find name for group ID 992
onnxruntimedev@90aa102516fa:~$ python3 -c "from openvino import Core; print(Core().available_devices)"
['CPU', 'GPU']

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
Copy link
Author

that is openvino/onnxruntime_ep_ubuntu20:2024.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants