Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6506 Discussions

Multi-threaded CNNNetReader::ReadNetwork and CNNNetwork::reshape crash

AGaru
Beginner
580 Views

Hi! Thank you for the amazing work of doing OpenVino toolkit, it's great!

I'm having a trouble though: when I try to load a network from a file within two or more threads simultaneously it crashes (in different places).

Most of the crashes happen deeply in CNNNetReader::ReadNetwork or CNNNetwork::reshape. Objects are completely independent, nothing is shared between my threads. Is this an expected behaviour? Thanks!

OpenVino 2019.3.

0 Kudos
2 Replies
Shubha_R_Intel
Employee
580 Views

Dear Garustovich, Alexande,

did you forget to add the - - keep_shape_ops switch to your model optimizer command ?

According to The MO Dev Guide 

Implemented experimental feature to generate the IR with "Shape" layers. The feature makes possible to change model input shapes in the Inference Engine (using dedicated reshape API) instead of re-generating models in the Model Optimizer. The feature is enabled by providing command line parameter --keep_shape_ops to the Model Optimizer.

Even if you did forget that, though, I wouldn't think it's contributing to your crashes. But it's worth a try. Can you let me know and report back here ?

Thanks,

shubha

0 Kudos
Ilya_C_Intel
Employee
580 Views

Hi Garustovich, Alexander,

 

It is known problem that you cannot read and reshape network from different threads in the same time. We are investigating it. I think the fix will be available in the R2 release.

As a workaround you can use mutexes in order to avoid crashes.

 

--

Best regards,

Ilya

0 Kudos
Reply