[论文解读] Automatic Creation of High-Bandwidth Memory Architectures from Domain-Specific Languages: The Case of Computational Fluid Dynamics
本文提出了一套自动化工具链,将计算流体动力学(CFD)中张量操作的领域特定语言(DSL)描述编译为优化的高带宽内存(HBM)配置FPGA加速器。基于MLIR的编译器与HLS流程结合,生成具有高效数据移动能力的定制硬件,在Xilinx Alveo U280上实现高达103 GFLOPS的性能,并相较专家手工优化的CPU实现提升25倍能效。
Numerical simulations can help solve complex problems. Most of these algorithms are massively parallel and thus good candidates for FPGA acceleration thanks to spatial parallelism. Modern FPGA devices can leverage high-bandwidth memory technologies, but when applications are memory-bound designers must craft advanced communication and memory architectures for efficient data movement and on-chip storage. This development process requires hardware design skills that are uncommon in domain-specific experts. In this paper, we propose an automated tool flow from a domain-specific language (DSL) for tensor expressions to generate massively-parallel accelerators on HBM-equipped FPGAs. Designers can use this flow to integrate and evaluate various compiler or hardware optimizations. We use computational fluid dynamics (CFD) as a paradigmatic example. Our flow starts from the high-level specification of tensor operations and combines an MLIR-based compiler with an in-house hardware generation flow to generate systems with parallel accelerators and a specialized memory architecture that moves data efficiently, aiming at fully exploiting the available CPU-FPGA bandwidth. We simulated applications with millions of elements, achieving up to 103 GFLOPS with one compute unit and custom precision when targeting a Xilinx Alveo U280. Our FPGA implementation is up to 25x more energy-efficient than expert-crafted Intel CPU implementations.
研究动机与目标
- 弥合领域专家(如CFD科学家)与底层FPGA硬件设计之间的生产力差距。
- 克服因低效数据移动与硬件专业知识有限,导致的HBM配置FPGA加速器在内存绑定场景下的性能瓶颈。
- 使非FPGA专家能够通过高级DSL探索并评估多种硬件与编译器优化方案。
- 自动化生成针对HBM优化的系统架构,包含并行加速器与高效的片上内存层次结构。
- 通过利用MLIR与商用HLS工具,在HPC工作负载(如CFD)中实现高性能与高能效。
提出的方法
- 使用领域特定语言(DSL)以平台无关的方式表达CFD中的张量操作,例如逆Helmholtz算子。
- 采用基于MLIR的编译器将DSL规格降低,同时保持语义并生成HLS就绪的C++代码。
- 集成自研硬件生成流程,利用商用HLS工具合成计算单元与内存架构。
- 应用关键优化技术,包括双缓冲、总线优化(并行)与数据流分区,以最大化HBM带宽利用率。
- 围绕计算单元设计定制内存架构,以最小化CPU-FPGA数据传输延迟并最大化数据吞吐量。
- 针对支持最高460 GB/s带宽的Xilinx Alveo U280 FPGA(配备HBM2)进行目标部署,并使用3D张量核进行评估。
实验结果
研究问题
- RQ1DSL到比特流的流程能否自动化生成针对内存绑定CFD核的HBM优化FPGA加速器?
- RQ2基于MLIR的编译与HLS自动化在多大程度上可提升非FPGA专家在HPC领域中的生产力与性能?
- RQ3硬件与编译器优化(如数据流分区与双缓冲)在FPGA上利用HBM带宽方面的有效性如何?
- RQ4与高度优化的CPU实现相比,可实现多大的性能与能效提升?
- RQ5数据格式(如32位定点与双精度)与多项式阶次对资源使用与性能有何影响?
主要发现
- 在Xilinx Alveo U280上,使用单个计算单元与自定义精度数据类型,优化后的逆Helmholtz核FPGA实现最高达到103 GFLOPS。
- FPGA加速器相较AMD EPYC 7282 CPU最高实现160.2倍加速,相较高度优化的Intel CPU代码实现2.7倍加速。
- 最节能的FPGA设计(32位定点,p=11,1个CU)相较对应Intel CPU实现,能效提升24.5倍(GFLOPS/W)。
- 完全优化的FPGA核相较AMD EPYC 7282 CPU实现36.4倍至160.2倍加速,展现出显著的性能增益。
- 基于MLIR的编译器相比先前的定制中间表示(IR),实现了更快的原型设计与组合,诊断能力、稳定性与模块化均有提升。
- 该框架使非FPGA专家无需底层硬件知识,即可探索多种优化策略,如数据流分区与内存缓冲。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。