[Paper Review] High performance ultra-low-precision convolutions on mobile devices
This paper presents an open-source, highly optimized implementation of ultra-low-precision (sub-4-bit) convolution kernels for mobile ARMv7 CPUs, leveraging bitwise operations (XOR and POPCNT) to accelerate binary inner products. It achieves 4x–20x speedups over state-of-the-art float32 and int8 baselines on low-end devices like Cortex-A53 and Cortex-A7, demonstrating practical feasibility for real-time mobile vision workloads.
Many applications of mobile deep learning, especially real-time computer vision workloads, are constrained by computation power. This is particularly true for workloads running on older consumer phones, where a typical device might be powered by a single- or dual-core ARMv7 CPU. We provide an open-source implementation and a comprehensive analysis of (to our knowledge) the state of the art ultra-low-precision (<4 bit precision) implementation of the core primitives required for modern deep learning workloads on ARMv7 devices, and demonstrate speedups of 4x-20x over our additional state-of-the-art float32 and int8 baselines.
Motivation & Objective
- Address the under-explored computational and implementation challenges of ultra-low-precision deep learning on mobile CPUs.
- Enable high-performance inference for real-time computer vision on low-end mobile devices with limited computational resources.
- Provide a fair and comprehensive performance evaluation of ultra-low-precision models across diverse hardware, model architectures, and baseline implementations.
- Develop and open-source a high-efficiency runtime for ultra-low-precision neural networks targeting ARMv7 and AVX2 architectures.
- Demonstrate that ultra-low-precision models can achieve substantial performance gains when paired with highly optimized kernels and appropriate training techniques.
Proposed method
- Implement a binary inner product microkernel using ARMv7's XOR and POPCNT instructions to compute low-precision vector dot products efficiently.
- Use a packed bit-layout representation where each bit-depth is stored as a separate binary vector, enabling efficient SIMD processing.
- Apply standard optimization techniques such as register blocking and L1 cache blocking to maximize data locality and reduce memory bandwidth pressure.
- Integrate the microkernel into a BLIS-style software stack, abstracting low-level details and enabling reuse across different architectures.
- Optimize the kernel for both 1×1 and 3×3 convolutions using Winograd-like transforms with precomputed filter weights and optional FP16 intermediate storage to reduce memory bandwidth.
- Leverage advanced training techniques like HWGQ quantization and bit-decay retraining to maintain model accuracy after aggressive quantization to 1–3 bits.
Experimental results
Research questions
- RQ1Can ultra-low-precision (sub-4-bit) convolutions achieve significant performance gains on low-end ARMv7 mobile CPUs compared to float32 and int8 baselines?
- RQ2How do hardware microarchitectures (e.g., Cortex-A53 vs. Cortex-A7) influence the performance advantage of ultra-low-precision kernels?
- RQ3What implementation techniques are most effective in achieving near-peak theoretical performance for binary inner products on ARMv7?
- RQ4To what extent can aggressive quantization (e.g., 1–2 bits for weights and activations) be made practical without sacrificing model accuracy?
- RQ5How do different baseline implementations (float32, int8) affect the perceived benefit of ultra-low-precision inference on mobile devices?
Key findings
- The proposed ultra-low-precision convolution kernel achieves up to 20x speedup over float32 baselines and 4x speedup over int8 baselines on ARMv7 devices.
- On a 1.4GHz Cortex-A53, the implementation reaches approximately 75% of peak theoretical performance in microbenchmarks.
- For 3×3 and 1×1 convolutions, performance improvements of 9.5x (on Cortex-A53) and 11x (on Cortex-A7) were observed for certain layer configurations.
- The use of precomputed Winograd-transformed filters and optional FP16 intermediate storage improved performance by up to 2.5x over standard GEMMLOWP baselines.
- The implementation outperforms prior open-source ARMv7 implementations by more than an order of magnitude in some cases, with a geometric mean speedup of 3.7x.
- With advanced training techniques like HWGQ quantization and bit-decay retraining, 2-bit activations and 1-bit weights can maintain high accuracy, making ultra-low-precision models viable for real-world deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.