arXiv:2608.06791cs.ARcs.AI2026-08

HLSmith让AI自动把C++代码转成高效FPGA加速器,准确率100%。

HLSmith: An Expert-Guided Agentic Framework for C/C++-to-HLS Translation

论文配图:HLSmith: An Expert-Guided Agentic Framework for C/C++-to-HLS Translation
图 1 · 摘自论文原文
  • 用专家经验库指导AI分步优化,像真人工程师一样分析瓶颈并迭代改进
  • 在PolyBench测试中比现有方法快4.24倍,且所有设计都正确无误
  • 适合想快速开发高性能FPGA加速器的工程师和研究人员

专用FPGA加速器在多个应用领域可带来显著性能与能效提升,但开发成本高昂,通常需数月专业投入。即使使用高层次综合(HLS),设计高性能加速器仍需大量硬件知识。尽管大语言模型(LLMs)具备强大软件生成能力,但缺乏硬件直觉与流程知识,难以可靠地将基础C/C++程序转化为高性能HLS设计:它们难以识别有效架构、遵循专家优化流程,也无法一致应用硬件变换。我们提出HLSmith,一种专家引导的框架,用于将C/C++程序转化为优化的HLS加速器。HLSmith包含三部分:编码了受保护变换规则及其适用条件与禁忌情况的HLS优化知识库;模拟专家开发实践的分阶段反馈驱动编排流程,引导代理完成合成、瓶颈分析与优化;以及将商业前沿模型优化轨迹转化为训练数据,用于微调开源权重大模型的工具化模型适配管道。我们在PolyBench上对HLSmith进行评估,对比领先的先前代理编排框架ChatHLS。HLSmith在几何平均速度上达到4.24倍于ChatHLS的提升,且所有基准测试均生成功能正确的设计(软件与RTL仿真通过),而ChatHLS仅57%的设计有效。其进一步实现最高252倍(商业模型)和138倍(开源模型)的速度提升。

原文摘要 · Abstract (English)

Application-specific FPGA accelerators offer substantial performance and energy-efficiency gains across many application domains, but developing them is costly, often requiring months of specialized effort. Even with high-level synthesis (HLS), designers still need extensive hardware expertise to build high-performance accelerators. Although large language models (LLMs) have demonstrated strong software-generation capabilities, even frontier models lack the hardware intuition and procedural knowledge needed to reliably translate baseline C/C++ programs into high-performance HLS designs: they struggle to identify effective architectures, follow the optimization processes used by HLS experts, and apply hardware transformations consistently across diverse kernels. We present HLSmith, an expert-guided framework for translating C/C++ programs into optimized HLS accelerators. HLSmith combines three components: an HLS optimization expertise library that encodes guarded transformation recipes, their applicability and prerequisite conditions, and unsafe cases to avoid; a staged, feedback-driven orchestration flow modeled on expert HLS development practice that guides agents through synthesis, bottleneck analysis, and optimization; and a tool-grounded model-adaptation pipeline that converts optimization trajectories from commercial frontier models into training data for fine-tuning open-weight LLMs. We evaluate HLSmith on PolyBench against ChatHLS, a leading prior agent-orchestration framework for HLS accelerator development. HLSmith achieves a geometric mean speedup of 4.24x over ChatHLS while producing functionally correct designs, in both software and RTL simulation, for every benchmark, compared with ChatHLS's 57% valid-design rate. It further reaches speedups of up to 252x and 138x with commercial frontier models and open-weight models, respectively.

FPGAAI设计代码转换自动化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。