高层次综合中的自动硬件编译指示插入:一种非线性规划方法
Automatic Hardware Pragma Insertion in High-Level Synthesis: A Non-Linear Programming Approach
AI总结:
本文提出一种基于非线性规划的框架,自动为规则循环程序插入HLS编译指示(流水线、单元复制、数据缓存),通过解析性能资源模型和下界证明,可在秒级到分钟级内高效探索数十亿规模的设计空间。
摘要:
高层次综合(High-Level Synthesis)通过将内核功能行为的高层描述与一组微架构优化作为输入相结合,实现了硬件加速器的快速原型设计。此类优化可以通过插入编译指示(pragma)来描述,例如流水线化和单元复制,甚至包括面向HLS的更高层次变换,如使用AMD/Xilinx Merlin编译器进行的自动数据缓存。即使在一个受限的集合内,选择最佳的编译指示组合仍然特别具有挑战性,典型的实践现状是使用设计空间探索(design-space exploration,DSE)来导航这一空间。但由于编译指示配置的性能分布高度不规则,典型的DSE方法要么极其耗时,要么在严重受限的搜索空间上运行。本工作提出了一个框架,用于在基于规则循环的程序中自动插入HLS编译指示,支持流水线化、单元复制和数据缓存。我们开发了一个解析的性能和资源模型,作为输入程序属性和所插入编译指示的函数,使用非线性约束和目标。我们证明了该模型提供了HLS后实际性能的下界。然后,我们通过将编译指示配置设为系统的未知量,将该模型编码为一个非线性规划(Non-Linear Program,NLP),并通过求解该NLP来最优地计算该配置。该方法也可以在DSE期间使用,以在可达到延迟的下界驱动下,快速剪枝具有(可能部分)编译指示配置的点。我们广泛评估了我们端到端、完全实现的系统,表明对于所评估的内核,它能够在几秒到几分钟内有效地处理数十亿个设计的空间。
英文摘要:
High-Level Synthesis enables the rapid prototyping of hardware accelerators, by combining a high-level description of the functional behavior of a kernel with a set of micro-architecture optimizations as inputs. Such optimizations can be described by inserting pragmas e.g. pipelining and replication of units, or even higher level transformations for HLS such as automatic data caching using the AMD/Xilinx Merlin compiler. Selecting the best combination of pragmas, even within a restricted set, remains particularly challenging and the typical state-of-practice uses design-space exploration to navigate this space. But due to the highly irregular performance distribution of pragma configurations, typical DSE approaches are either extremely time consuming, or operating on a severely restricted search space. This work proposes a framework to automatically insert HLS pragmas in regular loop-based programs, supporting pipelining, unit replication, and data caching. We develop an analytical performance and resource model as a function of the input program properties and pragmas inserted, using non-linear constraints and objectives. We prove this model provides a lower bound on the actual performance after HLS. We then encode this model as a Non-Linear Program, by making the pragma configuration unknowns of the system, which is computed optimally by solving this NLP. This approach can also be used during DSE, to quickly prune points with a (possibly partial) pragma configuration, driven by lower bounds on achievable latency. We extensively evaluate our end-to-end, fully implemented system, showing it can effectively manipulate spaces of billions of designs in seconds to minutes for the kernels evaluated.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。