microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.11k stars 2.84k forks source link

Onnxruntime using OpenVINO as execution provider encountered Exception during initialization problem on model candy.onnx #18825

Open lifang-zhang opened 9 months ago

lifang-zhang commented 9 months ago

Describe the issue

For v1.14.0 with openvino_2022.2.0.7713:

openvino/ov_interface.cc:54 onnxruntime::openvino_ep::OVExeNetwork onnxruntime::openvino_ep::OVCore::LoadNetwork(std::shared_ptr<ov::Model>&, std::string&, onnxruntime::openvino_ep::OVConfig, std::string) [OpenVINO-EP]  Exception while Loading Network for graph: OpenVINOExecutionProvider_OpenVINO-EP-subgraph_2_1[ UNEXPECTED ] CPU plug-in doesn't support Parameter operation with dynamic rank. Operation name: SpatialZeroPadding_21

For onnxruntime v1.16.3 with openvino_2023.2.0:

[E:onnxruntime:, inference_session.cc:1803 Initialize] Encountered unknown exception in Initialize()

To reproduce

The model candy.onnx is from

https://github.com/microsoft/Windows-Machine-Learning/blob/master/Samples/FNSCandyStyleTransfer/UWP/cs/Assets/candy.onnx

Urgency

No response

Platform

Linux

OS Version

Ubuntu 22.04.3 LTS

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

onnxruntime v1.16.3 with openvino_2023.2.0 and v1.14.0 with openvino_2022.2.0.7713

ONNX Runtime API

C

Architecture

X64

Execution Provider

OpenVINO

Execution Provider Library Version

openvino_2022.2.0.7713 and openvino_2023.2.0

jywu-msft commented 9 months ago

@sfatimar, any suggestions?

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

jywu-msft commented 8 months ago

@sfatimar, any suggestions?

ping again. seems like a limitation of some operator support based on the error message? onnxruntime::openvino_ep::OVExeNetwork onnxruntime::openvino_ep::OVCore::LoadNetwork(std::shared_ptr&, std::string&, onnxruntime::openvino_ep::OVConfig, std::string) [OpenVINO-EP] Exception while Loading Network for graph: OpenVINOExecutionProvider_OpenVINO-EP-subgraph_2_1[ UNEXPECTED ] CPU plug-in doesn't support Parameter operation with dynamic rank. Operation name: SpatialZeroPadding_21

sfatimar commented 7 months ago

Sorry for late reply. There seems to be a bug with dynamic shapes. For now please try with workaround disable_dynamic_shapes=true as part of openvino session options

ilya-lavrenov commented 5 months ago

CPU plug-in doesn't support Parameter operation with dynamic rank

It's clearly stated that CPU plugin does not support operations with dynamic rank. Is it possible to reshape the model to provide at least information about ranks?