Skip to main content
QUICK REVIEW

[Paper Review] Open-source FPGA-ML codesign for the MLPerf Tiny Benchmark

Hendrik Borras, Giuseppe Di Guglielmo|arXiv (Cornell University)|Jun 23, 2022
Anomaly Detection Techniques and ApplicationsComputer Science5 citations
TL;DR

This paper presents an open-source, end-to-end FPGA-ML codesign workflow using hls4ml and FINN to optimize quantized neural networks for the MLPerf Tiny Inference Benchmark. The approach achieves sub-20 μs inference latency and as low as 30 μJ per inference on Pynq-Z2 and Arty A7-100T platforms, demonstrating high efficiency and configurability through quantization-aware training, hyperparameter optimization, and hardware-aware model compression with QONNX as a common interchange format.

ABSTRACT

We present our development experience and recent results for the MLPerf Tiny Inference Benchmark on field-programmable gate array (FPGA) platforms. We use the open-source hls4ml and FINN workflows, which aim to democratize AI-hardware codesign of optimized neural networks on FPGAs. We present the design and implementation process for the keyword spotting, anomaly detection, and image classification benchmark tasks. The resulting hardware implementations are quantized, configurable, spatial dataflow architectures tailored for speed and efficiency and introduce new generic optimizations and common workflows developed as a part of this work. The full workflow is presented from quantization-aware training to FPGA implementation. The solutions are deployed on system-on-chip (Pynq-Z2) and pure FPGA (Arty A7-100T) platforms. The resulting submissions achieve latencies as low as 20 $μ$s and energy consumption as low as 30 $μ$J per inference. We demonstrate how emerging ML benchmarks on heterogeneous hardware platforms can catalyze collaboration and the development of new techniques and more accessible tools.

Motivation & Objective

  • To demonstrate efficient, low-latency, and energy-efficient FPGA-based inference for tiny ML workloads using open-source tools.
  • To enable democratization of AI-hardware codesign by providing a unified, open workflow for quantized neural network deployment on FPGAs.
  • To optimize model performance, latency, and resource usage across keyword spotting, anomaly detection, and image classification benchmarks.
  • To develop and integrate novel optimizations such as layer fusion, FIFO buffer tuning, and a common QONNX format for flexible quantized neural networks.
  • To establish a reproducible, end-to-end pipeline from quantization-aware training to FPGA deployment on both SoC and pure FPGA platforms.

Proposed method

  • Employed quantization-aware training (QAT) in QKeras and Brevitas to enable low-precision (1-12 bit) fixed-point inference.
  • Used hyperparameter optimization via Determined AI and KerasTuner to explore model architectures balancing accuracy, latency, and resource usage.
  • Applied hardware-aware optimizations including layer fusion and FIFO buffer tuning to improve throughput and reduce latency.
  • Synthesized models using hls4ml and FINN with Python APIs for validation, inspection, and deployment on Pynq-Z2 and Arty A7-100T FPGAs.
  • Standardized the workflow using QONNX as a common interchange format for representing quantized neural networks across tools.
  • Implemented a unified benchmarking pipeline for measuring latency and energy consumption using Joulescope JS110 and custom power monitoring setup.

Experimental results

Research questions

  • RQ1How can open-source FPGA-ML codesign workflows achieve ultra-low latency and energy consumption for tiny ML inference?
  • RQ2To what extent can quantization-aware training and hardware-aware model compression improve performance on resource-constrained FPGAs?
  • RQ3Can a unified, open-source workflow using QONNX enable interoperability and reproducibility across hls4ml and FINN toolchains?
  • RQ4What are the optimal trade-offs between model precision, latency, and energy efficiency in FPGA-accelerated tiny ML?
  • RQ5How does the integration of hyperparameter optimization and design space exploration enhance the efficiency of FPGA-based ML deployment?

Key findings

  • The FPGA implementations achieved latencies as low as 20 μs across all three MLPerf Tiny benchmark tasks, demonstrating high throughput.
  • Energy consumption was reduced to as low as 30 μJ per inference, highlighting exceptional energy efficiency.
  • The solutions maintained accuracy or AUC comparable to the reference models, confirming minimal performance degradation despite extreme quantization.
  • The Arty A7-100T FPGA-only platform was used for the first time in an MLPerf Tiny submission, expanding deployment flexibility.
  • The integration of layer fusion and FIFO buffer optimization significantly improved hardware utilization and reduced latency.
  • The open-source workflow, including QONNX, enabled full reproducibility and facilitated collaboration across industry and academia.

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.