HLSmith: An Expert-Guided Agentic Framework for C/C++-to-HLS Translation
cs.AR, cs.AI
Submitted: 2026-08-07
Updated: 2026-09-22
License: http://creativecommons.org/licenses/by-nc-sa/4.0/
The gist: 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
Terminology
Abstract
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.
Sources
- Agent Factories for High Level Synthesis: How Far Can General-Purpose Coding Agents Go in Hardware Optimization?
- Best-Effort FPGA Programming: A Few Steps Can Go a Long Way
- QLoRA: Efficient Finetuning of Quantized LLMs
- CUDAHercules: Benchmarking Hardware-Aware Expert-level CUDA Optimization for LLMs
- LAAFD: LLM-based Agents for Accelerated FPGA Design
- LIFT: LLM-Based Pragma Insertion for HLS via GNN Supervised Fine-Tuning
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
- Gemma 4 Technical Report
- HLSPilot: LLM-based High-Level Synthesis
- DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence
- ScaleHLS: A New Scalable High-Level Synthesis Framework on Multi-Level Intermediate Representation
- HLS-Seek: QoR-Aware Code Generation for High-Level Synthesis via Proxy Comparative Reward Reinforcement Learning
- AgRefactor: Self-Evolving Agentic Workflow for HLS Compatibility and Performance
Related papers
- WitCert: Sound Runtime Risk Observability and Gating for KV-Cache Quantization
- Golden Ruler: A Numeric Format Catalog with Bit-Exact Conformance Vectors for FP8, BF16, MXFP4, and Microscaling Formats
- RFChipAgent: Multi-Agentic AI Flow for Analog/RF Chip Design
- PoisonCap: Efficient Hierarchical Temporal Safety for CHERI
- Provisioning to Runtime Optimization of a 100 MW-Scale AI Cluster
- Bit-Accurate Modeling of GPU Matrix Multiply-Accumulate Units: Demystifying Numerical Discrepancy and Accuracy