跳到正文
arXiv cs.AI· Sparsh Gupta, Kamalavasan Kamalakkannan, Maxim Moraru, Galen Shipman, Patrick Diehl·· 4 小时前AI 评分40

从遗留 Fortran 到可移植 Kokkos:一个自主智能体 AI 工作流

From Legacy Fortran to Portable Kokkos: An Autonomous Agentic AI Workflow

AI 导读

论文提出一个由多个专门化 LLM 智能体协作的自主工作流,可将遗留 Fortran 内核翻译、验证、编译、运行、测试、调试并优化为可移植的 Kokkos C++ 代码。

正文 · 原文

View PDF HTML (experimental)

Abstract:Scientific applications continue to rely on legacy Fortran codebases originally developed for homogeneous, CPU-based systems. As High-Performance Computing (HPC) shifts toward heterogeneous GPU-accelerated architectures, many accelerators lack native Fortran bindings, creating an urgent need to modernize legacy codes for portability. Frameworks like Kokkos provide performance portability and a single-source C++ abstraction, but manual Fortran-to-Kokkos porting demands significant expertise and time. Large language models (LLMs) have shown promise in source-to-source code generation, yet their use in fully autonomous workflows for translating and optimizing parallel code remains largely unexplored, especially for performance portability across diverse hardware. This paper presents an agentic AI workflow where specialized LLM "agents" collaborate to translate, validate, compile, run, test, debug, and optimize Fortran kernels into portable Kokkos C++ programs. Results show the pipeline modernizes a range of benchmark kernels, producing performance-portable Kokkos codes across hardware partitions. Paid OpenAI models such as GPT-5 and o4-mini-high executed the workflow for only a few U.S. dollars, generating optimized codes that surpassed Fortran baselines, whereas open-source models like Llama4-Maverick often failed to yield functional codes. This work demonstrates the feasibility of agentic AI for Fortran-to-Kokkos transformation and offers a pathway for autonomously modernizing legacy scientific applications to run portably and efficiently on diverse supercomputers. It further highlights the potential of LLM-driven agentic systems to perform structured, domain-specific reasoning tasks in scientific and systems-oriented applications.
Comments: 12 pages, 6 figures, 7 tables
Subjects: Software Engineering (cs.SE); Artificial Intelligence (cs.AI); Distributed, Parallel, and Cluster Computing (cs.DC); Machine Learning (cs.LG)
Report number: LA-UR-25-28882
Cite as: arXiv:2509.12443 [cs.SE]
  (or arXiv:2509.12443v4 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.2509.12443

arXiv-issued DOI via DataCite

Submission history

From: Patrick Diehl [view email]
[v1] Mon, 15 Sep 2025 20:50:15 UTC (175 KB)
[v2] Wed, 17 Sep 2025 15:29:42 UTC (175 KB)
[v3] Mon, 17 Nov 2025 03:45:19 UTC (177 KB)
[v4] Tue, 27 Oct 2026 14:34:11 UTC (136 KB)

来源:arXiv cs.AI · arxiv.org