Forums - Platform 8295, running InceptionV3 on QNX

1 post / 0 new
Platform 8295, running InceptionV3 on QNX
chendh1105
Join Date: 3 Apr 24
Posts: 2
Posted: Mon, 2024-04-22 20:39

QNN SDK 1.17.0

When the following command is executed, an error occurs:

# qnn-net-run --backend lib/libQnnHtp.so --input_list data/raw_list.txt --retrieve_context inception_v3/Inception_v3_quantized.serialized.bin                     
error:
qnn-net-run pid:14573704
ERROR 0x6c: remote_session_control failed to set thread params
DspTransport.openSession qnn_open failed, 0x0000006b
IDspTransport: Unknown rpc status 0x0000006b
DspTransport failed,cannot open session, error 0xffffffff
     0.0ms [ ERROR ] QnnDsp <E> Error from rpc transport. transportStatus = -1
 
     0.0ms [ ERROR ] QnnDsp <E> Error during send rpc initialization, err 1
 
     0.0ms [ ERROR ] QnnDsp <E> QnnBackend platform setup error
 
    13.6ms [ ERROR ] Could not initialize backend
    13.6ms [ ERROR ] Backend Initialization failure
 
 

I follow the following procedure, can someone help me find out what the problem is

--------------
Convert Models
--------------
Follow official documentation in docs/general/tutorial2.html "Model Conversion and Build" and
docs/general/tutorial2.html "Execution on Android" in "HTP Backend Execution" up to the point
where you create *.serialized.bin.
For qnn-model-lib-generator, use -t option as needed (eg. if NDK is not available).

--------------------------
Push Files onto QNX Target
--------------------------
The following echoes the instructions from the Android Execution example in docs/general/tutorial2.html
(section "Execution on Android" in "HTP Backend Execution") but for a QNX enviroment. If FileZilla is used
to transfer files from host machine to the target, please make sure the file transfer type is set to binary.

1. Telnet to the QNX terminal and create directories:
* mkdir /data/local/tmp/lib
* mkdir /data/local/tmp/bin

2. FTP the following binaries (from the QNN SDK) to target:
* target/aarch64-qnx/lib/libQnnHtpV68Stub.so to /data/local/tmp/lib
* target/aarch64-qnx/lib/libQnnHtp.so        to /data/local/tmp/lib
* target/aarch64-qnx/bin/qnn-net-run         to /data/local/tmp/bin
* target/aarch64-qnx/bin/qnn-profile-viewer  to /data/local/tmp/bin

3. In the QNX Terminal, enable permissions for QNN binaries:
* chmod 777 /data/local/tmp/bin/qnn-net-run
* chmod 777 /data/local/tmp/bin/qnn-profile-viewer

4. FTP the following binary (from the QNN SDK) to target's /mnt/etc/images/cdsp0/
* target/hexagon-v68/lib/unsigned/libQnnHtpV68Skel.so

5. FTP non-FuSa CDSP images to /mnt/etc/images/
* <QNX_Build_Path>/qnx_ap/prebuilt_NHLOS/cdsp0_adas/non_fusa/asic_8540/cdsp0.mbn
* <QNX_Build_Path>/qnx_ap/prebuilt_NHLOS/cdsp0_adas/non_fusa/asic_8540/cdsp0.mdt
* <QNX_Build_Path>/qnx_ap/prebuilt_NHLOS/cdsp0_adas/non_fusa/asic_8540/shared_obj/fastrpc_shell_3
* <QNX_Build_Path>/qnx_ap/prebuilt_NHLOS/cdsp0_adas/non_fusa/asic_8540/shared_obj/fastrpc_shell_unsigned_3

6. FTP an input list and input images from your host machine to target's /data/local/tmp/bin
* Example images and list can be found in the example in docs/general/tutorial2.html
  "Execution on Android" in "HTP Backend Execution".

7. FTP the *serialized.bin to target's /data/local/tmp/bin
* From the Convert Models step

8. Reset the target with the following command in the QNX terminal:
* reset

---------------------------------------
Execute Neural Network using HTP on QNX
---------------------------------------
After following steps from "Push Files onto QNX Target" above, now qnn-net-run and qnn-profile-viewer
can be executed using HTP and QNX.

1. Telnet into the QNX Terminal and setup the execution environment
* cd /data/local/tmp/bin
* export PATH=/data/local/tmp/bin:$PATH
* export VENDOR_LIB=/data/local/tmp/lib
* export LD_LIBRARY_PATH=$VENDOR_LIB:$LD_LIBRARY_PATH
* export ADSP_LIBRARY_PATH="/mnt/etc/images/cdsp0;$VENDOR_LIB"

2. Execute qnn-net-run
* ./qnn-net-run --backend libQnnHtp.so \
        --input_list <filename_for_input_list> \
        --retrieve_context <serialized_network_binary.bin>

3. Execute qnn-net-run with profiling
* ./qnn-net-run --backend libQnnHtp.so \
        --input_list <filename_for_input_list> \
        --retrieve_context <serialized_network_binary.bin> \
        --profile_level detailed \
        --log_level error

Please read docs/general/tools.html#qnn-net-run for more options for qnn-net-run.

 

# echo $VENDOR_LIB

/data/local/tmp/lib
# echo $LD_LIBRARY_PATH
/data/local/tmp/lib:/data/local/tmp/lib:/ifs/lib64/:/ifs/usr/lib64:/ifs/lib64/dll:/ifs/lib/:/ifs/usr/lib:/ifs/lib64/dll/pci:/mnt/lib64/:/mnt/usr/lib64:/mnt/lib64/dll:/mnt/lib/:/mnt/usr/lib:/mnt/lib64/dll/pci:/mnt/lib64/camera:/ifs/lib64/camera:
# echo $ADSP_LIBRARY_PATH
/mnt/etc/images/cdsp0;/data/local/tmp/lib
  • Up1
  • Down0

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.