Abstract
We present PULP-NN, an optimized computing library for a parallel ultra-low-power tightly coupled cluster of RISC-V processors. The key innovation in PULP-NN is a set of kernels for Quantized Neural Network (QNN) inference, targeting byte and sub-byte data types, down to INT-1, tuned for the recent trend toward aggressive quantization in deep neural network inference. The proposed library exploits both the digital signal processing (DSP) extensions available in the PULP RISC-V processors and the cluster's parallelism, achieving up to 15.5 MACs/cycle on INT-8 and improving performance by up to 63x with respect to a sequential implementation on a single RISC-V core implementing the baseline RV32IMC ISA. Using PULP-NN, a CIFAR-10 network on an octa-core cluster runs in 30x and 19.6x less clock cycles than the current state-of-the-art ARM CMSIS-NN library, running on STM32L4 and STM32H7 MCUs, respectively. The proposed library, when running on GAP-8 processor, outperforms by 36.8x and by 7.45x the execution on energy efficient MCUs such as STM32L4 and high-end MCUs such as STM32H7 respectively, when operating at the maximum frequency. The energy efficiency on GAP-8 is 14.1x higher than STM32L4 and 39.5x higher than STM32H7, at the maximum efficiency operating point.
Introduction
The proliferation of Internet of Things (IoT) devices has created a demand for sophisticated data processing at the edge. Deep Learning (DL) models, while powerful, are resource-intensive. Quantized Neural Networks (QNNs) address this by using low-precision data (8-bit to 1-bit), but standard microcontrollers (MCUs) often lack the architectural support to execute these efficiently. This paper introduces PULP-NN, an open-source library designed for parallel ultra-low-power RISC-V clusters, bridging the gap between aggressive quantization research and actual hardware deployment.
Methodology
PULP-NN leverages the GAP-8 processor's 8-core RISC-V cluster and custom ISA extensions (Xpulp) to optimize QNN inference.
Exploiting Xpulp Extensions
The library utilizes custom RISC-V instructions such as hardware loops, post-increment loads, and SIMD (Single Instruction, Multiple Data) operations. A key technical approach is the use of the sdotp4 instruction, which performs four 8-bit multiplications and additions in a single cycle. This significantly reduces the instruction count and improves throughput for the matrix multiplication kernels that form the backbone of the library.
Optimized Dataflow and Sub-byte Support
Following the CMSIS-NN template, PULP-NN uses an im2col (image to column) transformation followed by matrix multiplication. To manage the limited 64KB L1 memory, a tiling strategy orchestrates data movement from L2. For sub-byte precisions (4, 2, and 1-bit), specialized unpacking kernels use bit-manipulation instructions like bextract and pack4 to prepare data for the 8-bit SIMD units.
Parallelization Strategy
The library exploits multicore parallelism by partitioning the output feature map across the cluster's eight cores. This spatial tiling ensures near-linear speedup by allowing each core to work on a distinct chunk of the output pixels, minimizing synchronization overhead and maximizing the utilization of the shared L1 Tightly Coupled Data Memory (TCDM).
Key Results
Evaluation on a CIFAR-10 network demonstrates significant performance gains. PULP-NN on the GAP-8 processor achieves up to 15.5 MACs/cycle for INT-8 operations. Compared to the ARM CMSIS-NN library, PULP-NN is 30x faster than an STM32L4 (Cortex-M4) and 19.6x faster than an STM32H7 (Cortex-M7).
Energy efficiency is a standout feature; at its maximum efficiency point, the GAP-8 system is 14.1x more energy-efficient than the STM32L4. The system achieved a peak throughput of 1.07 GMAC/s at 170 MHz, demonstrating that parallelism is the key to maintaining high performance at low power.
Conclusion
PULP-NN demonstrates that combining aggressive quantization with parallel, ISA-extended RISC-V architectures can deliver high-performance AI on ultra-low-power budgets. While software unpacking for sub-byte formats introduces some overhead, the overall gains in memory footprint and throughput make it a viable solution for complex edge AI tasks. Future work includes exploring native hardware support for sub-byte SIMD to further reduce unpacking latency.
Summary updated