ParaCodex: 一种基于性能分析的自主编码代理,用于可靠并行代码生成与翻译
ParaCodex: A Profiling-Guided Autonomous Coding Agent for Reliable Parallel Code Generation and Translation
AI总结:
ParaCodex是一种基于性能分析的自主编码代理,通过分阶段热点分析、显式数据规划和正确性门控,实现高效并行代码生成与翻译,显著提升GPU性能。
摘要:
并行编程在高性能计算和人工智能中至关重要,但生成正确且快速的代码仍具挑战性,尤其是在OpenMP GPU卸载中,数据移动和调优占据主导地位。自主编码代理可以编译、测试和在目标硬件上进行性能分析,但缺乏领域框架时输出会很脆弱。我们提出了ParaCodex,一种HPC工程师工作流,通过分阶段热点分析、显式数据规划、正确性门控和性能引导的细化,将基于Codex的代理转变为自主的OpenMP GPU卸载系统。我们在HeCBench、Rodinia和NAS上评估了从串行CPU内核到OpenMP GPU卸载内核的翻译。排除五个内核后,ParaCodex在所有31个有效内核上成功。生成的内核在25/31种情况下比参考OpenMP实现的GPU时间有所提高,在HeCBench上达到3倍的几何平均加速,在Rodinia上达到5倍。我们还评估了CUDA到OpenMP卸载翻译在ParEval上的表现,在代码-only和端到端设置中,ParaCodex在编译和验证率方面保持高水平。
英文摘要:
Parallel programming is central to HPC and AI, but producing code that is correct and fast remains challenging, especially for OpenMP GPU offload, where data movement and tuning dominate. Autonomous coding agents can compile, test, and profile on target hardware, but outputs are brittle without domain scaffolding. We present ParaCodex, an HPC-engineer workflow that turns a Codex-based agent into an autonomous OpenMP GPU offload system using staged hotspot analysis, explicit data planning, correctness gating, and profiling-guided refinement. We evaluate translation from serial CPU kernels to OpenMP GPU offload kernels on HeCBench, Rodinia, and NAS. After excluding five kernels, ParaCodex succeeded on all 31 valid kernels. The generated kernels improved GPU time over reference OpenMP implementations in 25/31 cases, achieving geometric-mean speedups of 3x on HeCBench and 5x on Rodinia, and outperforming a zero-shot Codex baseline on all suites. We also evaluate CUDA to OpenMP offload translation on ParEval, where ParaCodex maintains high compilation and validation rates in code-only and end-to-end settings.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。