CMSIS NN logo

CMSIS NN

Free

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.

FreeFree tier
Type
Open Source
Company
Arm Limited

About CMSIS NN

CMSIS-NN is a software library from Arm that provides a collection of efficient neural network kernels optimized for Cortex-M processor cores. It maximizes performance and minimizes memory footprint for running neural networks on embedded microcontrollers. The library includes functions for convolution, activation, fully-connected layers, SVDF layers, pooling, softmax, and basic math. It supports 8-bit (q7_t) and 16-bit (q15_t) integer data types, and provides three implementation variants targeting processors without SIMD (Cortex-M0), with DSP extension (Cortex-M4), and with MVE extension (Cortex-M55). CMSIS-NN also includes a TFL Micro-compliant API (s8 suffix) that is bit-exact with TensorFlow Lite, enabling seamless deployment of quantized models on Arm Cortex-M devices.

Key Features

Optimized for Cortex-M0, Cortex-M4, and Cortex-M55 (SIMD, DSP, MVE extensions)
Supports 8-bit (q7_t) and 16-bit (q15_t) integer weight and activation data types
Bit-exact TensorFlow Lite Micro compatibility via _s8 APIs
Function categories: convolution, activation, fully-connected, SVDF, pooling, softmax, basic math
Legacy functions (_q7, _q15) for symmetric quantization
Pre-processor macros for DSP, MVE, auto-vectorization, endianness, and truncation
Includes example applications demonstrating library usage

Pros & Cons

Pros
  • Highly optimized for low-power Cortex-M processors, minimizing memory and compute overhead
  • Seamless integration with TensorFlow Lite Micro for end-to-end ML workflow
  • Open source with permissive license (Arm copyright)
  • Supports multiple processor variants with automatic feature-flag selection
  • Bit-exact results with TFLite ensure reproducibility
Cons
  • Limited to Arm Cortex-M processors; not applicable to other architectures or GPUs
  • Only integer quantization (q7, q15, s8) supported; no floating-point inference
  • Legacy APIs (_q7, _q15) are no longer actively developed
  • Requires knowledge of pre-processor macros and hardware features for optimal use

Best For

Deploying neural networks on Arm Cortex-M microcontrollers for edge AIRunning quantized TensorFlow Lite models on embedded devicesReal-time inference in IoT, wearables, and sensor hubsOptimizing ML inference for resource-constrained embedded systems

FAQ

What processors are supported by CMSIS-NN?
CMSIS-NN targets Cortex-M processors and provides three implementations: for cores without SIMD (e.g., Cortex-M0), with DSP extension (e.g., Cortex-M4), and with MVE extension (e.g., Cortex-M55). The appropriate implementation is selected via feature flags.
How does CMSIS-NN integrate with TensorFlow Lite?
CMSIS-NN provides _s8 APIs that are bit-exact with TensorFlow Lite. You can use TensorFlow Lite Micro to deploy models optimized with CMSIS-NN kernels. Refer to TensorFlow's documentation for the integration workflow.
What data types does CMSIS-NN support?
The library supports 8-bit integers (q7_t) and 16-bit integers (q15_t) for legacy functions, and 8-bit signed integers (_s8) for TensorFlow Lite-compliant functions.
Is CMSIS-NN open source?
Yes, CMSIS-NN is open source and released under an Arm copyright license. The source code is available on GitHub as part of the CMSIS 5 project.