论文标题
编译器驱动的可重构硬件加速器的模拟
Compiler-Driven Simulation of Reconfigurable Hardware Accelerators
论文作者
论文摘要
随着定制的加速器设计变得越来越受欢迎,可以跟上对高性能计算的需求,因此对现代模拟器设计的挑战构成了挑战,以适应如此大量的加速器。现有的模拟器倾向于两个极端:低级和一般方法,例如RTL模拟,可以对任何硬件进行建模,但需要大量的努力和较长的执行时间;以及更高级别的应用程序模型,这些模型可以更快,更易于使用,但需要一次性的工程工作。 这项工作提出了一个由编译器驱动的仿真工作流,该工作流可以建模可配置的硬件加速器。关键思想是通过开发可以灵活地表示多种硬件结构的中间语言来将结构表示与模拟分开。我们设计了MLIR的事件队列(Equue)方言,MLIR可以通过明确的数据移动和基于分布式事件的控制对任意硬件加速器进行建模;我们还实施了通用仿真引擎,以模拟与代表不同抽象级别的混合MLIR方言对等式的模型。我们演示了两个均值实施加速器的案例研究:现代FPGA中的卷积和SIMD处理器的收缩期阵列。在前者中,我们显示的等值模拟与最先进的模拟器一样准确,同时通过编译器通过提供更高的可扩展性和较低的迭代成本。在后者中,我们证明了模拟流可以使用可视化的模拟输出有效地指导设计人员有效地改进其设计。
As customized accelerator design has become increasingly popular to keep up with the demand for high performance computing, it poses challenges for modern simulator design to adapt to such a large variety of accelerators. Existing simulators tend to two extremes: low-level and general approaches, such as RTL simulation, that can model any hardware but require substantial effort and long execution times; and higher-level application-specific models that can be much faster and easier to use but require one-off engineering effort. This work proposes a compiler-driven simulation workflow that can model configurable hardware accelerator. The key idea is to separate structure representation from simulation by developing an intermediate language that can flexibly represent a wide variety of hardware constructs. We design the Event Queue (EQueue) dialect of MLIR, a dialect that can model arbitrary hardware accelerators with explicit data movement and distributed event-based control; we also implement a generic simulation engine to model EQueue programs with hybrid MLIR dialects representing different abstraction levels. We demonstrate two case studies of EQueue-implemented accelerators: the systolic array of convolution and SIMD processors in a modern FPGA. In the former we show EQueue simulation is as accurate as a state-of-the-art simulator, while offering higher extensibility and lower iteration cost via compiler passes. In the latter we demonstrate our simulation flow can guide designer efficiently improve their design using visualizable simulation outputs.