Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >专栏 >TensorFlow Lite for Microcontroller

TensorFlow Lite for Microcontroller

作者头像
用户6026865
发布于 2023-03-03 01:18:57
发布于 2023-03-03 01:18:57
1.1K0
举报

The MCU universe

Microcontrollers (MCUs) are the tiny computers that power our technological environment. There are over 30 billion of them manufactured every year, embedded in everything from household appliances to fitness trackers.

If you’re in a house right now, there are dozens of microcontrollers all around you. If you drive a car, there are dozens riding with you on every drive.

Using TensorFlow Lite for Microcontrollers (TFLM), developers can deploy TensorFlow models to many of these devices, enabling entirely new forms of on-device intelligence.

While ubiquitous, microcontrollers are designed to be inexpensive and energy efficient, which means they have small amounts of memory and limited processing power.

A typical microcontroller might have a few hundred kilobytes of RAM, and a 32-bit processor running at less than 100 MHz.

With advances in machine learning enabled by TFLM, it has become possible to run neural networks on these devices.

With minimal computational resources, it is important that microcontroller programs are optimized to run as efficiently as possible. This means making the most of the features of their microprocessor hardware, which requires carefully tuned application code.

Many of the microcontrollers used in popular products are built around Arm’s Cortex-M based processors, which are the industry leader in 32-bit microcontrollers, with more than 47 billion shipped.

Arm’s open source CMSIS-NN library provides optimized implementations of common neural network functions that maximize performance on Cortex-M processors.

This includes making use of DSP and M-Profile Vector Extension (MVE) instructions for hardware acceleration of operations such as matrix multiplication.

Benchmarks for key use cases

Arm’s engineers have worked closely with the TensorFlow team to develop optimized versions of the TensorFlow Lite kernels that use CMSIS-NN to deliver blazing fast performance on Arm Cortex-M cores.

Developers using TensorFlow Lite can use these optimized kernels with no additional work, just by using the latest version of the library. Arm has made these optimizations in open source, and they are free and easy for developers to use today!

The following benchmarks show the performance uplift when using CMSIS-NN optimized kernels versus reference kernels for several key use cases featured in the TFLM example applications.

The tests have been performed on an Arm Cortex-M4 based FPGA platform:

The Arm Cortex-M4 processor supports DSP extensions, that enables the processor to execute DSP-like instructions for faster inference. To improve the inference performance even further, the new Arm Cortex-M55 processor supports MVE, also known as Helium technology.

Improving performance with CMSIS-NN

So far, the following optimized CMSIS-NN kernels have been integrated with TFLM:

There will be regular updates to the CMSIS-NN library to expand the support of optimized kernels, where the key driver for improving support is that it should give a significant performance increase for a given use case.

For discussion regarding kernel optimizations, a good starting point is to raise a ticket on the TensorFlow or CMSIS Github repository describing your use case.

Most of the optimizations are implemented specifically for 8-bit quantized (int8) operations, and this will be the focus of future improvements.

Next leap in neural processing

Looking ahead into 2021 we can expect a dramatic increase in neural processing from the introduction of devices including a microNPU (Neural Processing Unit) working alongside a microcontroller.

These microNPUs are designed to accelerate ML inference within the constraints of embedded and IoT devices, with devices using the Arm Cortex-M55 MCU coupled with the new Ethos-U55 microNPU delivering up to a 480x performance increase compared to previous microcontrollers.

This unprecedented level of ML processing capability within smaller, power constrained devices will unlock a huge amount of innovation across a range of applications, from smart homes and cities to industrial, retail, and healthcare.

