AI inference on bare-metal RISC-V Microcontrollers: A comparison of ExecuTorch and IREE/MLIR
2026-06-09 , Poster Island C

We have previously demonstrated that it is practical to bring up ExecuTorch on a low power bare metal microcontroller. ExecuTorch is a project derived from the PyTorch AI framework for inference on embedded devices using traditional eager (“interpreted”) evaluation of AI models. In this paper, we provide a short overview of how to run ExecuTorch on a bare metal microcontroller. We then illustrate the features of 32-bit RISC-V [4] which make it attractive for use in edge AI applications, using the Open Hardware Foundation’s CORE-V CV32E40Pv2 microcontroller as deployed in a real world design by two of the co-authors and their colleagues at <redacted>. We have now ported IREE for the same platform. IREE is a Linux Foundation experimental project, which uses lazy (“compiled”) evaluation of AI models, with LLVM MLIR as an intermediate representation. We give a short overview of how to run IREE on a bare metal microcontroller, and then assess what aspects of 32-bit RISC-V make it attractive for IREE. We conclude by comparing the feasibility of using IREE instead of ExecuTorch and an assessment on the performance of both when carrying out AI inference.

Jeremy Bennett is Chief Executive of Embecosm, an international open source consultancy specializing in compiler tool chains and AI tooling. He is a former academic and author of the standard text book "Introduction to Compiling Techniques: A first course using ANSI C, Lex and YACC" (McGraw-Hill 1990, 1995, 2003). Dr Bennett holds an MA and PhD from Cambridge University. He is aFellow of the British Computer Society, Fellow of the Royal Society of Arts, Member of the IET and a Chartered Engineer.