Hi,i am tring to run model with SNPE-1.31.0522 on HTC U12+ which is S845 Adreno 630.
It's fine to run with cpu and gpu,but got error message as follows when running with dsp.
[The selected runtime is not available on this platform. Continue anyway to observe the failure at network creation time.
error_code=500; error_message=Target runtime is not available. No viable runtimes available.; error_component=Host Runtime; line_no=236; thread_id=-257788760]
I followed guideline from https://developer.qualcomm.com/docs/snpe/tutorial_inceptionv3.html.
The commands i ran as follows:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/snpe_1.31_Example/arm-android-clang6.0/lib
export PATH=$PATH:/data/local/tmp/snpe_1.31_Example/arm-android-clang6.0/bin
export ADSP_LIBRARY_PATH="/data/local/tmp/snpe_1.31_Example/dsp/lib;/system/lib/rfsa/adsp;/system/vendor/lib/rfsa/adsp;/dsp"
Digging into adb logcat I get the following error messages:
V snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1244: /dsp/fastrpc_shell_3 load failed 45, searching...
V snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1352: create user pd with attributes 0 domain 3
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1394: Error ffffffff: apps_dev_init failed. domain 3, errno Operation not permitted
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1478: Error ffffffff: open dev -1 for domain 3 failed
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:913: Error 3b: remote handle64 open failed. name file:///libsnpe_dsp_v65_domains_v2_skel.so?snpe_dsp_domains_v2_skel_handle_invoke&_modver=1.0&_dom=cdsp
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:513: Error 1d: verify local handle failed. handle 0xff8f1250
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:528: Error 1d: get domain from handle failed. handle 0xff8f1278
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:834: Error 1d: remote handle64 invoke failed. domain -372027712, handle 0xff8f12b8, sc 7000100, pra 0xff8f12e8
V snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1244: /dsp/fastrpc_shell_3 load failed 45, searching...
V snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1352: create user pd with attributes 0 domain 3
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1394: Error ffffffff: apps_dev_init failed. domain 3, errno Operation not permitted
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1478: Error ffffffff: open dev -1 for domain 3 failed
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:913: Error 3b: remote handle64 open failed. name file:///libsnpe_dsp_v65_domains_v2_skel.so?snpe_dsp_domains_v2_skel_handle_invoke&_modver=1.0&_dom=cdsp
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:513: Error 1d: verify local handle failed. handle 0xff8f1250
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:528: Error 1d: get domain from handle failed. handle 0xff8f1278
D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:834: Error 1d: remote handle64 invoke failed. domain -357957360, handle 0xff8f12b8, sc 7000100, pra 0xff8f12e8
E memtrack: Couldn't load memtrack module
W android.os.Debug: failed to get memory consumption info: -1
D CameraBackgroundService: Memory usage, Pss = 48477 KB / 524288 KB
D STT:lognet: in autoclear thread.
D STT:lognet: total size = 0 bytes
Also,I checked these things:
1./dev/adsprpc-smd exists
2.ps | grep adsprpcd : Nothing output
3.logcat -s adsrpc outputs:
--------- beginning of crash
--------- beginning of system
--------- beginning of main
4.The 4 part of ADSP_LIBRARY_PATH exists
5.The dsp libs in /data/local/tmp/snpe_1.31_Example/dsp/lib :
libcalculator_domains_skel.so,
libcalculator_skel.so,
libsnpe_dsp_domains_skel.so,
libsnpe_dsp_skel.so,
libsnpe_dsp_v65_domains_v2_skel.so,
libsnpe_dsp_v66_domains_v2_skel.so
Does anyone have idea for this error?
From your logcat "D snpe-net-run: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1394: Error ffffffff: apps_dev_init failed. domain 3, errno Operation not permitted" I guess maybe cdsp is not permitted. This error has nothing with your code.
Thanks for your reply.
I saw the error related message from fastrpc guide file.( Page 27)
https://usermanual.wiki/Pdf/80N70392FASTRPCDEBUGGUIDE.399075392/view
The guide file pointed out this error occurs because the GLINK/SMD channel was not opened for the channel (aDSP/cDSP/mDSP). Check whether the DSP is up and running without any issues.
But I still don't know how to deal with it.
Any suggestions would be greatly appreciated.
According to the SDK, starting in the SM8150 family, clients can request to offload signature-free dynamic shared objects to cDSP.
You need to do some code changed in order to request signature-free dynamic module offload.
Do your phone has benn rooted? Do you create a signature or make signature-free operations ?
My phone (HTC U12 ) is development device , and the device state is unlocked.
Also, i checked the OEM and bootloader were unlocked.
Could you tell me more about signature-free dynamic module offload??
I just follow the guide from SNPE, and i did't see operations relatd with signature.
Another question is whether it is feasible to offload the CPU to the DSP if the DSP is not up. ?
I think you already have a Hexagon SDK. You can refer to $HEXAGON_ROOT/docs/Tools_Signing.html for more info about signature-free offload.
1. make to create stub for host
2. change stub.c (take sdk calculator for exeampe)
3. make again to update host libs and executable
You can have a try.