Forums - SNPE execute GPU longer than CPU

3 posts / 0 new
Last post
SNPE execute GPU longer than CPU
likai2
Join Date: 27 Dec 22
Posts: 24
Posted: Mon, 2023-04-03 00:41

Hi

I'm using a non-quantized DLC model for text recognize from jpeg.

The dlc input is 1,1,32,320.   1 Channel, H 32, W 320  jpeg. Including 6 charecters.

When I execute in CPU runtime, it returns in less 20ms.

But when I execute in GPU runtime, it returns in more than 1.2s !!

Could anyone encounted this problem, how to fix it?

Thanks.

  • Up0
  • Down0
yunxqin
Join Date: 2 Mar 23
Posts: 44
Posted: Wed, 2023-04-05 19:08

Dear customer,

Could you please share the commands you used to analyze the problem.

BR.

Yunxiang

  • Up0
  • Down0
likai2
Join Date: 27 Dec 22
Posts: 24
Posted: Mon, 2023-04-10 04:53

hi yunxqin,

Thanks for your reply.

I checked "Limitations and Issues" in snpe document, and found

  • Convolution
    • For GPU runtime, when the number of groups is greater than 1, the number of output channels must be a multiple of 4 * the number of groups. For example, with 2 groups, the number of output channels must be a multiple of 8 (4*2=8).

And in my model, I reeally used nn.Conv2d by groups. Here is my model segment:

nn.Conv2d(32, 32, 3, 1, 1, groups=32, bias=False)
My output channel is same as groups 32. So Does this make GPU executing longer than CPU?
 
BTW, on snapdragon 8Gen1/2, GPU model output is errro. But on snapdragon 965, same GPU model output is right only slow speed.
My SDK version is latese SNPE 2.9.0
 
Wating for your reply, thank you.
 
BR
  • 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.