Forums - snpe-net-run fails on GPU but works on CPU

7 posts / 0 new
Last post
snpe-net-run fails on GPU but works on CPU
shiangyong
Join Date: 21 Sep 17
Posts: 15
Posted: Wed, 2017-11-29 14:56

After converting my custom ConvNet to .dlc format, I ran inference on it using "snpe-net-run" via adb on my SD820 device. Everything works when running on the CPU, I verified that the outputs are as expected. But when I used the "--use_gpu" flag (while keeping everything else exactly the same) I got the following error:

Quote:

error_code=811; error_message=GPU tensor dimensions are invalid. Host tensor dimensions do not match.; error_component=GPU Runtime; line_no=463; thread_id=-220814028

I did not get this error when I ran inference on the Inception_v3 model from the tutorial.

 

 

  • Up0
  • Down0
bspinar
Join Date: 4 Feb 15
Posts: 21
Posted: Thu, 2017-11-30 12:13

Hi. I'm not sure why it would work on the CPU and not on the GPU with everythig else the same, but that error message is usually a result of passing an input tensor to the execute() function that is different than what the model expects (although it can occur in other places as well). Here is one thing you can try. Call the (SNPE::)getInputDimensions() function before calling execute and see if it returns the same dimensions that you are setting in your input tensor. If not (and the getInputDimensions() results are what you expect), set the dimensions of your input tensor to these values and then try calling execute().

Let me know how that goes. Thanks.

  • Up0
  • Down0
shiangyong
Join Date: 21 Sep 17
Posts: 15
Posted: Thu, 2017-11-30 16:09

Hi bspinar,

It sounds like your recommendation is for me add a line in a C++ program. I'm not at that stage yet: I'm just running everything via the binaries and using adb to communicate with the device.

I'm guessing there's no way to troubleshoot without messing with the C++ API?

  • Up0
  • Down0
bspinar
Join Date: 4 Feb 15
Posts: 21
Posted: Thu, 2017-12-07 12:11

Sorry for the slow response. Unfortunately for that kind error, it's difficult to debug without doind some of the things I suggested.

  • Up0
  • Down0
xiaochunming
Join Date: 20 Apr 18
Posts: 1
Posted: Fri, 2018-05-25 02:10

Hi, I got the same problem when I trying to execute my network on the GPU of a snapdragon 835 chip. Here is the stack trace:

 Caused by: java.lang.IllegalStateException: Unable to create network! Cause: error_code=811; error_message=GPU tensor dimensions are invalid. Host tensor sizes are not compatible.; error_component=GPU Runtime; line_no=507; thread_id=519758247152
        at com.qualcomm.qti.snpe.internal.NativeNetwork.nativeInitFromBuffer(Native Method)
        at com.qualcomm.qti.snpe.internal.NativeNetwork.<init>(NativeNetwork.java:60)
        at com.qualcomm.qti.snpe.SNPE$NeuralNetworkBuilder.build(SNPE.java:218)
        at com.yichuang.ml_demo.activity.NumberRecognitionActivity.loadSNPEModel(NumberRecognitionActivity.java:146)
 
It works very well when I choose the CPU or DSP runtime.
Would anybody help?
  • Up0
  • Down0
meow meow
Join Date: 11 Mar 18
Posts: 6
Posted: Sun, 2018-05-27 18:35

is anyone know the SNPE error message table?

where can i get the table, Developer need debug activity/fragment and SNPE Runtime error,

but i can't find any information about the error code and how to fix.

for example:

error_code=910; error_message=undefined error. failed to execute network

and there are 835 cpu phones but can't run snpe in gpu/dsp mode. 

  • Up0
  • Down0
yajic0115
Join Date: 28 Mar 12
Posts: 3
Posted: Tue, 2018-11-13 18:05

Hi, I also have the samp issue with Snapdragon 820 by running snpe-net-run command with --use-gpu options. In case of CPU or DSP, it works fine. Reproducible version of SNPE: 1.19.2, 1.18.0

Error message: error_code=811; error_message=GPU tensor dimensions are invalid.; error_component=GPU Runtime; line_no=94; thread_id=548252692480

Does SNPE team work on this issue?

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