Forums - Layer parameter value is invalid in DSP

5 posts / 0 new
Last post
Layer parameter value is invalid in DSP
amistry
Join Date: 12 Dec 22
Posts: 3
Posted: Wed, 2022-12-14 15:03

Hello,

We are seeing following error when using the argument "--use_dsp" to use DSP runtime:

/tmp/snpe # /lib/ld-2.28.so /tmp/snpe/aarch64-oe-linux-gcc8.2/bin/snpe-net-run --input_list /tmp/snpe/input_list.txt --container /tmp/snpe/output_snpe.dlc --output_dir /tmp/snpe/output_dsp --debug --use_dsp
 
error_code=902; error_message=Layer parameter value is invalid in DSP. 
error_code=902; error_message=Layer parameter value is invalid in DSP. 
Layer Reshape_261: Maximum number of output dimensions(4) exceeded. 5 output dimension were given for DSP runtime.; 
error_component=DSP Runtime; line_no=140; thread_id=547896058144; 
error_component=DSP Runtime; line_no=342; thread_id=547931369488
/tmp/snpe #
 
It runs and generate output tensors as expected when we don't use "--use_dsp".
 
We can't change our layer dimensions - see below from layer info.
-----------------------------------------------------------------------------------------------------------------------------------
| Id  | Name          | Type                  | Inputs  | Outputs | Out Dims     | Runtimes | Parameters                          |
-----------------------------------------------------------------------------------------------------------------------------------
| 260 | Reshape_261   | reshape               | 429.ncs | 441     | 1x3x8x48x80  |     G C  |                                     |
 
Any recommendation to resolve this issue to run on DSP runtime?
 
Also, one more question - When Runtimes says "GC" - does that mean it can run on GPU and CPU only? Which runtime does it use when I don't define "--use_dsp"?
 
Thanks!
AMistry
  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Sun, 2022-12-18 04:51

Dear customer,

For CDSP runtime, your model need to quanize with our tools of snpe-dlc-quantize. Then you can run quantized model on cdsp runtime.

 

BR.

Wei

  • Up0
  • Down0
amistry
Join Date: 12 Dec 22
Posts: 3
Posted: Tue, 2023-01-03 14:58

I quantize the DLC model and it does show the DSP runtime supported when I extracted the quantized model info.

<HOST>#./snpe-dlc-quantize --input_dlc /home/my_snpe.dlc --output_dlc /home/my_snpe_quant.dlc --input_list /home/input_list.txt

Here is how the quantized model info looks like:

------------------------------------------------------------------------------------------------------------------------------------------------------
| Id  | Name          | Type           | Inputs                                | Outputs          | Out Dims     | Runtimes | Parameters                                     |
------------------------------------------------------------------------------------------------------------------------------------------------------
| 259 | Reshape_261   | Reshape        | 429.ncs (uFxp_8)                      | 441 (uFxp_8)     | 1x3x8x48x80  | A D G C  | 441 encoding:  bitwidth 8,
                                                                                                                                                                                                              min -20.858457565308,
                                                                                                                                                                                                              max  8.691023826599,
                                                                                                                                                                                                              scale 0.115880317986,
                                                                                                                                                                                                              offset -180.000000000000                                                                                                                                                                                                                                  packageName: qti.aisw  
                                                                                                                                                                                                              shape: [1, 3, 8, 48, 80]                              
 

Though, running the quatized model on target board gives following errors:

<TARGET>$/tmp/snpe # /lib/ld-2.28.so /tmp/snpe/aarch64-oe-linux-gcc8.2/bin/snpe-net-run --input_list /tmp/snpe/input_list.txt --container /tmp/snpe/my_snpe_quant.dlc --output_dir /tmp/snpe/output  --use_dsp

/prj/qct/webtech_hyd/pcgbait/projects/zsnpe_waipio/avante-tools/prebuilt/dsp/hexagon-sdk-4.1.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
DspTransport.createUnsignedPD unsigned PD or DSPRPC_GET_DSP_INFO not supported by DSP
error_code=1002; error_message=Layer parameter value is invalid. error_code=1002; error_message=Layer parameter value is invalid. No backend could validate Op=Reshape_261 Type=Reshape error code=3110; error_component=Model Validation; line_no=564; thread_id=547991604128; error_component=Model Validation; line_no=342; thread_id=548031365136
$/tmp/snpe
 
FYI.. Using SNPE NN SDK snpe-2.5.0.4052 that does seem to support 5 output dimensions.
 
Can you suggest the solution?
 
Thanks!
AMistry
 
 

 

 

 

  • Up0
  • Down0
amistry
Join Date: 12 Dec 22
Posts: 3
Posted: Thu, 2023-01-19 07:38

Can the support team provide support to my questions? Thanks!

  • Up0
  • Down0
csstraut
Join Date: 22 May 23
Posts: 1
Posted: Wed, 2023-07-05 10:19

Hi,

Did you manage to work past that error by any means and also get an understanding what exactly is causing it? I'm experimenting something similar even when trying out the UDO tutorial presented in the documentation. I find this quite odd.

Thanks

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