This is a cache of https://discuss.96boards.org/t/snapdragon-neural-processing-engine-snpe/4305. It is a snapshot of the page at 2024-10-31T09:53:56.674+0000.
<strong>snapdragon</strong> Neural Processing Engine (SNPE) - DragonBoard 820c - 96Boards Forum

snapdragon Neural Processing Engine (SNPE)

I was trying to get the SNPE example AlexNet (SNPE version 1.13.0) running on the DragonBoard820c, but when running

snpe-net-run

I receive the following error:

FATAL 0 tffffae79b010 /home/host/build/aarch64-linux-gcc4.9/SecondParty/symphony/src/symphony/src/lib/runtime.cc:468 runtime_init() This version of Symphony is targeted to snapdragon™ platforms
tffffae79b010 /home/host/build/aarch64-linux-gcc4.9/SecondParty/symphony/src/symphony/src/lib/runtime.cc:468 - Terminating with exit(1)

it seems that the symphony library libsymphony-cpu.so is detecting that it is not running on a snapdragon platform although it obviously is.
When checking the output of /proc/cpuinfo, vendor_id, model and model_name are not specified:

processor : 0
BogoMIPS : 38.40
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x211
CPU revision : 2

processor : 1
BogoMIPS : 38.40
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x211
CPU revision : 2

processor : 2
BogoMIPS : 38.40
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x205
CPU revision : 2

processor : 3
BogoMIPS : 38.40
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x51
CPU architecture: 8
CPU variant : 0x1
CPU part : 0x205
CPU revision : 2

Do you think the /proc/cpuinfo is related to this problem?

Is there any information about the support of SNPE on the DragonBoard 820c?

Some more information:
uname -r
Linux linaro-alip 4.11.0-qcomlt #1 SMP PREEMPT Mon Nov 6 23:24:36 UTC 2017 aarch64 GNU/Linux

I don’t think so. This SDK is designed to sit on top of the Qualcomm vendor kernel and their Android port, neither of which are present in the Debian builds for Dragonboard 820C.

Hi,
I am also very interested in using this feature with the 820C.
From Qualcomm support side we can see that for snapdragon 625 and 626 SNPE is supported under Linux.
What do we need to do to get Linux support for 820?

Hi Himpa,
Did you get any clue on this error?
I have also tested SNPE example AlexNet (SNPE version 1.18.0) and getting the same error.

Hi,
I have made below change and SNPE cpu runtime works

— a/arch/arm64/kernel/cpuinfo.c
+++ b/arch/arm64/kernel/cpuinfo.c
@@ -164,6 +164,8 @@ static int c_show(struct seq_file *m, void *v)
seq_printf(m, “CPU revision\t: %d\n\n”, MIDR_REVISION(midr));
}

+seq_printf(m, “Hardware\t: Qualcomm Technologies, Inc APQ8096\n”);

    return 0;

}

nice!

can you please provide instructions for us to reproduce what you’ve been able to do?

if you think it’s appropriate you can submit this information on this wiki: https://github.com/96boards/documentation/wiki/Dragonboard-Hexagon-DSP

thanks!

  1. Download SNPE from QDN

  2. Follow the instructions to setup SNPE, Caffe & Caffe2 and Alexnet tutorial as mentioned in the below paths of documentation.
    SNPE: snpe-1.18.0/snpe-1.18.0/doc/html/setup.html
    Caffe & Caffe2 : snpe-1.18.0/snpe-1.18.0/doc/html/setup_caffe.html
    Alexnet tutorial: snpe-1.18.0/snpe-1.18.0/doc/html/tutorial_setup.html

  3. Copy the below binaries, libs and folders to snapdragon 820 board at /home/linaro

    snpe-1.18.0/bin/aarch64-linux-gcc4.9/snpe-net-run
    snpe-1.18.0/lib/aarch64-linux-gcc4.9/libSNPE.so
    snpe-1.18.0/lib/aarch64-linux-gcc4.9/libsnpe_adsp.so
    snpe-1.18.0/lib/aarch64-linux-gcc4.9/libsymphony-cpu.so
    snpe-1.18.0/models/alexnet

  4. Export binaries and lib paths on target
    export PATH=$PATH:/home/linaro/snpe-1.18.0/bin/aarch64-linux-gcc4.9/
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/linaro/snpe-1.18.0/lib/aarch64-linux-gcc4.9/

  5. Run the Alexnet model as shown below on the target.

linaro@OpenQ820:~/snpe/alexnet$ snpe-net-run --container dlc/bvlc_alexnet.dlc --input_list data/target_raw_list.txt

Model String: N/A
SNPE v1.18.0.0

libpowermarker.so: cannot open shared object file: No such file or directoryPowerMarker: Error while loading the lib
Processing DNN input(s):
data/cropped/trash_bin.raw
Processing DNN input(s):
data/cropped/plastic_cup.raw
Processing DNN input(s):
data/cropped/chairs.raw
Processing DNN input(s):
data/cropped/handicap_sign.raw
Processing DNN input(s):
data/cropped/notice_sign.raw

linaro@OpenQ820:~/snpe/alexnet$ python scripts/show_alexnet_classifications.py -i data/target_raw_list.txt -o output/ -l data/ilsvrc_2012_labels.txt
Classification results
data/cropped/trash_bin.raw 0.949348 412 ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin
data/cropped/plastic_cup.raw 0.749104 647 measuring cup
data/cropped/chairs.raw 0.365684 831 studio couch, day bed
data/cropped/handicap_sign.raw 0.188247 919 street sign
data/cropped/notice_sign.raw 0.722709 458 brass, memorial tablet, plaque
cropped/trash_bin.raw

@mvali, have you tried to run the snpe-net-run command with –use_gpu or –use_dsp options, for the alexnet model?

I believe that, without such options, SNPE will run in CPU mode only.

Note: there is a post in QDN forum which states that the “GPU runtime” is not available in libSNPE.so for snapdragon 820E:

I have not tried –use_gpu or –use_dsp options because i know those won’t work without KGSL and FastRPC support. I am not sure about making GPU runtime working but for aDSP, I think we can port FastRPC. I would like to know if some is already working on GPU support.

1 Like

A post was merged into an existing topic: Build Android Image for Dragonboard820