Litcius/Paper detail

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

Enrico Tabanelli, Giuseppe Tagliavini, Luca Benini

2022IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems19 citationsDOIOpen Access PDF

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 <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$\mu \text{s}$ </tex-math></inline-formula> latency, <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$4.8\times $ </tex-math></inline-formula> 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.

Topics & Concepts

Computer scienceLatency (audio)InferenceMemory footprintKey (lock)SpeedupEnhanced Data Rates for GSM EvolutionMicrocontrollerParallel computingArtificial intelligenceEmbedded systemOperating systemTelecommunicationsMachine Learning and Data ClassificationAdvanced Neural Network ApplicationsMachine Learning and ELM