Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
381 Views

How to run multiple graph at time?

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
Community Manager
82 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?
idata
Community Manager
82 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.
idata
Community Manager
82 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
idata
Community Manager
82 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?
idata
Community Manager
82 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.

idata
Community Manager
82 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).
Reply