quic / sample-apps-for-robotics-platforms

Other
121 stars 50 forks source link

dsp runtime checking error #59

Closed liujianisme closed 9 months ago

liujianisme commented 2 years ago

Hi, i've met error when i did platform checking for dsp using command snpe-platform-validator --dsp, it showed err like bellow:


ubuntu@qrb5165-rb5:~/lj$ snpe-platform-validator --runtime dsp PF_VALIDATOR: DEBUG: Calling PlatformValidator->setRuntime PF_VALIDATOR: DEBUG: Calling PlatformValidator->RuntimeCheck PF_VALIDATOR: DEBUG: Testing for the support of DSP runtime. PF_VALIDATOR: DEBUG: CPU side validation passed.

PF_VALIDATOR: DEBUG: starting calculator test PF_VALIDATOR: DEBUG: Loading DSP stub: libcalculator.so PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libcalculator.so'. Setting up pointers. PF_VALIDATOR: ERROR: -2 . Error while executing the sum function. PF_VALIDATOR: ERROR: Please use testsig if using unsigned images. PF_VALIDATOR: ERROR: Also make sure ADSP_LIBRARY_PATH points to directory containing skels. Unit Test on the runtime DSP: Failed. SNPE is NOT supported for runtime DSP on the device. PF_VALIDATOR: DEBUG: Calling PlatformValidator->IsRuntimeAvailable PF_VALIDATOR: DEBUG: CPU side validation passed.

PF_VALIDATOR: DEBUG: starting calculator test PF_VALIDATOR: DEBUG: Loading DSP stub: libcalculator.so PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libcalculator.so'. Setting up pointers. PF_VALIDATOR: ERROR: -2 . Error while executing the sum function. PF_VALIDATOR: ERROR: Please use testsig if using unsigned images. PF_VALIDATOR: ERROR: Also make sure ADSP_LIBRARY_PATH points to directory containing skels. Runtime DSP Prerequisites: Absent.


my environment is: Snapdragon865; ubuntu1804-qrb5165-rb5; snpe-1.55.0

my path settings are: export SNPE_ROOT=/home/ubuntu/lj/snpe export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${SNPE_ROOT}/lib/aarch64-ubuntu-gcc7.5/ export PATH=$PATH:${SNPE_ROOT}/bin/aarch64-ubuntu-gcc7.5/ export ADSP_LIBRARY_PATH="${SNPE_ROOT}/lib/dsp/;/usr/lib/rfsa/adsp;/dsp"

Any advices would be very appritiated. thanks a lot.

ghost commented 2 years ago

Hi @JimmyLauren, It seems you are trying to run SNPE on DSP as a non-root user. Unfortunately, DSP access on RB5 is limited to root users. There might be a way to enable access for non-root users but it will require compiling images from scratch and reflashing RB5 with newly compiled images.

Instead, you can just use RB5 as a root user if you want to run SNPE.

Imshepherd commented 1 year ago

I had different error message on RB5 while using command "snpe-platform-validator --runtime dsp --coreVersion --libVersion" @wanghaow

==== PF_VALIDATOR: DEBUG: Calling PlatformValidator->setRuntime PF_VALIDATOR: DEBUG: Calling PlatformValidator->RuntimeCheck PF_VALIDATOR: DEBUG: Setting up QnnBackend /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.openSession qnn_open failed, 0x80000406 IDspTransport: Unknown rpc status 0x80000406 DspTransport failed,cannot open session, error 0xffffffff DspTransport.openSession qnn_open failed, 0x80000406 IDspTransport: Unknown rpc status 0x80000406 DspTransport failed,cannot open session, error 0xffffffff PF_VALIDATOR: ERROR: Snpe-QNN backend initialization failed PF_VALIDATOR: DEBUG: CPU side validation passed.

PF_VALIDATOR: DEBUG: starting calculator test PF_VALIDATOR: DEBUG: Loading DSP stub: libcalculator.so PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libcalculator.so'. Setting up pointers. Error opening session with unsigned PD PF_VALIDATOR: ERROR: -2 . Error while executing the sum function. PF_VALIDATOR: ERROR: Please use testsig if using unsigned images. PF_VALIDATOR: ERROR: Also make sure ADSP_LIBRARY_PATH points to directory containing skels. Unit Test on the runtime DSP: Failed. SNPE is NOT supported for runtime DSP on the device. PF_VALIDATOR: DEBUG: Calling PlatformValidator->IsRuntimeAvailable PF_VALIDATOR: DEBUG: CPU side validation passed.

PF_VALIDATOR: DEBUG: starting calculator test PF_VALIDATOR: DEBUG: Loading DSP stub: libcalculator.so PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libcalculator.so'. Setting up pointers. Error opening session with unsigned PD PF_VALIDATOR: ERROR: -2 . Error while executing the sum function. PF_VALIDATOR: ERROR: Please use testsig if using unsigned images. PF_VALIDATOR: ERROR: Also make sure ADSP_LIBRARY_PATH points to directory containing skels. Runtime DSP Prerequisites: Absent. PF_VALIDATOR: DEBUG: Calling PlatformValidator->GetLibVersion PF_VALIDATOR: ERROR: The fastRPC library version is not implemented yet.

Library version of the runtime DSP: Not Found. PF_VALIDATOR: DEBUG: Calling PlatformValidator->GetCoreVersion Core Version of the runtime DSP: Hexagon Architecture V66

Please help. Thank you.

Imshepherd commented 1 year ago

Moreover, there is no file:

lib/aarch64-ubuntu-gcc7.5/libsnpe_dsp_domains_v2.so lib/dsp/*

in snpe-2.13.0.230730.

quic-sbudha commented 9 months ago

Hi @JimmyLauren @Imshepherd,

  1. Download latest SNPE from Qualcomm®
  2. Run the following commands on QRB5165 for SNPE 2.10+:
     adb root
     adb shell
     export SNPE_ROOT=<Path to SNPE> # Replace with extracted SNPE folder path
     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${SNPE_ROOT}/lib/aarch64-ubuntu-gcc7.5/
     export PATH=$PATH:${SNPE_ROOT}/bin/aarch64-ubuntu-gcc7.5/
     export ADSP_LIBRARY_PATH="${SNPE_ROOT}/lib/hexagon-v66/unsigned/;/usr/lib/rfsa/adsp;/dsp"
     chmod +x ${SNPE_ROOT}/bin/aarch64-ubuntu-gcc7.5/snpe-platform-validator
  1. Make sure "libCalculator_skel.so" and "libSnpeDspV66Skel.so" libraries are at "${SNPE_ROOT}/lib/hexagon-v66/unsigned/"
  2. snpe-platform-validator --runtime dsp

Thanks, Sumith