The potential for innovation within each of these different areas is huge, with hundreds of sub segments and thousands of potential applications that will make a real difference to people’s lives.

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2022-12-12,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 SmellLikeAISpirit 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
Sensory’s TrulyHandsfree and Arm’sCortex-M55
Efficient wake word recognition on microcontrollers with Cortex-M55 and Helium technology for use in consumer and automotive products that include more and more AI features for voice applications.
用户6026865
2022/09/02
3380
Sensory’s TrulyHandsfree and Arm’sCortex-M55
TensorFlow Lite Micro on CM
Microcontrollers power the world around us.
用户6026865
2023/03/03
1.3K0
TensorFlow Lite Micro on CM
Hello Edge: Keyword Spotting on Microcontrollers
- Hello Edge: Keyword Spotting on Microcontrollers -
用户6026865
2023/03/02
6050
Hello Edge: Keyword Spotting on Microcontrollers
【ARM】CMSIS 软件标准接口
CMSIS(Cortex Microcontroller Software Interface Standard)是由ARM公司开发的一套软件标准接口,旨在为基于ARM Cortex-M处理器的微控制器提供一致的开发接口。CMSIS通过定义一组标准化的API和库函数,极大地简化了嵌入式软件开发的复杂性,提高了代码的移植性和重用性。
LuckiBit
2024/12/11
4420
【ARM】CMSIS 软件标准接口
【云+社区年度征文】TinyML实践-2:How TinyML Works?
对于Tensorflow最大需求是能够在桌面系统中训练并运行模型,这种需求影响了很多设计决策,例如为了更低的延迟和更多的功能而增加可执行文件的大小。云端服务器上,RAM以GB为衡量单位,存储空间以TB为单位,几百兆字节的二进制文件通常不是问题。
flavorfan
2020/12/07
1.8K0
【云+社区年度征文】TinyML实践-2:How TinyML Works?
MDK带的CMSIS5.7.0发布,ARM机器学习库,神经网络库和DSP正式迎来大换血,加速单片机AI进程
ARM按照今年年初的路线图稳步推进,这个月如期带来了CMSIS5.7.0。 1、CMSIS5.7.0镜像下载: http://www.armbbs.cn/forum.php?mod=viewt
Simon223
2020/04/21
1.1K0
用于ARM Cortex-M系列的芯片的神经网络推理库CMSIS-NN详解
论文题目:《CMSIS-NN: Effificient Neural Network Kernels for Arm Cortex-M CPUs》, 2018年
BBuf
2022/09/28
3.2K1
用于ARM Cortex-M系列的芯片的神经网络推理库CMSIS-NN详解
想让你的微控制器AI效率提升5倍吗?
目前,在许多需要在本地进行数据分析的“永远在线”的物联网边缘设备中,神经网络正在变得越来越普及,主要是因为可以有效地同时减少数据传输导致的延时和功耗。而谈到针对物联网边缘设备上的神经网络,我们自然会想到Arm Cortex-M系列处理器内核,那么如果您想要强化它的性能并且减少内存消耗,CMSIS-NN就是您最好的选择。基于CMSIS-NN内核的神经网络推理运算,对于运行时间/吞吐量将会有4.6X的提升,而对于能效将有4.9X的提升。
刘盼
2018/07/26
3670
想让你的微控制器AI效率提升5倍吗?
【ARM】ARM Cortex 处理器详细讲解
ARM Cortex处理器系列是ARM公司推出的一系列高性能、低功耗的处理器核心,广泛应用于不同类型的电子设备。Cortex处理器按应用需求分为三个主要系列:Cortex-A、Cortex-M和Cortex-R。以下是对这些系列的详细讲解。
LuckiBit
2024/12/11
7750
你听说过Cortex-M85么?
就在今天,Arm发布了新一代的Cortex-M处理器,Cortex-M85。简单粗暴的打个比方:
GorgonMeducer 傻孩子
2022/05/17
7580
你听说过Cortex-M85么?
移动和嵌入式设备上也能直接玩机器学习?
最近,机器学习(ML)话题大热,Arm也推出神经网络机器学习软件 Arm NN。这是一项关键技术,可在基于 Arm 的高能效平台上轻松构建和运行机器学习应用程序。那么对于Arm NN,你又了解多少呢?
刘盼
2018/03/16
1.9K0
移动和嵌入式设备上也能直接玩机器学习?
人人都能看懂的AIoT开发
自2017年开始,“AIoT”一词便开始频频刷屏,成为物联网的行业热词。“AIoT”即“AI+IoT”,指的是人工智能技术与物联网在实际应用中的落地融合。当前,已经有越来越多的人将AI与IoT结合到一起来看,AIoT作为各大传统行业智能化升级的最佳通道,已经成为物联网发展的必然趋势。本场chat我们一起学习什么是AIoT,如何入门AIoT开发,在人工智能物联网时代来临之前做好知识储备。
刘盼
2019/05/17
1.4K0
人人都能看懂的AIoT开发
CMSIS的简介_CMSInitiatingOccupancyFraction
Cortex微控制器软件接口标准(Cortex Microcontroller Software Interface Standard)是ARM和一些编译器厂家以及半导体厂家共同遵循的一套标准,是由ARM专门针对CORTEX-M系列提出的标准。在该标准的约定下,ARM和芯片厂商会提供一些通用的API接口来访问Cortex内核以及一些专用外设,以减少更换芯片以及开发工具等移植工作所带来的金钱以及时间上的消耗。只要都是基于Cortex的芯片,代码均是可以复用的。CMSIS是 Cortex-M 处理器系列的与供应商无关的硬件抽象层。使用 CMSIS可以为处理器和外设实现一致且简单的软件接口,从而简化软件的重用、缩短微控制器新开发人员的学习过程,并缩短新设备的上市时间。
全栈程序员站长
2022/09/20
7780
【玩转Arm-2D】入门和移植从未如此简单
这意味着,本世纪初应用在个人电脑上的一些技术也可能会被逐步引入到深度嵌入式系统上(Deep Embedded System)——这类系统的典型也就是大家所熟知的单片机或者说Cortex-M处理器。
GorgonMeducer 傻孩子
2023/09/06
2.1K0
【玩转Arm-2D】入门和移植从未如此简单
M内核迎来大BOSS,ARM发布Cortex-M55配NPU Ethos-U55 ,带来无与伦比的性能提升
全球顶级嵌入式会展Embedded Word2020这个月底就开了,各路厂家都将拿出看家本领。
Simon223
2020/02/19
1.3K0
带你认识一下 ARM Cortex-M 阵营
笔者接触嵌入式领域软件开发已近五年,几乎用的都是 ARM Cortex M 内核系列的微控制器。在这五年期间,感谢 C 语言编译器的存在,让我不用接触汇编即可进行开发,但是彷佛也错过了一些风景,没有领域到编译器之美和 CPU 之美,所以决定周末无聊的休息时间通过寻找资料、动手实验、得出结论的方法来探索 ARM CPU 架构的美妙,以及 C 语言编译器的奥秘。(因为我个人实在是不赞同学校中微机原理类课程的教学方法)。
wenzid
2021/06/21
3K0
带你认识一下 ARM Cortex-M 阵营
【业界】仔细看看ARM的机器学习硬件 它具有怎样的优势?
AiTechYun 编辑:nanan 几周前,ARM宣布推出第一批专用机器学习(ML)硬件。在“Project Trillium”项目中,该公司为智能手机等产品推出了专用的ML处理器,以及专门为加速对
AiTechYun
2018/03/27
1.4K0
【业界】仔细看看ARM的机器学习硬件 它具有怎样的优势?
CMSIS软件包V5.8.0发布,所有组件全面更新,CMSIS-NN神经网络接口函数开始兼容TensorFlow Lite
Github下载: https://github.com/ARM-software/CMSIS_5/releases 论坛下载:
Simon223
2021/07/08
1.5K0
性能最高提升480倍:Arm推出2款新AI边缘计算芯片设计,专为物联网设备打造
今天,Arm 推出了 2 款具有 AI 功能的 NPU(神经处理单元),Arm Cortex-M55 和 Ethos-U55。
量子位
2020/02/21
7280
【STM32F407开发板用户手册】第1章 初学STM32F407的准备工作
最新教程下载:http://www.armbbs.cn/forum.php?mod=viewthread&tid=93255 第1章   初学STM32F407的准备工作 俗话说万事开头难,学习一门新
Simon223
2020/06/03
6.1K0
推荐阅读
相关推荐
Sensory’s TrulyHandsfree and Arm’sCortex-M55
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档