Publications

Efficient Integer-Only Implementation of Tanh and Sigmoid for Embedded AI on RISC-V

Abstract

We present a unified integer-only kernel for hyperbolic functions tanh(x) and sigmoid(x), designed for embedded RISC-V platforms without floating-point units. The kernel combines LUT anchoring, CORDIC microrotations, and linear correction in Q20 arithmetic, producing outputs directly in Q1.16 format suitable for ML inference. Exhaustive evaluation across the entire 17-bit input space demonstrates deterministic accuracy better than 1 ULP in Q1.16, with maximum absolute errors below . Compared to software-emulated floating-point implementations, our approach achieves significant speedup while reducing hardware complexity by unifying multiple activation functions in a single IP block. This makes the method highly relevant for efficient deployment of neural networks on resource-constrained RISC-V microcontrollers.

Date
2026
Authors
Kamil Kaczmarski, Pawel Gepner, Ewa Deelman, Pawel Poczekajlo, Leonid Moroz, Nataliia Gavkalova
Book
International Conference on Computational Science
Pages
573-587
Publisher
Springer Nature Switzerland