Community
cancel
Showing results for 
Search instead for 
Did you mean: 
129 Views

Running 2 codes in parallel on 2 NCS 2

I have two NCS 2 connected to a USB3.0 hub. I want to run 2 codes in parallel, one in the first stick and the second code in the other stick. Is there any way this can be done?

0 Kudos
1 Reply
Sahira_Intel
Moderator
129 Views

Hi Ramakrishna,

Are you trying to run two separate applications? Or are there two networks in one application? 

In OpenVINO, you aren't able to specify which device to use for which network. Instead it will use the first NCS device that is available. 

I think it's possible to run two different networks in one application with one of more NCS devices. There is a C++ application that uses two different networks with one device (you'll need multithreading in order to see faster speeds using multiple devices):

Each network will have to have its own read statement. See https://github.com/tomepetty/ncappzoo/blob/openvino/apps/gender_age_lbp_openvino/cpp/run.cpp#L155.

After that, each network will have its own input and output prep sections:

https://github.com/tomepetty/ncappzoo/blob/openvino/apps/gender_age_lbp_openvino/cpp/run.cpp#L155

After that part, each network will have its own inference request:

https://github.com/tomepetty/ncappzoo/blob/openvino/apps/gender_age_lbp_openvino/cpp/run.cpp#L187

Each inference request will have their own specific results once request.infer() is run. 

Please let me know if this answers your question.

Best Regards,

Sahira 

Reply