Automated C/C++ Program Repair for High-Level Synthesis via Large Language Models
Kangwei Xu, Grace Li Zhang, Xunzhao Yin, Cheng Zhuo, Ulf Schlichtmann,, Bing Li

TL;DR
This paper presents an LLM-based framework for automating C/C++ to HLS code conversion and repair, reducing manual effort and improving repair success rates through retrieval-augmented generation and optimization strategies.
Contribution
It introduces a novel LLM-driven repair framework with retrieval-augmented prompts and optimization techniques for high-level synthesis code automation.
Findings
Higher repair pass rates in 24 real-world applications
Effective mitigation of hallucinations in LLMs during repair
Enhanced HLS code quality with automated pragmas and bit-width optimization
Abstract
In High-Level Synthesis (HLS), converting a regular C/C++ program into its HLS-compatible counterpart (HLS-C) still requires tremendous manual effort. Various program scripts have been introduced to automate this process. But the resulting codes usually contain many issues that should be manually repaired by developers. Since Large Language Models (LLMs) have the ability to automate code generation, they can also be used for automated program repair in HLS. However, due to the limited training of LLMs considering hardware and software simultaneously, hallucinations may occur during program repair using LLMs, leading to compilation failures. Besides, using LLMs for iterative repair also incurs a high cost. To address these challenges, we propose an LLM-driven program repair framework that takes regular C/C++ code as input and automatically generates its corresponding HLS-C code for…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Distributed and Parallel Computing Systems · Scientific Computing and Data Management
