Forums - can I run models on aip and dsp in parallel

3 posts / 0 new
Last post
can I run models on aip and dsp in parallel
476658825
Join Date: 13 Oct 22
Posts: 2
Posted: Wed, 2022-12-07 20:52

Hi Experts,

I have a CNN model that needs to run 40 frames a second, but I found that its running speed is only 5ms/frame on dsp, and about 5ms/frame on aip.

My question is:

if I used the thread library of cpp to create two threads and then one thread calls the dsp runtime, and one thread calls the aip runtime, so whether it can process two pictures in 5ms?

  • Up0
  • Down0
sanjjey.a.sanjjey
Join Date: 17 May 22
Posts: 55
Posted: Thu, 2022-12-08 01:41

Hi

If you run snapdragon NPE and select the AIP runtime, it will have a part of model running on HTA and parts on HVX.

And the snapdragon NPE loads the library on the DSP which communicates with AIP runtime.

So if you use the command of --use_aip it will run the DSP Executor on the respective cores and return the proper output for snapdragon runtime.

Note: AIP and DSP options cannot be used at the same time as aip is a superset of DSP.

 

Thanks.

  • Up0
  • Down0
476658825
Join Date: 13 Oct 22
Posts: 2
Posted: Thu, 2022-12-08 21:10

Hi sanjjey,

Thanks for your reply.

I have re-wrote the cpp sample code of snpe-example, added two sub-threads and load two model and run them in sub-threads seperately.

I tryed two models(both using aip runtime, and in two threads seperately) and I found they are running parallel.

But when I tryed one model on aip and one on dsp, the speed is not ideal, and It seems not running parallel.

So my question is : why AIP and AIP can run parallel in two threads, but AIP and DSP cannot?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.