git clone https://github.com/weiliu89/caffe.git cd caffe git checkout ssd cp Makefile.config.example Makefile.config // 使用服务器上的/home/baiduiov/tool/QNN/caffe/Makefile.config make -j8 # Make sure to include $CAFFE_ROOT/python to your PYTHONPATH. #可以参考 /home/baiduiov/tool/QNN/qnn-v1.7.2.211027051327_28940/target/x86_64-linux-clang/bin/source.sh make py
source ${QNN_SDK_ROOT}/target/x86_64-linux-clang/bin/envsetup.sh -t <your_tensorflow_installation_path> for example:/home/baiduiov/anaconda3/pkgs/tensorflow-base-1.15.0-mkl_py36he1670d9_0 source ${QNN_SDK_ROOT}/target/x86_64-linux-clang/bin/envsetup.sh -c <your_caffe_installation_path> for example:/home/baiduiov/tool/QNN/caffe/python ///ssd caffe source ${QNN_SDK_ROOT}/target/x86_64-linux-clang/bin/envsetup.sh -o <your_onnx_installation_path> for example:/home/baiduiov/anaconda3/pkgs/onnx-1.6.0-py36h830a2c2_101
for example: ${QNN_SDK_ROOT}/target/x86_64-linux-clang/bin/qnn-caffe-converter --input_network FaceDetection0428V3Main.prototxt --caffe_bin FaceDetection0428V3Main.caffemodel ----input_list image.txt --output_path FaceDetection0428V3Main.cpp 2021-12-02 19:01:25,593 - 214 - INFO - Skipping quantization, no input_list provided 2021-12-02 19:01:25,594 - 214 - INFO - Saving QNN Model... 2021-12-02 19:01:25,601 - 214 - INFO - Model CPP saved at: FaceDetection0428V3Main.cpp 2021-12-02 19:01:25,601 - 214 - INFO - Model BIN saved at: /home/baiduiov/tool/QNN/qnn-v1.7.2.211027051327_28940/target/x86_64-linux-clang/bin/FaceDetection0428V3Main.bin 2021-12-02 19:01:25,606 - 214 - INFO - Model Network JSON saved at: /home/baiduiov/tool/QNN/qnn-v1.7.2.211027051327_28940/target/x86_64-linux-clang/bin/FaceDetection0428V3Main_net.json 2021-12-02 19:01:25,606 - 214 - INFO - Conversion complete!
(qnn_env) frewen@freweniubuntu:~$ source ${QNN_ROOT}/check-linux-dependency.sh Checking for clang-9: dpkg-query: 没有找到与 clang-9 相匹配的软件包 clang-9 Found: /usr/local/clang-9.0.0 . Added to PATH variable Checking for flatbuffers-compiler: Checking for libflatbuffers-dev: install ok installed Checking for rename: install ok installed ============================================================= All Dependency Packages Found
# find / -name "*Qnn*" /ifs/lib64/libQnnCpuFusa.so.1.3 /ifs/lib64/libQnnCpuFusa.so find: Can't get stat. (/dev/spi3): No such process find: Cannot recurse into '/dev/sem' - filesystem forms an infinite loop /mnt/lib64/libQnnCpu.so /mnt/lib64/libQnnHtp.so /mnt/lib64/libQnnHtpNetRunExtensions.so /mnt/lib64/libQnnHtpProfilingReader.so /mnt/lib64/libQnnHtpV68Stub.so /mnt/lib64/libQnnSaver.so /mnt/etc/images/cdsp0/libQnnHtpV68Skel.so /mnt/etc/images/cdsp1/libQnnHtpV68Skel.so