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.

How to run multiple graph at time?

idata
Employee
725 Views

I am trying to run two graphs in two different process with single movidius stick using python multiprocessing. I have tried different approaches to solve this, but not able to achieve the goal.

 

I want to know whether it is possible to do so or not. If possible, then please give some hint to do it.

0 Kudos
7 Replies
idata
Employee
426 Views

Great work @PINTO , I looked at your code. You are opening and using the device in the same process but want I am trying is bit different.

 

Since I have one movidius stick and two graphs, I am opening the device and assign the graphs in the main process and trying to use the fifoIn and fifoOut of one graph in one process and for another graph in another process. Is it possible to do?
0 Kudos
idata
Employee
426 Views

@Akhilesh

 

You can not share one stick with two processes.

 

You can use two sticks in one process.

 

Because, when sharing objects between processes, the target object must be able to convert to pickle type.

 

Unfortunately we can not convert graph objects to pickle.
0 Kudos
idata
Employee
426 Views

@Akhilesh

 

I made a mistake.

 

OK

 

1 process -> 1 stick

 

2 process -> 2 sticks

 

3 process -> 3 sticks

 

2 models -> 1 stick

 

2 models -> 2 sticks

 

NG

 

2 process -> 1 stick
0 Kudos
idata
Employee
426 Views

Thanks @PINTO , This is really helpful for me.

 

I want to clear one more thing from you whether those two graph can be run at a same time in a single processes. For example, if I give the image to both the fifoIn, will be execute at same time. May be if both the graphs are compiled with 12 shaves then it is not, but if the graphs are compiled with 6 shaves per graph then any chance, will it run?
0 Kudos
idata
Employee
426 Views

@Akhilesh

 

It depends on the size of the model, so I do not know until I try it.

 

btw, my environment.

 

graph size = 11.6 MB

 

12 shave x 2 graph x 1 stick(NCS, not NCS2) -> OK

 

12 shave x 3 graph x 1 stick(NCS, not NCS2) -> NG

 

The reason for becoming NG is a bug in NCSDKv2.

0 Kudos
idata
Employee
426 Views

Thanks @PINTO ,

 

I have experimented all.

 

3 graphs can't be loaded a time.

 

Two graphs can run at a time if the sum of the number of shaves of individual graphs is less than or equal to the maximum (12).
0 Kudos
Reply