HeteroGen: transpiling C to heterogeneous HLS code with automated test generation and program repair

HeteroGen: transpiling C to heterogeneous HLS code with automated test generation and program repair
复制标题

DOI:
10.1145/3503222.3507748
复制
发表时间:
2022-02
期刊:
Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems
影响因子:
--
通讯作者:
Qian Zhang;Jiyuan Wang;G. Xu;Miryung Kim
Qian Zhang;Jiyuan Wang;G. Xu;Miryung Kim
中科院分区:
其他
文献类型:
--
作者:
Qian Zhang;Jiyuan Wang;G. Xu;Miryung Kim

文献摘要

被引文献

相似文献

尽管在硬件中融入了异构性和专门化的趋势,但异质应用程序的开发仅限于少数具有深厚硬件专业知识的工程师。我们提出了一种以C/C++代码为输入,自动生成具有测试行为保持和更好性能的HLS版本的方法。异源成功的关键是将基于搜索的程序修复的思想适应于异质计算领域,同时解决两个技术挑战。首先,HLS编译和模拟的周转时间比通常的C/C++编译和执行时间要长得多;因此,异源应用了基于公共FIX模式及其依赖关系的面向模式的程序编辑。其次,行为和性能检查需要测试,但测试用例通常不可用。因此,异源自动生成适合于检查C到HLS-C转换错误的测试输入,同时为原始C代码提供高分支覆盖率。对异源的评估表明,它可以全自动地为十个真实世界中的九个异类应用程序生成与HLS兼容的版本,应用多达438行编辑来生成比原始版本快1.63倍的HLS版本。
Despite the trend of incorporating heterogeneity and specialization in hardware, the development of heterogeneous applications is limited to a handful of engineers with deep hardware expertise. We propose HeteroGen that takes C/C++ code as input and automatically generates an HLS version with test behavior preservation and better performance. Key to the success of HeteroGen is adapting the idea of search-based program repair to the heterogeneous computing domain, while addressing two technical challenges. First, the turn-around time of HLS compilation and simulation is much longer than the usual C/C++ compilation and execution time; therefore, HeteroGen applies pattern-oriented program edits guided by common fix patterns and their dependences. Second, behavior and performance checking requires testing, but test cases are often unavailable. Thus, HeteroGen auto-generates test inputs suitable for checking C to HLS-C conversion errors, while providing high branch coverage for the original C code. An evaluation of HeteroGen shows that it produces an HLS-compatible version for nine out of ten real-world heterogeneous applications fully automatically, applying up to 438 lines of edits to produce an HLS version 1.63x faster than the original version.