CMSIS-NN  Version 1.0.0
CMSIS NN Software Library
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros Groups Pages
CMSIS NN Software Library

Introduction

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 Cortex-M processor cores.

The library is divided into a number of functions each covering a specific category:

  • Neural Network Convolution Functions
  • Neural Network Activation Functions
  • Fully-connected Layer Functions
  • Neural Network Pooling Functions
  • Softmax Functions
  • Neural Network Support Functions

The library has separate functions for operating on different weight and activation data types including 8-bit integers (q7_t) and 16-bit integers (q15_t). The descrition of the kernels are included in the function description. The implementation details are also described in this paper [1].

Block Diagram

CMSIS-NN-OVERVIEW.PNG

Examples

The library ships with a number of examples which demonstrate how to use the library functions.

Pre-processor Macros

Each library project have differant pre-processor macros.

  • ARM_MATH_DSP:

Define macro ARM_MATH_DSP, If the silicon supports DSP instructions.

  • ARM_MATH_BIG_ENDIAN:

Define macro ARM_MATH_BIG_ENDIAN to build the library for big endian targets. By default library builds for little endian targets.

  • ARM_NN_TRUNCATE:

Define macro ARM_NN_TRUNCATE to use floor instead of round-to-the-nearest-int for the computation.

Copyright Notice

Copyright (C) 2010-2018 Arm Limited. All rights reserved.

[1] CMSIS-NN: Efficient Neural Network Kernels for Arm Cortex-M CPUs https://arxiv.org/abs/1801.06601