Skip to main content
QUICK REVIEW

[论文解读] Best-Effort FPGA Programming: A Few Steps Can Go a Long Way

Jason Cong, Zhenman Fang|arXiv (Cornell University)|Jul 3, 2018
Embedded Systems Design TechniquesComputer Science参考文献 23被引用 16
一句话总结

本文提出了一套五步式尽力而为的HLS优化指南,使主流软件程序员能够在极少专业知识的情况下实现显著的FPGA加速器性能提升。通过应用显式数据缓存、定制化流水线、处理单元(PE)复制、双缓冲和寄存器文件重组织等技术,该方法在原始HLS综合基础上实现了42倍至29,030倍的性能提升,在MachSuite基准测试中,相较于单线程CPU实现,平均获得34.4倍的加速比。

ABSTRACT

FPGA-based heterogeneous architectures provide programmers with the ability to customize their hardware accelerators for flexible acceleration of many workloads. Nonetheless, such advantages come at the cost of sacrificing programmability. FPGA vendors and researchers attempt to improve the programmability through high-level synthesis (HLS) technologies that can directly generate hardware circuits from high-level language descriptions. However, reading through recent publications on FPGA designs using HLS, one often gets the impression that FPGA programming is still hard in that it leaves programmers to explore a very large design space with many possible combinations of HLS optimization strategies. In this paper we make two important observations and contributions. First, we demonstrate a rather surprising result: FPGA programming can be made easy by following a simple best-effort guideline of five refinement steps using HLS. We show that for a broad class of accelerator benchmarks from MachSuite, the proposed best-effort guideline improves the FPGA accelerator performance by 42-29,030x. Compared to the baseline CPU performance, the FPGA accelerator performance is improved from an average 292.5x slowdown to an average 34.4x speedup. Moreover, we show that the refinement steps in the best-effort guideline, consisting of explicit data caching, customized pipelining, processing element duplication, computation/communication overlapping and scratchpad reorganization, correspond well to the best practice guidelines for multicore CPU programming. Although our best-effort guideline may not always lead to the optimal solution, it substantially simplifies the FPGA programming effort, and will greatly support the wide adoption of FPGA-based acceleration by the software programming community.

研究动机与目标

  • 解决FPGA加速中可编程性低的问题,尽管其具备高性能和高能效的优势,但这一问题仍使主流软件开发人员望而却步。
  • 探究是否可通过简单且易访问的优化指南,在无需深入FPGA架构知识的情况下显著提升FPGA加速器性能。
  • 证明通过使用常见HLS优化技术的系统性、迭代式优化方法,可获得与专家调优设计相当的性能。
  • 通过将硬件优化映射到缓存和流水线等熟悉的软件概念,弥合软件编程实践与FPGA优化之间的鸿沟。

提出的方法

  • 使用商业HLS工具,对MachSuite基准测试套件中的C语言计算内核,应用五步迭代优化流程。
  • 引入显式数据缓存,以利用数据重用性,减少对片外内存访问的延迟。
  • 实现定制化流水线,通过重叠多个数据实例的操作来提升吞吐量。
  • 使用处理单元(PE)复制技术,提升并行度并隐藏计算密集型内核中的延迟。
  • 应用双缓冲(或流式处理)技术,实现计算与数据移动的重叠,提升内存带宽利用率。
  • 基于数据访问模式重新组织寄存器文件布局,以最小化冲突并提高带宽利用率。

实验结果

研究问题

  • RQ1是否可以通过一个简单、五步式的优化指南,在无需专家级FPGA知识的情况下显著提升FPGA加速器性能?
  • RQ2主流软件程序员在仅使用高层次综合(HLS)和基础优化技术的情况下,能在多大程度上实现高性能FPGA加速器?
  • RQ3HLS优化技术(如缓存、流水线、复制)如何以系统化方式共同促进性能提升?
  • RQ4所提出的优化步骤在语义和结构上是否与已知的软件优化模式具有类比性?
  • RQ5与原始HLS综合和基线CPU执行相比,该尽力而为方法可实现多大的性能提升?

主要发现

  • 该尽力而为优化指南在原始HLS综合基础上,使FPGA加速器性能提升42倍至29,030倍,MachSuite基准测试中平均提升29,030倍。
  • 与单线程CPU执行相比,优化后的FPGA加速器实现了平均34.4倍的加速比,将性能从292.5倍的慢速转变为34.4倍的加速。
  • 五步优化流程——显式数据缓存、定制化流水线、PE复制、双缓冲和寄存器文件重组织——每一步均对性能提升有可测量的贡献。
  • 这些优化技术与常见的软件编程实践(如循环级优化和内存访问模式)高度对应,使软件开发人员易于理解。
  • 尽管无法保证找到全局最优解,该方法在许多情况下已实现接近最优的性能,展现出强大的实用性和可及性。
  • 作者计划开源该优化指南和设计模板,以促进FPGA加速技术的更广泛应用和社区驱动的持续改进。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。