onnxruntime: OpenVINO: Encountered unknown exception in Run()
Describe the issue
When using OpenVINO, the session can be created, but calling run leads to the error: RuntimeException: [ONNXRuntimeError] RUNTIME_EXCEPTION: Encountered unknown exception. Based on reports in this issue, there seems to be a pattern with the N100 CPU in particular.
This seems to be a regression as this error only appears after upgrading to 1.17.1 of onnxruntime-openvino with OpenVINO 2023.3.0. This model worked when using 1.15.0 and OpenVINO 2023.1.0.
After enabling the following environmental variables:
ORT_OPENVINO_ENABLE_CI_LOG=1
ORT_OPENVINO_ENABLE_DEBUG=1
OPENVINO_LOG_LEVEL=5
There are a few additional logs, but none that seem pertinent:
In the OpenVINO EP
Model is fully supported on OpenVINO
CreateNgraphFunc
To reproduce
With onnxruntime-openvino 1.17.1 and OpenVINO 2023.3.0, create a session including the following providers:
['OpenVINOExecutionProvider', 'CPUExecutionProvider']
And the following provider options:
[{'device_type': 'GPU_FP32', 'cache_dir': '/tmp/facial-recognition/buffalo_l/openvino'}, {'arena_extend_strategy': 'kSameAsRequested'}]
Then attempt to run inference with this model. It may or may not work depending on the CPU.
You may use this image to have the exact software environment producing the issue: ghcr.io/immich-app/immich-machine-learning@sha256:01799596c7f40495887d4027df1c0f4c144c7cd6ab34937ef2cc14d246470095
Urgency
No response
Platform
Linux
OS Version
Ubuntu 22.04
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.17.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
OpenVINO
Execution Provider Library Version
2023.3.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 16 (6 by maintainers)
To clarify, the issue is occurring with 2023.3.0. The pattern I’m seeing is that it works on CPUs with Iris Xe graphics, but not on CPUs with UHD graphics.
The onnxruntime default device_type for GPU is iGPU (GPU.0) and if you want to explicitly use dGPU (GPU.1) then set your device _type as GPU.1 during your inference provider options.
Please build your onnxruntime-openvino wheels from the main branch and install it in your python virtual env so that you can get the latest release changes. This should solve your issues.
@ankitm3k No, onnxruntime-openvino does not work with latest OpenVino 2024.1
I have to confirm, that this is an existing issue that breaks OpenVINO using Intel Arc (770) under Windows.
@shummo A downgrade to
onnxruntime==1.15.0andopenvino=2023.1.0solved itHaving the same error using this model: https://huggingface.co/SmilingWolf/wd-swinv2-tagger-v3 Other variants of this model (convnext and vit) runs fine but swinv2 fails with the following logs:
Using
onnxruntime-openvino==1.17.1on Arch Linux 6.8.2 with this script: https://github.com/kohya-ss/sd-scripts/blob/dev/finetune/tag_images_by_wd14_tagger.pyCommand:
On CPU with OpenVINO
{'device_type': 'CPU_FP32'}):On an Intel ARC A770 (
{'device_type': 'GPU.0_FP32'}or{'device_type': 'GPU_FP32'}):On an AMD RX 7900 XTX
{'device_type': 'GPU.1_FP32'}): (Different error and more useful logs)Same script runs fine on
CPUExecutionProviderandROCmExecutionProvider(from https://pypi.lsh.sh/60/onnxruntime-training/).