CMSISNN
Version 3.1.0
CMSIS NN Software Library

This user manual describes the CMSIS NN software library, a collection of efficient neural network kernels developed to maximize the performance and minimize the memory footprint of neural networks on CortexM processor cores.
The library is divided into a number of functions each covering a specific category:
The library has separate functions for operating on different weight and activation data types including 8bit integers (q7_t) and 16bit integers (q15_t). The descrition of the kernels are included in the function description. The implementation details are also described in this paper [1].
CMSISNN targets CortexM processors with typically three different implementations for each function. Each targets a different group of processors.
The functions can be classified into two segments
The legacy functions can be identified with their suffix of _q7 or _q15 and are no new development is done there. The article in [2] describes in detail how to run a network using the legacy functions.
The functions supporting TensorFlow Lite framework is identified by the _s8 suffix and can be invoked from TFL micro. The functions are bit exact to TensorFlow Lite. Refer to the TensorFlow's documentation in [3] on how to run a TensorFlow Lite model using optimized CMSISNN kernels.
The library ships with a number of examples which demonstrate how to use the library functions.
Each library project have different preprocessor macros.
Define macro ARM_MATH_DSP, If the silicon supports DSP instructions(DSP extension).
Define macro ARM_MATH_MVEI, If the silicon supports MProfile Vector Extension.
Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. This is supported only for the legacy functions i.e, functions targetted at TensorFlow Lite do not support big endianness. By default library builds for little endian targets.
Define macro ARM_NN_TRUNCATE to use floor instead of roundtothenearestint for the computation.
Copyright (C) 20102019 Arm Limited. All rights reserved.
[1] CMSISNN: Efficient Neural Network Kernels for Arm CortexM CPUs https://arxiv.org/abs/1801.06601
[2] Converting a Neural Network for Arm CortexM with CMSISNN
https://developer.arm.com/solutions/machinelearningonarm/developermaterial/howtoguides/convertinganeuralnetworkforarmcortexmwithcmsisnn/singlepage [3] https://www.tensorflow.org/lite/microcontrollers/library
[4] https://github.com/ARMsoftware/CMSIS_5/tree/develop/CMSIS/NN#legacyvstflmicrocompliantapis