Skip to main content
QUICK 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 Applications被引用 5
一句话总结

本论文提出了一种基于 hls4ml 和 FINN 的开源、端到端 FPGA-ML 代码协同设计工作流,用于优化 MLPerf Tiny 推理基准的量化神经网络。该方法在 Pynq-Z2 和 Arty A7-100T 平台上实现了低于 20 μs 的推理延迟和每推理最低 30 μJ 的能耗,通过量化感知训练、超参数优化以及基于 QONNX 共同交换格式的硬件感知模型压缩,展示了极高的效率与可配置性。

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.

研究动机与目标

  • 展示使用开源工具在 FPGA 上实现高效、低延迟、低能耗的微型机器学习工作负载推理。
  • 通过提供统一、开源的工作流,实现量化神经网络在 FPGA 上的部署,推动 AI-硬件协同设计的普及化。
  • 优化关键词检测、异常检测和图像分类基准任务中的模型性能、延迟和资源使用。
  • 开发并集成新型优化技术,如层融合、FIFO 缓冲区调优,以及使用统一的 QONNX 格式实现灵活的量化神经网络。
  • 建立从量化感知训练到 SoC 和纯 FPGA 平台部署的可复现、端到端的完整流程。

提出的方法

  • 在 QKeras 和 Brevitas 中采用量化感知训练(QAT),以支持低精度(1-12 bit)定点推理。
  • 通过 Determined AI 和 KerasTuner 实现超参数优化,探索在准确率、延迟和资源使用之间取得平衡的模型架构。
  • 应用硬件感知优化,包括层融合和 FIFO 缓冲区调优,以提升吞吐量并降低延迟。
  • 使用 hls4ml 和 FINN 通过 Python API 对模型进行综合,以在 Pynq-Z2 和 Arty A7-100T FPGA 上实现验证、检查和部署。
  • 采用 QONNX 作为统一的交换格式,标准化工作流,实现跨工具的量化神经网络表示。
  • 实现统一的基准测试流程,利用 Joulescope JS110 和自定义电源监控系统测量延迟和能耗。

实验结果

研究问题

  • RQ1开源 FPGA-ML 代码协同设计工作流如何实现微型机器学习推理的超低延迟和超低能耗?
  • RQ2量化感知训练与硬件感知模型压缩在资源受限的 FPGA 上能将性能提升到何种程度?
  • RQ3基于 QONNX 的统一开源工作流是否能实现 hls4ml 和 FINN 工具链之间的互操作性与可复现性?
  • RQ4在 FPGA 加速的微型机器学习中,模型精度、延迟与能效之间的最优权衡是什么?
  • RQ5超参数优化与设计空间探索的集成如何提升 FPGA 上机器学习部署的效率?

主要发现

  • FPGA 实现的延迟在所有三个 MLPerf Tiny 基准任务中均低至 20 μs,展示了极高的吞吐能力。
  • 能耗降低至每推理最低 30 μJ,凸显了卓越的能效表现。
  • 解决方案在准确率或 AUC 方面与参考模型相当,证实了在极端量化条件下性能损失极小。
  • 首次在 MLPerf Tiny 提交中使用 Arty A7-100T FPGA 纯硬件平台,扩展了部署灵活性。
  • 层融合与 FIFO 缓冲区优化的集成显著提升了硬件利用率并降低了延迟。
  • 开源工作流(包括 QONNX)实现了完全可复现性,并促进了产业界与学术界之间的协作。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。