Snapdragon Neural Processing Engine SDK
Reference Guide
Features Overview

Capabilities

The Snapdragon Neural Processing Engine (SNPE) is a Qualcomm Snapdragon software accelerated runtime for the execution of deep neural networks. With SNPE, users can:

  • Execute an arbitrarily deep neural network
  • Execute the network on the SnapdragonTM CPU, the AdrenoTM GPU or the HexagonTM DSP.
  • Debug the network execution on x86 Ubuntu Linux
  • Convert Caffe, Caffe2, ONNXTM and TensorFlowTM models to a SNPE Deep Learning Container (DLC) file
  • Quantize DLC files to 8 bit fixed point for running on the Hexagon DSP
  • Debug and analyze the performance of the network with SNPE tools
  • Integrate a network into applications and other code via C++ or Java

Model Workflow

SNPE


Model training is performed on a popular deep learning framework (Caffe, Caffe2, ONNX and TensorFlow models are supported by SNPE.) After training is complete the trained model is converted into a DLC file that can be loaded into the SNPE runtime. This DLC file can then be used to perform forward inference passes using one of the Snapdragon accelerated compute cores.

The basic SNPE workflow consists of only a few steps:

  1. Convert the network model to a DLC file that can be loaded by SNPE.
  2. Optionally quantize the DLC file for running on the Hexagon DSP.
  3. Prepare input data for the model.
  4. Load and execute the model using SNPE runtime.

Supported Snapdragon Devices

Snapdragon Device Support Matrix
Snapdragon Device CPU GPU DSP AIP
Qualcomm Snapdragon 855 Yes Yes Yes (CDSP) Yes (CDSP)
Qualcomm Snapdragon 845 Yes Yes Yes (CDSP) No
Qualcomm Snapdragon 710 Yes Yes Yes (CDSP) No
Qualcomm Snapdragon 630 Yes Yes No No
Qualcomm Snapdragon 625 Yes Yes No No
Qualcomm Snapdragon 605 Yes Yes Yes (CDSP) No
Qualcomm Snapdragon 450 Yes Yes No No

What is included in the SDK

$SNPE_ROOT refers to the base directory where the SDK is installed.

What's Included in the SDK
SDK Asset Type Compiler C++ STL Description
android lib - - Android aar file used to include SNPE into your application
bin/x86_64-linux-clang binary clang3.4 gnustl x86 Linux binaries
bin/arm-android-clang6.0 binary clang6.0 libc++ ARM Android binaries
bin/aarch64-android-clang6.0 binary clang6.0 libc++ Aarch64 Android binaries
bin/aarch64-ubuntu-gcc7.5 binary gcc7.5 gnustl Aarch64 Ubuntu binaries
bin/arm-oe-linux-gcc8.2hf binary gcc8.2 gnustl Arm Linux Hard Float binaries
bin/aarch64-oe-linux-gcc8.2 binary gcc8.2 gnustl Aarch64 Linux binaries
bin/aarch64-oe-linux-gcc9.3 binary gcc9.3 gnustl Aarch64 Linux binaries
lib/x86_64-linux-clang lib clang3.4 gnustl x86 Linux libraries
lib/arm-android-clang6.0 lib clang6.0 libc++ ARM Android libraries
lib/aarch64-android-clang6.0 lib clang6.0 libc++ Aarch64 Android libraries
lib/dsp lib - - Hexagon DSP runtime libraries
lib/aarch64-ubuntu-gcc7.5 lib gcc7.5 gnustl Aarch64 Ubuntu libraries
lib/arm-oe-linux-gcc8.2hf lib gcc8.2 gnustl ARM Linux Hard Float libraries
lib/aarch64-oe-linux-gcc8.2 lib gcc8.2 gnustl Aarch64 Linux libraries
lib/aarch64-oe-linux-gcc9.3 lib gcc9.3 gnustl Aarch64 Linux libraries
lib/python lib - - SNPE python model tools modules
include/zdl/SNPE include dir - - SNPE SDK API header files
examples examples dir - - Source code sample applications in Native C++ and Android Java
doc documents - - User and reference API guide
benchmarks scripts - - Benchmark framework to gather runtime performance data on devices
models resources - - Example neural network models

Important Files and Locations
File Type Details Location
envsetup.sh script Script to setup various environment variables needed to run SDK tools and binaries $SNPE_ROOT/bin
snpe-caffe-to-dlc script Script to convert a Caffe model to a DLC file $SNPE_ROOT/bin/x86_64-linux-clang
snpe-caffe2-to-dlc script Script to convert a Caffe2 model to a DLC file $SNPE_ROOT/bin/x86_64-linux-clang
snpe-onnx-to-dlc script Script to convert a ONNX model to a DLC file $SNPE_ROOT/bin/x86_64-linux-clang
snpe-tensorflow-to-dlc script Script to convert a TensorFlow model to a DLC file $SNPE_ROOT/bin/x86_64-linux-clang
snpe-dlc-quantize executable Used to quantize a DLC file using 8 bit quantization $SNPE_ROOT/bin/x86_64-linux-clang
snpe-diagview executable View SNPE timing output $SNPE_ROOT/bin/x86_64-linux-clang
snpe-dlc-info script Script to print various DLC file information $SNPE_ROOT/bin/x86_64-linux-clang
snpe_bench.py script Script to run DLC model on device and collect benchmark information $SNPE_ROOT/benchmarks
snpe-net-run executable Example binary that can run a neural network $SNPE_ROOT/bin/x86_64-linux-clang
$SNPE_ROOT/bin/arm-android-clang6.0
$SNPE_ROOT/bin/aarch64-android-clang6.0
$SNPE_ROOT/bin/aarch64-ubuntu-gcc7.5
$SNPE_ROOT/bin/aarch64-oe-linux-gcc8.2
$SNPE_ROOT/bin/aarch64-oe-linux-gcc9.3
$SNPE_ROOT/bin/arm-oe-linux-gcc8.2hf
libSNPE.so library SNPE runtime for host and device development $SNPE_ROOT/lib/x86_64-linux-clang
$SNPE_ROOT/lib/arm-android-clang6.0
$SNPE_ROOT/lib/aarch64-android-clang6.0
$SNPE_ROOT/lib/aarch64-ubuntu-gcc7.5
$SNPE_ROOT/lib/aarch64-oe-linux-gcc8.2
$SNPE_ROOT/lib/aarch64-oe-linux-gcc9.3
$SNPE_ROOT/lib/arm-oe-linux-gcc8.2hf
libsymphony-cpu.so library Symphony CPU runtime library. $SNPE_ROOT/lib/x86_64-linux-clang
libsymphony-cpu.so library Symphony CPU runtime library for Android. $SNPE_ROOT/lib/arm-android-clang6.0
$SNPE_ROOT/lib/aarch64-android-clang6.0
libsnpe_dsp_domains_v2.so library Library for Android DSP runtime loading from the /system partition, for non SDM 820 targets. $SNPE_ROOT/lib/arm-android-clang6.0
$SNPE_ROOT/lib/aarch64-android-clang6.0
libsnpe_dsp_v65_domains_v2_skel.so library Hexagon DSP runtime library for v65 targets. $SNPE_ROOT/lib/dsp
libsnpe_dsp_v66_domains_v2_skel.so library Hexagon DSP runtime library for v66 targets. $SNPE_ROOT/lib/dsp
libc++_shared.so library Shared STL library implementation. $SNPE_ROOT/lib/arm-android-clang6.0
$SNPE_ROOT/lib/aarch64-android-clang6.0