SNPE Building and Executing Your Model Tutorial

This tutorial will walk you through how to use Qualcomm’s Neural Processing SDK, commonly referred to as the SNPE SDK, to run your AI model on a hardware device’s processing unit of your choice. Ex. Running a Tensorflow model on a GPU.

This tutorial provides an example Tensorflow model (“Inception v3”) to show you the workflow. When applying this to your own model, be sure to consider these key variables which determine how you should use SNPE for your situation:

  1. What model do you want to use?

    1. How will you download it?

    2. How will you get the input data?

    3. How will you format the input data to feed it into your model?

    4. Do you want to quantize it? (Required for HTP / DSP target device processors)

  2. Which framework is your model using? (Ex. ONNX, PyTorch, Tensorflow, etc.)

  3. What is the OS and architecture of your host machine? (Ex. Linux x86_64)

  4. What is the OS and architecture of your target device? (Ex. Ubuntu Aarch64)

  5. Which processor(s) do you want to use for your AI models? (CPU / GPU / DSP / HTP / AIP)

With those answers, you can adapt this tutorial to work with a model of your choice on your host machine, with any supported target device.

To start with, choose the proper instructions below based on which type of host machine you would like to use:

  1. Linux Host Machine

  2. Windows Host Machine

Warning

Cross-compiling from a Windows host machine to a Linux target device is not supported.

If you are using a Windows host machine, you can either use Windows Subsystem Linux (WSL) or dual-boot your machine with a Linux image (Ubuntu 22.04 is recommended) to work with Linux / Android targets. If you use WSL, follow the Linux instructions below.

If you have any issues, please reach out on our Discord server!