Hello,
I'm trying to run inception_v3 exmaple on my sm7325 DSP.
I used qpm to install the latest versions of SNPE, QNN and HexagonSDK, and followed all setup instructions on Ubuntu 20.04 host:
PY:
source /root/py36/bin/activate
QNN:
export QNN_SDK_ROOT=${QNN_SDK_ROOT}/opt/qcom/aistack/qnn/2.14.2.230905
source ${QNN_SDK_ROOT}/bin/envsetup.sh
HexagonSDK:
source /local/mnt/workspace/Qualcomm/Hexagon_SDK/4.5.0.4/setup_sdk_env.source
SNPE:
export SNPE_ROOT=${SNPE_ROOT}/opt/qcom/aistack/snpe/2.14.2.230905
export ANDROID_NDK_ROOT=/root/android-ndk-r19c
export PATH=${ANDROID_NDK_ROOT}:${PATH}
${SNPE_ROOT}/bin/envcheck -n
${SNPE_ROOT}/bin/envcheck -c
source ${SNPE_ROOT}/bin/envsetup.sh
And i could get inception_v3.dlc and inception_v3_quantized.dlc according to the tutorial using
python3 $SNPE_ROOT/examples/Models/inception_v3/scripts/setup_inceptionv3.py -a ~/tmpdir -d
python3 $SNPE_ROOT/examples/Models/inception_v3/scripts/setup_inceptionv3.py -a ~/tmpdir -d -r dsp -l sm8350 (same V68 arch as my sm7325)
On the target side, the sm7325 is of ARMv8-A arch and has Hexagon™ 770 Processor (V68) with Android OS.
I adb pushed aarch64-android lib && bin and hexagon-v68/unsigned/*.so to the target and set LD_LIBRARY_PATH, PATH, ADSP_LIBRARY_PATH correctly.
The inception_v3.dlc works fine on cpu and gpu, but the inception_v3_quantized.dlc doesn't work on DSP:
# snpe-net-run --container inception_v3_quantized.dlc --input_list target_raw_list.txt --use_dsp (with or w/o --platform_options unsignedPD:ON)
OUTPUT:
PlatformOptions (unsignedPD:ON) set successful config option is valid
The selected runtime is not available on this platform. Continue anyway to observe the failure at network creation time.
error_code=1200; error_message=libstd error. QnnBackend_DeviceCreate failed: 14001; error_component=Dependent library; line_no=1797; thread_id=500525987064 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=InceptionV3/InceptionV3/Conv2d_1a_3x3/convolution Type=Conv2d error code=3110; error_component=Model Validation; line_no=794; thread_id=498141216000; error_component=Model Validation; line_no=276; thread_id=500525987064
snpe-platform-validator --runtime dsp OUTPUT:
snpe-platform-validator --runtime dsp
PF_VALIDATOR: DEBUG: Calling PlatformValidator->setRuntime
PF_VALIDATOR: DEBUG: Calling PlatformValidator->RuntimeCheck
PF_VALIDATOR: DEBUG: Setting up QnnBackend
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 HTP stub: libcalculator_htp.so
PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libcalculator_htp.so'. Setting up pointers.
Error opening session with unsigned PD
PF_VALIDATOR: ERROR: -1 . 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 HTP stub: libcalculator_htp.so
PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libcalculator_htp.so'. Setting up pointers.
Error opening session with unsigned PD
PF_VALIDATOR: ERROR: -1 . 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.
Another thing is that, i tried SNPE-1.52 with its dsp lib in the begining, the inception_v3 example could run on my sm7325 dsp, so i guess the dsp is fine.
Please help me to fix this issue.
Many thanks!!!