Skip to main content
QUICK REVIEW

[Paper Review] Automating Generation of Low Precision Deep Learning Operators

Meghan Cowan, Thierry Moreau|arXiv (Cornell University)|Oct 25, 2018
Advanced Neural Network ApplicationsComputer Science18 references7 citations
TL;DR

This paper presents a workflow to automatically generate high-performance low-precision deep learning operators for CPUs using TVM's autotuning and code generation. It achieves up to 16x speedup over 16-bit integer baselines and 2.3x better performance than hand-optimized ARM kernels for 1-bit weight and 2-bit activation convolutions on Raspberry Pi 3B.

ABSTRACT

State of the art deep learning models have made steady progress in the fields of computer vision and natural language processing, at the expense of growing model sizes and computational complexity. Deploying these models on low power and mobile devices poses a challenge due to their limited compute capabilities and strict energy budgets. One solution that has generated significant research interest is deploying highly quantized models that operate on low precision inputs and weights less than eight bits, trading off accuracy for performance. These models have a significantly reduced memory footprint (up to 32x reduction) and can replace multiply-accumulates with bitwise operations during compute intensive convolution and fully connected layers. Most deep learning frameworks rely on highly engineered linear algebra libraries such as ATLAS or Intel's MKL to implement efficient deep learning operators. To date, none of the popular deep learning directly support low precision operators, partly due to a lack of optimized low precision libraries. In this paper we introduce a work flow to quickly generate high performance low precision deep learning operators for arbitrary precision that target multiple CPU architectures and include optimizations such as memory tiling and vectorization. We present an extensive case study on low power ARM Cortex-A53 CPU, and show how we can generate 1-bit, 2-bit convolutions with speedups up to 16x over an optimized 16-bit integer baseline and 2.3x better than handwritten implementations.

Motivation & Objective

  • Address the lack of optimized low-precision operators in deep learning frameworks for CPUs.
  • Enable high-performance inference on low-power devices by generating efficient bitserial operators for arbitrary low precision (1–4 bits).
  • Overcome performance bottlenecks in naive bitserial implementations that underperform even 8-bit integer operations.
  • Demonstrate that automated code generation with autotuning can surpass hand-optimized kernels on ARM and X86 architectures.
  • Enable deployment of highly quantized models (e.g., 1-bit weights, 2-bit activations) with minimal engineering effort and maximum portability.

Proposed method

  • Extend TVM to support quantized data types and bit-level operations such as bit-packing and bitserial matrix multiplication.
  • Use TVM’s autotuning infrastructure to search for optimal memory tiling and vectorization parameters across CPU architectures.
  • Implement a flexible operator library for quantization, bit-packing, and low-precision convolution with customizable schedules.
  • Leverage vectorized instructions (e.g., ARM NEON, X86 AVX2) and in-place convolution to reduce memory bandwidth and duplication.
  • Apply tensorized inner-loop scheduling to map low-precision operations efficiently onto underlying hardware instruction sets.
  • Use a generic CPU schedule for X86 and a custom schedule for ARM to maximize performance on target devices.

Experimental results

Research questions

  • RQ1Can automated code generation with autotuning produce low-precision deep learning operators that outperform hand-optimized implementations on low-power CPUs?
  • RQ2How do memory tiling and vectorization impact performance in bitserial convolution kernels for 1–4 bit precision?
  • RQ3What is the performance scaling behavior of low-precision convolutions across different bitwidth combinations (e.g., W1A1, W2A2, W4A4) on ARM and X86?
  • RQ4To what extent do architectural features like vectorized popcount and instruction-level parallelism affect the achievable speedup in low-precision inference?
  • RQ5Can a single code generation workflow effectively target multiple CPU architectures with minimal manual tuning?

Key findings

  • The proposed workflow achieved up to 16x speedup over a 16-bit integer baseline for 1-bit weight and 2-bit activation convolutions on ARM Cortex-A53.
  • On Raspberry Pi 3B, the single-threaded implementation outperformed the hand-optimized Caffe2 ultra-low-precision library by 2.3x, especially on 1x1 convolutions with stride 2.
  • The use of optimized tiling parameters via TVM’s autotuning led to a 1.6x performance improvement over the baseline when excluding poorly optimized layers.
  • On X86, the generic CPU schedule achieved average speedups of 5.38x (W1A1), 2.73x (W1A2), and 1.69x (W2A2) over a 32-bit floating-point baseline.
  • W2A2 achieved 1.3x better performance than W1A4 despite equal computational complexity, demonstrating the benefit of improved data reuse across bit planes.
  • End-to-end inference on ResNet18 using the generated 1-bit weight and 2-bit activation operators achieved a 3.3x speedup over full-precision inference on the Raspberry Pi.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.