自动化代码变换与Pragma插入的统一框架
A Unified Framework for Automated Code Transformation and Pragma Insertion
AI总结:
提出统一框架,利用HLS编译器和非线性规划同时优化代码变换、pragma插入和块大小选择,以提升计算密集型内核的并行化和质量结果。
摘要:
高层次综合、源到源编译器以及各种用于pragma插入的设计空间探索(DSE)技术显著提升了生成设计的质量结果(QoR)。这些工具带来了减少开发时间和增强性能等优势。然而,要获得高质量结果,通常需要额外的手动代码变换和分块选择,这些操作通常作为单独或预处理步骤执行。尽管DSE技术能够预先进行代码变换,但搜索空间的庞大性往往限制了对所有可能代码变换的探索,使得确定哪些变换是必要的变得具有挑战性。此外,确保正确性仍然具有挑战性,特别是对于复杂的变换和优化。为了应对这一障碍,我们首先提出了一个利用HLS编译器的综合框架。我们的系统通过一个统一的优化问题,简化了代码变换、pragma插入以及用于片上数据缓存的块大小选择,旨在增强并行化,特别适用于计算密集型内核。然后,采用一种新颖的非线性规划(NLP)方法,我们同时确定变换、pragma和块大小,重点关注基于规则循环的内核。我们的评估表明,我们的框架能够熟练地识别适当的变换,包括无需变换的场景,并插入pragma以获得良好的质量结果。
英文摘要:
High-level synthesis, source-to-source compilers, and various Design Space Exploration techniques for pragma insertion have significantly improved the Quality of Results of generated designs. These tools offer benefits such as reduced development time and enhanced performance. However, achieving high-quality results often requires additional manual code transformations and tiling selections, which are typically performed separately or as pre-processing steps. Although DSE techniques enable code transformation upfront, the vastness of the search space often limits the exploration of all possible code transformations, making it challenging to determine which transformations are necessary. Additionally, ensuring correctness remains challenging, especially for complex transformations and optimizations. To tackle this obstacle, we first propose a comprehensive framework leveraging HLS compilers. Our system streamlines code transformation, pragma insertion, and tiles size selection for on-chip data caching through a unified optimization problem, aiming to enhance parallelization, particularly beneficial for computation-bound kernels. Them employing a novel Non-Linear Programming (NLP) approach, we simultaneously ascertain transformations, pragmas, and tile sizes, focusing on regular loop-based kernels. Our evaluation demonstrates that our framework adeptly identifies the appropriate transformations, including scenarios where no transformation is necessary, and inserts pragmas to achieve a favorable Quality of Results.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。