arXiv:2504.12268cs.ARcs.AI2025-04被引 15

首个面向大模型生成硬件代码的评测框架,解决芯片设计自动化难题。

HLS-Eval: A Benchmark and Framework for Evaluating LLMs on High-Level Synthesis Design Tasks

  • 构建自然语言转HLS代码与代码优化双任务评测集
  • 覆盖94个设计案例,支持编译、仿真、合成全流程验证
  • 开源框架可并行评估本地/云端大模型,适配硬件研发人员

大语言模型在半导体设计领域的应用日益广泛,但现有评测多集中于Verilog等低层描述语言。随着高阶综合(HLS)成为领域加速器开发主流,亟需针对HLS任务的完整评测体系。为此,本文提出HLS-Eval,首个面向大模型驱动的HLS设计评测基准与框架。该框架涵盖两类核心任务:(1) 从自然语言描述生成HLS代码;(2) 针对性能与硬件效率进行特定代码修改。基准包含94个独立设计,源自标准HLS测试集及新来源,通过半自动化流程生成配套自然语言说明与C仿真测试用例,确保任务可被大模型直接处理。HLS-Eval还提供模块化Python框架,支持本地与云端大模型的并行评估,集成Vitis HLS工具链,兼容多种交互模式,实现快速原型开发。我们基于Vitis HLS对开源大模型进行了基线评估,采用解析性、可编译性、可运行性与可综合性的四项指标,量化反映迭代设计过程,并报告pass@k结果,为社区提供可复用的评测基础设施。所有数据、代码与结果已开源至https://github.com/stefanpie/hls-eval。

原文摘要 · Abstract (English)

The rapid scaling of large language model (LLM) training and inference has driven their adoption in semiconductor design across academia and industry. While most prior work evaluates LLMs on hardware description language (HDL) tasks, particularly Verilog, designers are increasingly using high-level synthesis (HLS) to build domain-specific accelerators and complex hardware systems. However, benchmarks and tooling to comprehensively evaluate LLMs for HLS design tasks remain scarce. To address this, we introduce HLS-Eval, the first complete benchmark and evaluation framework for LLM-driven HLS design. HLS-Eval targets two core tasks: (1) generating HLS code from natural language descriptions, and (2) performing HLS-specific code edits to optimize performance and hardware efficiency. The benchmark includes 94 unique designs drawn from standard HLS benchmarks and novel sources. Each case is prepared via a semi-automated flow that produces a natural language description and a paired testbench for C-simulation and synthesis validation, ensuring each task is "LLM-ready." Beyond the benchmark, HLS-Eval offers a modular Python framework for automated, parallel evaluation of both local and hosted LLMs. It includes a parallel evaluation engine, direct HLS tool integration, and abstractions for to support different LLM interaction paradigms, enabling rapid prototyping of new benchmarks, tasks, and LLM methods. We demonstrate HLS-Eval through baseline evaluations of open-source LLMs on Vitis HLS, measuring outputs across four key metrics - parseability, compilability, runnability, and synthesizability - reflecting the iterative HLS design cycle. We also report pass@k metrics, establishing clear baselines and reusable infrastructure for the broader LLM-for-hardware community. All benchmarks, framework code, and results are open-sourced at https://github.com/stefanpie/hls-eval.

大模型硬件生成HLS评测框架

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