Skip to content

Conversation

@MaajidKhan
Copy link
Contributor

Description:
Using Core::ReadNetwork() method for reading and creating a CNNNetwork for OpenVINO versions >=2020.4

Motivation and Context
Since OpenVINO™ 2020.4 version, Inference Engine enables reading ONNX models via the Inference Engine Core API and there is no need to use directly the low-level ONNX* Importer API anymore. To read ONNX* models, it's recommended to use the Core::ReadNetwork() method that provide a uniform way to read models from ONNX format.

More Info here:
ONNX* Importer API is deprecated.
https://docs.openvinotoolkit.org/latest/openvino_docs_IE_DG_OnnxImporterTutorial.html

Info on ReadNetwork() method from InferenceEngine::Core Class:
https://docs.openvinotoolkit.org/latest/classInferenceEngine_1_1Core.html#a251861e52a979d6e61848babae3673ef

->Using Core::ReadNetwork() method for reading and creating a CNNNework

->Since OpenVINO™ 2020.4 version, Inference Engine enables reading ONNX models
  via the Inference Engine Core API and there is no need to use directly the low-level
  ONNX* Importer API anymore. To read ONNX* models, it's recommended to use the
  Core::ReadNetwork() method that provide a uniform way to read models from ONNX format.

Signed-off-by: MaajidKhan <[email protected]>
-> use InferenceEngine::details::InferenceEngineException
   to catch the exception for ReadNetwork()

Signed-off-by: MaajidKhan <[email protected]>
->The UEP component fails to compile with OpenVINO_2021.1
release version due to indentation error.Indentation is fixed
with this commit.

Signed-off-by: MaajidKhan <[email protected]>
@MaajidKhan MaajidKhan requested a review from a team as a code owner January 18, 2021 12:48
@HectorSVC
Copy link
Contributor

/azp run Linux CPU CI Pipeline,Linux CPU x64 NoContribops CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,MacOS CI Pipeline,MacOS NoContribops CI Pipeline,Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 9 pipeline(s).

@HectorSVC
Copy link
Contributor

/azp run orttraining-linux-ci-pipeline,orttraining-mac-ci-pipeline,orttraining-linux-gpu-ci-pipeline,centos7_cpu,Linux OpenVINO CI Pipeline,/azp run orttraining-linux-ci-pipeline,orttraining-mac-ci-pipeline,orttraining-linux-gpu-ci-pipeline,centos7_cpu,Linux OpenVINO CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@HectorSVC
Copy link
Contributor

/azp run Linux CPU Minimal Build E2E CI Pipeline, orttraining-distributed

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@HectorSVC
Copy link
Contributor

@MaajidKhan, please take a look at the test failure
Test #1: onnxruntime_test_all ...................***Exception: SegFault924.77 sec

@MaajidKhan
Copy link
Contributor Author

Hector, I am looking into this issue. I will let you know once I fix that.

@HectorSVC
Copy link
Contributor

/azp run Linux OpenVINO CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MaajidKhan
Copy link
Contributor Author

@HectorSVC
so, when we are trying to use ReadNetwork() method to create the CNNNetwork instead of the low-level ONNX* Importer API and try running any c++ application, we get a seg fault issue. We suspect this issue is because of protobuf library mismatch or something. I think the problem can even be caused by different runtime versions. I mean when we use another compiler to build OpenVINO and you get SEGFAULT due to ABI problems.

This issue is only when we are building onnxruntime with OpenVINO Binary Release package. However, we are able to successfully run c++ applications when onnxruntime is built with Openvino from source ( master (or) releases/2021/2 branch).

so, we think, When we are building openvino from source, the protobuf gets installed on the fly and hence we are not facing any issues and this is the same with onnxruntime.

In onnxruntime, the segfault happens at this line of code where it tries to shutdown the protobuf libraray.
https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/test/perftest/main.cc#L73

we are talking to OpenVINO team to check how this issue could be resolved. so closing this PR for now, will create a new one, once we get this thing resolved.

@MaajidKhan MaajidKhan closed this Jan 22, 2021
@MaajidKhan MaajidKhan deleted the maajid/Implement_Read_Network branch August 5, 2021 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants