Hi,
I am following this tutorial and trying to test it on Pixel XL.
snpe-1.6.0/doc/html/tutorial_inceptionv3.html
Everything goes fine until I try to use the DSP in which case I get the following:
marlin:/data/local/tmp/inception_v3 $ snpe-net-run --container inception_v3_quantized.dlc --input_list target_raw_list.txt --use_dsp
The selected runtime is not available on this platform. Continue anyway to observe the failure at network creation time.
error_code=101; error_message=Invalid parameter in user config. Attempted to set a neural network configuration option DSP that is not supported on this platform.; error_component=System Configuration; line_no=106; thread_id=-409090904
No idea what's wrong or what to do? Do you guys have any tips? I suppose that Pixel XL's DSP must be supported.
Thanks,
Martin Peniak
Thanks,
Martin Peniak
In our experience, Pixel devices have not been able to run the DSP runtime. We have heard that there are DSP access limitations built into the Pixel, that restrict what applications are allowed to use DSP.
Unfortunately, this means that SNPE DSP runtime will not work on Pixel devices.
I see, well...thank you for your reply... at least I know I was not doing anything wrong.
I encountered the same problem when running inception model on DSP on a S820am ADP development board, and the same problem occurs as well.
Would you please confirm that SNPE DSP will not work on this device as well?
Best regards,
@yanbophx
Snapdragon 820 should support the DSP runtime. Can you provide the commands you are running and the error message you are getting? Logcat would be helpful too.
Also, make sure that /system/lib contains libadsprpc.so. Also, please list the contents of the following directories:
/system/lib/rfsa/adsp
/system/vendor/lib/rfsa/adsp
HI jesliger,
Thanks for your reply. I cannot find libadsprpc.so in /system/lib/; also, I don't seem to have the folder rfsa under /system/lib/, let alone adsp, see below:
root@msm8996:/system/lib # cd rfsa
/system/bin/sh: cd: /system/lib/rfsa: No such file or directory
The contents for /system/vendor/lib/rfsa/adsp are:
root@msm8996:/system/vendor/lib/rfsa/adsp # ls
icc_module.so.1.so
libdspCV_skel.so
libfastcvadsp.so
libfastcvadsp_skel.so
libobjectMattingApp_skel.so
libscveBlobDescriptor_skel.so
libscveCleverCapture_skel.so
libscveObjectSegmentation_skel.so
libscveT2T_skel.so
libscveTextReco_skel.so
libvpp_frc.so
libvpp_svc_skel.so
sec_module.so.1.so
us-syncproximity.so
Please check below for all the commands and messages when implmenting this turorial on DSP:
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ source bin/envsetup.sh -t $TENSORFLOW_DIR
INFO: Setting TENSORFLOW_HOME=/usr/local/lib/python2.7/dist-packages/tensorflow
INFO: Found ANDROID_NDK_ROOT at /home/yihangrd/Android/Sdk/ndk-bundle/
INFO: Found /home/yihangrd/snpe-1.6.0/lib/arm-android-gcc4.9/libgnustl_shared.so
INFO: Adding libgnustl_shared.so to /home/yihangrd/snpe-1.6.0/android/snpe-release.aar
updating: jni/armeabi-v7a/libgnustl_shared.so (deflated 66%)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb shell "mkdir -p /data/local/tmp/snpeexample/arm-android-gcc4.9/bin"
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb shell "mkdir -p /data/local/tmp/snpeexample/arm-android-gcc4.9/lib"
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb shell "mkdir -p /data/local/tmp/snpeexample/dsp/lib"
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb push $SNPE_ROOT/lib/arm-android-gcc4.9/libgnustl_shared.so /data/local/tmp/snpeexample/arm-android-gcc4.9/lib
2171 KB/s (5665180 bytes in 2.547s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb push $SNPE_ROOT/lib/dsp/libsnpe_dsp_skel.so /data/local/tmp/snpeexample/dsp/lib
2183 KB/s (363808 bytes in 0.162s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb push $SNPE_ROOT/lib/arm-android-gcc4.9/libsnpe_adsp.so /data/local/tmp/snpeexample/arm-android-gcc4.9/lib
221 KB/s (11984 bytes in 0.052s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb push $SNPE_ROOT/lib/arm-android-gcc4.9/libsnpe_cdsp.so /data/local/tmp/snpeexample/arm-android-gcc4.9/lib
225 KB/s (11984 bytes in 0.051s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb push $SNPE_ROOT/lib/arm-android-gcc4.9/libSNPE.so /data/local/tmp/snpeexample/arm-android-gcc4.9/lib
2312 KB/s (3483292 bytes in 1.470s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb push $SNPE_ROOT/bin/arm-android-gcc4.9/snpe-net-run /data/local/tmp/snpeexample/arm-android-gcc4.9/bin
1580 KB/s (58972 bytes in 0.036s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ adb shell
Y_PATH:/data/local/tmp/snpeexample/arm-android-gcc4.9/lib <
ATH=$PATH:/data/local/tmp/snpeexample/arm-android-gcc4.9/bin <
root@msm8996:/ # snpe-net-run -h
DESCRIPTION:
------------
Example application demonstrating how to load and execute a neural network
using the SNPE C++ API.
REQUIRED ARGUMENTS:
-------------------
--container <FILE> Path to the DL container containing the network.
--input_list <FILE> Path to a file listing the inputs for the network.
OPTIONAL ARGUMENTS:
-------------------
--use_gpu Use the GPU runtime for SNPE.
--use_dsp Use the DSP fixed point runtime for SNPE.
--debug Specifies that output from all layers of the network
will be saved.
--output_dir <DIR> The directory to save output to. Defaults to ./output
--storage_dir <DIR> The directory to store SNPE metadata files
--encoding_type <VAL> Specifies the encoding type of input file. Valid settings are "nv21".
Cannot be combined with --userbuffer*.
--userbuffer_float [EXPERIMENTAL] Specifies to use userbuffer for inference, and the input type is float.
Cannot be combined with --encoding_type.
--userbuffer_tf8 [EXPERIMENTAL] Specifies to use userbuffer for inference, and the input type is tf8exact0.
Cannot be combined with --encoding_type.
--perf_profile <VAL> Specifies perf profile to set. Valid settings are "default" , "high_performance" and "power_saver".
--enable_cpu_fallback Enables cpu fallback functionality. Defaults to disable mode.
--help Show this help message.
--version Show SNPE Version Number.
root@msm8996:/ # exit
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0$ cd $SNPE_ROOT/models/inception_v3
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0/models/inception_v3$ adb shell "mkdir -p /data/local/tmp/inception_v3"
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0/models/inception_v3$ adb push data/cropped /data/local/tmp/inception_v3/cropped
push: data/cropped/chairs.raw -> /data/local/tmp/inception_v3/cropped/chairs.raw
push: data/cropped/handicap_sign.raw -> /data/local/tmp/inception_v3/cropped/handicap_sign.raw
push: data/cropped/plastic_cup.jpg -> /data/local/tmp/inception_v3/cropped/plastic_cup.jpg
push: data/cropped/17010030.raw -> /data/local/tmp/inception_v3/cropped/17010030.raw
push: data/cropped/chairs.jpg -> /data/local/tmp/inception_v3/cropped/chairs.jpg
push: data/cropped/notice_sign.raw -> /data/local/tmp/inception_v3/cropped/notice_sign.raw
push: data/cropped/trash_bin.jpg -> /data/local/tmp/inception_v3/cropped/trash_bin.jpg
push: data/cropped/raw_list.txt -> /data/local/tmp/inception_v3/cropped/raw_list.txt
push: data/cropped/plastic_cup.raw -> /data/local/tmp/inception_v3/cropped/plastic_cup.raw
push: data/cropped/notice_sign.jpg -> /data/local/tmp/inception_v3/cropped/notice_sign.jpg
push: data/cropped/handicap_sign.jpg -> /data/local/tmp/inception_v3/cropped/handicap_sign.jpg
push: data/cropped/trash_bin.raw -> /data/local/tmp/inception_v3/cropped/trash_bin.raw
push: data/cropped/17010030.jpg -> /data/local/tmp/inception_v3/cropped/17010030.jpg
13 files pushed. 0 files skipped.
2833 KB/s (6521276 bytes in 2.247s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0/models/inception_v3$ adb push data/target_raw_list.txt /data/local/tmp/inception_v3
2 KB/s (135 bytes in 0.045s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0/models/inception_v3$ adb push dlc/inception_v3_quantized.dlc /data/local/tmp/inception_v3
3569 KB/s (23882618 bytes in 6.534s)
yihangrd@yihangrd-Inspiron-3668:~/snpe-1.6.0/models/inception_v3$ adb shell
root@msm8996:/ # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/snpee>
ATH=$PATH:/data/local/tmp/snpeexample/arm-android-gcc4.9/bin <
lib;/system/lib/rfsa/adsp;/system/vendor/lib/rfsa/adsp;/dsp" <
root@msm8996:/ # cd /data/local/tmp/inception_v3
nception_v3_quantized.dlc --input_list target_raw_list.txt --use_dsp <
The selected runtime is not available on this platform. Continue anyway to observe the failure at network creation time.
error_code=101; error_message=Invalid parameter in user config. Attempted to set a neural network configuration option DSP that is not supported on this platform.; error_component=System Configuration; line_no=106; thread_id=-146265292
Best regards,
Thanks for the reply.
Ok we have to figure out libadsprpc.so. It is the library that allows SNPE to communicate to the DSP. If it's not on the platform, then DSP runtime won't work. It is rare for this library to be missing so expanding the search is next. Can you check /system/vendor/lib as well?
Can you check with your board vendor to see if there is an updated software image for it?
You don't need to worry about /system/lib/rfsa/adsp if /system/vendor/lib/rfsa/adsp is populated (and it appears to be) then that portion checks out.
Thanks for your instructions, I notice that libadsprpc.so is in /system/vendor/lib/ . So, what shall I do now? Copy this file to /system/lib/ ? Or modify the path $ to include /system/vendor/lib/ ?
Thanks,
Hi. Did you ever get this resolved? Many of us were out for the holiday, so we've been slow in repsonding. You should be able to copy the file. If that doesn't work, let us know. Thanks.
Hi. Did you ever get this resolved? Many of us were out for the holiday, so we've been slow in repsonding. You should be able to copy the file. If that doesn't work, let us know. Thanks.
@yanbophx
libadsprpc.so being in /system/vendor/lib is fine. No need to move it.
Which device are you running this on? DSP will not work on Google pixel devices.
The system does appear to be populated with the correct files.
Please try snpe-net-run example (I know you have another thread going on this..I can't remember if you tried snpe-net-run yet.)
If snpe-net-run example for InceptionV3 works on DSP, but the APK doesn't, then there might be some permission issues (selinux perhaps) on the device that is preventing APKs from running on DSP runtime.
Hi,
I finally got around to doing this as I have been busy just getting the SSD demo to work.
I didnt bother with the CPU demo just straight to DSP and it worked first time with these results: