AgRefactor:面向HLS兼容性与性能的自进化智能体工作流
AgRefactor: Self-Evolving Agentic Workflow for HLS Compatibility and Performance
AI总结:
提出基于LLM的多智能体工作流AgRefactor,通过自进化记忆系统和自动化重构工具,将软件代码重构为HLS兼容程序,在11个基准测试中9个超越现有方法,并实现6.51x几何平均加速。
摘要:
高层次综合(HLS)提供了从概念到硅的快速路径,但由于语言支持受限以及软硬件编程实践之间的差距,将现实世界的软件转换为可综合的HLS代码仍然具有挑战性。现有的自动化和基于LLM的重构方法部分解决了这个问题,但它们往往缺乏灵活性、难以扩展,并且计算成本高昂。我们提出了AgRefactor,一种基于LLM的多智能体工作流,用于将软件重构为HLS兼容程序。AgRefactor包含一个自进化记忆系统,该系统跨任务积累和检索事实与策略知识,提高了对未见程序的鲁棒性和效率。为了降低成本并增强可扩展性,它集成了自动化重构工具,使智能体能够平衡LLM驱动的重写与高效的基于工具的转换。在11个具有挑战性的现实世界基准测试中的9个上(这些基准测试比先前工作中研究的最复杂案例长5-10倍),AgRefactor优于或匹配了最先进的自动化重构工具以及基于相同框架骨干构建的强LLM基线。进一步的智能体性能优化在比最先进的pragma调优工具快6.51倍几何平均加速,并且在额外资源少于20%的情况下,比优化的开源设计快1.20倍。AgRefactor是完全自动化的并且是开源的。
英文摘要:
High-Level Synthesis (HLS) provides a fast path from concepts to silicon, but converting real-world software into synthesizable HLS code remains challenging due to restrictive language support and the gap between software and hardware programming practices. Existing automated and LLM-based refactoring approaches partially address this problem, yet they often lack flexibility, struggle to scale, and incur high computational costs. We introduce AgRefactor, an LLM-based multi-agent workflow for refactoring software into HLS-compatible programs. AgRefactor incorporates a self-evolving memory system that accumulates and retrieves factual and strategic knowledge across tasks, improving robustness and efficiency on unseen programs. To reduce cost and enhance scalability, it integrates automated refactoring tools, enabling agents to balance LLM-driven rewrites with efficient tool-based transformations. On 9 out of 11 challenging real-world benchmarks, which are 5-10x longer than the most complex cases studied in prior work, AgRefactor outperforms or matches the state-of-the-art automated refactoring tool and a strong LLM-based baseline built on the same framework backbone. Further agentic performance optimization yields a 6.51x geometric mean speedup over the SoTA pragma tuning tool and a 1.20x speedup over optimized open-source designs with less than 20% extra resources. AgRefactor is fully-automated and open-sourced.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。