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.

OpenVINO NC_ERROR max streamid reached

fel
Beginner
1,279 Views

Hi, my MYRIAD device connects successfully only after 5-10 attempts. In others cases I get the error: 'Max streamId reached'.

 

OpenVino: commit 023e7c2c3f8a8ac83564db09799d2049115d9cf6 (HEAD, tag: 2020.4)

System info:

Linux orangepi4 4.4.179-g7b2dd521-dirty #5 SMP Tue Mar 24 14:07:36 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

 

Should I use some kind of reset in order to clear the device's memory?

Labels (1)
0 Kudos
6 Replies
Iffa_Intel
Moderator
1,232 Views

Greetings,


Fyi, If two networks have the same stream ID, they are allocated to two VPUs. This is useful when one stream or frame must go through two deep learning processes. If all Stream Device Scheduler managed VPUs have an allocated stream ID, then new networks that don’t have a stream ID have no VPU and are rejected. When a network is no longer used, it is deallocated from Intel® Movidius™ Myriad™ X VPUs.


Official Documentation: https://docs.openvinotoolkit.org/downloads/595850_Intel_Vision_Accelerator_Design_with_Intel_Movidius%E2%84%A2_VPUs-HAL%20Configuration%20Guide_rev1.3.pdf


By default, all stream IDs will be deallocated when the driver releases the interface, to ensure that drivers that don’t support streams will be able to use the endpoint.

Linux USB bulk stream: https://www.kernel.org/doc/html/latest/driver-api/usb/bulk-streams.html

However, in your case it seems there are some complications. Probably, you can try to manually release the streamId if possible.


Sincerely,

Iffa


0 Kudos
fel
Beginner
1,210 Views

Thank you for the information, but it's still not completely clear.

what exactly should I do (or try to do) to avoid this problem?

 

ps: my device is Neural Compute Stick 2 (NCS 2)

 

I can also provide a small program (4-5 lines) to reproduce this bug.

0 Kudos
Iffa_Intel
Moderator
1,186 Views

could you provide me more details so that I could replicate this?

Which model/sample are you trying to run with this?

Are you using usb hub?

This is run through host or virtual machine?

Specific OS that you use with version


Sincerely,

Iffa




0 Kudos
fel
Beginner
1,169 Views

I am using single-board computer called OrangePi4 with Rockhip RK3399 SoC. I'm running Orange's Ubuntu Bionic Image v1.3 from here (https://drive.google.com/drive/folders/1Ryg8N8O67lqoKWRnXzuYypgof7HtWuAa). Linux kernel is 4.4.179. Intel Neural Compute Stick 2 is inserted in the top USB 3.0 port. I'm not using any USB Hubs. I do not use any virtualization. The architecture of binaries is ARM 64-bit (aarch64).

btw, if the device is plugged to usb 2.0 the error doesn't happen

 

Minimal sample to reproduce:

#include <iostream>
#include <inference_engine.hpp>

using namespace std;

int main(int argc,char**argv)
{
     InferenceEngine::Core ie;
     InferenceEngine::CNNNetwork cnnNetwork;
     cnnNetwork=ie.ReadNetwork(argv[1]);
     InferenceEngine::ExecutableNetwork network;
     network = ie.LoadNetwork(cnnNetwork, "MYRIAD");
     return 0;
}

Any model (.xml, .bin) can be used as input for this program, for example: text-recognition-0012 (OpenVINO model downloader)

 

0 Kudos
Iffa_Intel
Moderator
1,143 Views

Hi,


I did further investigation regarding this and found out that this case is more related to the communication protocol(eg:udp,tcp,etc) instead of openvino.

One of occurrence's example: https://github.com/rsocket/rsocket-js/issues/40

 

I'm not quite sure of a way to reset the streamid (even in Linux) instead of changing protocol used(eg udp to tcp), the forum as per link also suggested the same.


Besides, Orange Pi board is not officially supported by OpenVino, hence there are no guarantee everything will work just fine. Probably you can try to apply USB rules from either this instruction https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_linux.html#additional-NCS-steps or https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_raspbian.html#add-usb-rules


Sincerely,

Iffa


0 Kudos
Iffa_Intel
Moderator
1,113 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question.


Sincerely,

Iffa


0 Kudos
Reply