frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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.

Comments

  • 7 Comments sorted by Votes Date Added
  • @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.

  • edited February 1 Vote Up1Vote Down

    @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.

  • 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?

  • edited February 1 Vote Up0Vote Down

    @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

  • 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?

  • 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).

Sign In or Register to comment.