Optimizing Random Forest-Based Inference on RISC-V MCUs at the Extreme Edge


METADATA ONLY
Loading...

Date

2022-11

Publication Type

Journal Article

ETH Bibliography

yes

Citations

Altmetric
METADATA ONLY

Data

Rights / License

Abstract

Random forests (RFs) use a collection of decision trees (DTs) to perform the classification or regression. RFs are adopted in a wide variety of machine learning (ML) applications, and they are finding increasing use also in scenarios at the extreme edge of the Internet of Things (TinyML) where memory constraints are particularly tight. This article addresses the optimization of the computational and storage costs for running DTs on the microcontroller units (MCUs) typically deployed in TinyML scenarios. We introduce three alternative DT kernels optimized for memory- and compute-limited MCUs, providing insight into the key memory-latency tradeoffs on an open-source RISC-V platform. We identify key bottlenecks and demonstrate that SW optimizations enable up to significant memory footprint and latency decrease. Experimental results show that the optimized kernels achieve up to 4.5 $\mu \text{s}$ latency, $4.8\times $ speedup, and 45% storage reduction against the widely-adopted naive DT design. We carry out a detailed performance and energy cost analysis of various optimized DT variants: the best approach requires just 8 instructions and 0.155 pJ per decision.

Publication status

published

Editor

Book title

Volume

41 (11)

Pages / Article No.

4516 - 4526

Publisher

IEEE

Event

Edition / version

Methods

Software

Geographic location

Date collected

Date created

Subject

Decision tree (DT); edge-computing; machine learning (ML); random forest (RF); reduced instruction set computer (RISC)-V

Organisational unit

03996 - Benini, Luca / Benini, Luca check_circle

Notes

Funding

101034126 - Pilot using Independent Local & Open Technologies (EC)

Related publications and datasets