Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.17 KB

snpe.rst

File metadata and controls

29 lines (18 loc) · 1.17 KB

SNPE

Snapdragon Neural Processing Engine (SNPE) is a Qualcomm Snapdragon software accelerated runtime for the execution of deep neural networks.

Quantization Scheme

8/16 bit per-layer asymmetric linear quantization.

$$\begin{equation} q = \mathtt{clamp}\left(\left\lfloor R * \dfrac{x - cmin}{cmax - cmin} \right\rceil, lb, ub\right) \end{equation}$$

where R is the integer range after quantization, cmax and cmin are calculated range of the floating values, lb and ub are bounds of integer range. Taking 8bit as an example, R=255, [lb, ub]=[0,255].

In fact, when building the SNPE with the official tools, it will firstly convert the model into .dlc model file of full precision, and then optionally change it into a quantized version.

Attention

Users can provide a .json file to override the parameters.

The values of scale and offset are not required, but can be overrided.

SNPE will adjust the values of cmin and cmax to ensure zero is representable.