microsoft / onnxruntime

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

ORT with IntelOpenVino EP, examples fail! #2968

Closed AmKhG closed 4 years ago

AmKhG commented 4 years ago

Describe the bug After building the ORT with Intel OpenVino execution provider, I started to run the "onnxruntime_perf_test" project with below command line arguments: -v -e openvino PATH\TO\onnxruntime\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\testdata\squeezenet\model.onnx PATH\TO\onnxruntime\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\testdata\squeezenet\test_data_set_0\outputs.txt

This fails in couple places: 1) The code complains since the input file name should be "inputs.pb" not "input_0.pb" or sth else. (TestCase.cc line# 520) 2) After fixing the input filename, the code fails in the protobuf code (pb_helper.cc line # 52), specifically it fails in the below function: !input->ConsumedEntireMessage() returns false and it should return true.

Urgency none

System information

To Reproduce Follow the steps for building the onnxruntime with OpenVino support. After successful build, open visual studio and set the above command line arguments for the "onnxruntime_perf_test" project and then run the project.

Expected behavior To not crash

Screenshots None

Additional context Side note regarding building from source with Intel OpenVino support. I had to disable the Donnxruntime_DEV_MODE to be OFF in the build.py file to be able to build the code since intel openvino code has several compilation warnings and the above flag makes treating warnings as errors and hence the compilation fails.

jywu-msft commented 4 years ago

can you try with official squeeze net model from onnx model zoo? https://github.com/onnx/models/tree/master/vision/classification/squeezenet

AmKhG commented 4 years ago

Just tried and it still fails at below line (line 51) in pb_helper.cc: if (!message->MergeFromCodedStream(input)) return false;

AmKhG commented 4 years ago

EDIT: I believe the actual failure happens in the below line not at ConsumedEntireMessage() function:

if (!message->MergeFromCodedStream(input)) return false;

jywu-msft commented 4 years ago

Looping in devs from Intel. @smkarlap @suryasidd FYI This is on Windows where the integration was not tested as extensively as on Linux Ubuntu 16.04

smkarlap commented 4 years ago

The code where the failure occurs is around parsing the input model protobuf file, which occurs before the control even enters OpenVINO specific code. Could you please check whether the error occurs if you run the same test on an ONNXRuntime build without the OpenVINO EP?

stale[bot] commented 4 years ago

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

stale[bot] commented 4 years ago

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