intel / onnxruntime

ONNX Runtime: cross-platform, high performance scoring engine for ML models
MIT License
56 stars 22 forks source link

Block at init session when running. #336

Closed shonmark closed 6 months ago

shonmark commented 8 months ago

Describe the issue

Hi, thanks for your project. I use the version OpenVINO™ 2023.0 for OnnxRuntime 1.15, downloaded from . If I do not use OrtSessionOptionsAppendExecutionProvider_OpenVINO, the code running ok, code like:

class BasicModel { protected: Ort::Session ort_session{nullptr}; public: void BasicModel::create_session() } void BasicModel::create_session(){ Ort::SessionOptions session_options; session_options.DisableCpuMemArena(); // std::string inference_device = "CPU_FP32"; // Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_OpenVINO(session_options, inference_device.c_str())); const ORTCHAR_T* modelPath = L"Sco_Seg_Torso_V1.2.onnx"; Ort::Session session(ort_env, modelPath, session_options); }

the code running without any problem. But, when I try create session in my class, like:

void BasicModel::create_session(){ Ort::SessionOptions session_options; session_options.DisableCpuMemArena(); std::string inference_device = "CPU_FP32"; Ort::ThrowOnError(OrtSessionOptionsAppendExecutionProvider_OpenVINO(session_options, inference_device.c_str())); const ORTCHAR_T* modelPath = L"Sco_Seg_Torso_V1.2.onnx"; Ort::Session session(ort_env, modelPath, session_options); } the code will block at the last line : init the session, and without any error, just blocked and no return, no skipping out.

To reproduce

code is provided in description.

Urgency

No response

Platform

Windows

OS Version

Windows 11 Home 22H2

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

OpenVINO™ 2023.0 for OnnxRuntime 1.15

ONNX Runtime API

C++

Architecture

X64

Execution Provider

OpenVINO

Execution Provider Library Version

No response

Model File

No response

Is this a quantized model?

Yes

github-actions[bot] commented 7 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.

github-actions[bot] commented 6 months ago

This issue has been automatically closed due to inactivity. Please reactivate if further support is needed.