论文标题
可预测的加速器设计,具有时间敏感的仿射类型
Predictable Accelerator Design with Time-Sensitive Affine Types
论文作者
论文摘要
现场编程的门阵列(FPGA)为使用硬件加速器共同设计应用程序提供了机会,但它们仍然很难编程。高级合成(HLS)工具有望通过将C或C ++编译为加速器设计来提高抽象水平。但是,重新利用旧版软件语言需要复杂的启发式方法将命令式代码映射到硬件结构上。我们发现,HLS中的黑盒启发式方法可能是不可预测的:程序中应改善性能的参数可以反直觉产生较慢和较大的设计。本文提出了一种将HLS限制在可以预见到硬件加速器的程序中的类型系统。关键想法是用时间敏感的仿射类型系统对消耗性硬件资源进行建模,该系统可防止同时使用相同的硬件结构。我们在Dahlia中实现了类型系统,该语言将其编译为HLS C ++,并表明它可以在接受帕累托(Pareto)最佳设计的同时减小HLS参数空间的大小。
Field-programmable gate arrays (FPGAs) provide an opportunity to co-design applications with hardware accelerators, yet they remain difficult to program. High-level synthesis (HLS) tools promise to raise the level of abstraction by compiling C or C++ to accelerator designs. Repurposing legacy software languages, however, requires complex heuristics to map imperative code onto hardware structures. We find that the black-box heuristics in HLS can be unpredictable: changing parameters in the program that should improve performance can counterintuitively yield slower and larger designs. This paper proposes a type system that restricts HLS to programs that can predictably compile to hardware accelerators. The key idea is to model consumable hardware resources with a time-sensitive affine type system that prevents simultaneous uses of the same hardware structure. We implement the type system in Dahlia, a language that compiles to HLS C++, and show that it can reduce the size of HLS parameter spaces while accepting Pareto-optimal designs.