paperbot · PL 论文追踪

全部论文 待读 收藏

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

HeteroGen:借助自动化测试生成与程序修复将 C 转译为异构 HLS 代码
ASPLOS Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems2022匹配度 2/10 · 该论文关注C到HLS代码的转写、自动测试生成与程序修复,属于软件工程/硬件综合方向;与用户核心关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析均无明显交叉,也未涉及LLM作为工具或目标。引用 22 inbox
Qian Zhang, Jiyuan Wang, Guoqing Harry Xu, Miryung Kim
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:将 C/C++ 自动转写为保持测试行为且性能更优的 HLS 代码,结合定向修复模式与自动测试生成。

异构与专用硬件的兴起使得异构应用开发仍局限于少数具备深厚硬件经验的工程师。HeteroGen 以 C/C++ 代码为输入,自动生成行为保持且性能更优的 HLS 版本。其核心是把基于搜索的程序修复思想迁移到异构计算领域,并应对两个挑战:一是 HLS 编译与仿真周期远长于常规 C/C++ 编译执行,因此采用由常见修复模式及其依赖关系引导的模式化程序编辑;二是行为与性能检查依赖测试而测试用例常不可得,因此自动生成适合检测 C 到 HLS-C 转换错误的测试输入,同时为原 C 代码提供高分支覆盖。在十个真实异构应用上的评估表明,HeteroGen 能对其中九个全自动地生成 HLS 兼容版本,最多施加 438 行编辑,所得 HLS 版本比原版本快 1.63 倍。

问题
异构应用开发门槛高,工程师需要手工将 C/C++ 代码移植为可综合的 HLS 代码并保证行为一致、性能提升,而 HLS 编译仿真开销大、可用测试用例往往缺失。
方法
将基于搜索的程序修复适配到异构计算:以常见修复模式及其依赖引导模式化程序编辑以缓解 HLS 长编译周期,并自动生成面向 C 到 HLS-C 转换错误、对原 C 代码高分支覆盖的测试输入。
评估
在十个真实异构应用上与手工/基线流程对比,衡量自动生成成功率、所需编辑行数以及生成 HLS 版本相对原 C 版本的性能加速。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{ZhangWXK22,
  title = {HeteroGen: transpiling C to heterogeneous HLS code with automated test generation and program repair},
  author = {Qian Zhang and Jiyuan Wang and Guoqing Harry Xu and Miryung Kim},
  booktitle = {ASPLOS},
  year = {2022},
  doi = {10.1145/3503222.3507748}
}