Daily Tech Briefing
AI 科技速览
每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。
arXiv AI · 2026/7/28 04:00:00
ParBench: A Benchmark for Reliable Evaluation of LLM Parallel Code Translation
AI 中文解读
ParBench:一个专门测试AI大模型能否精准翻译并行代码的新工具来了!以往AI翻译代码时,常常只是“照葫芦画瓢”,忽略了并行计算中线程协作、同步控制等关键逻辑,导致翻译结果看似正确但实际跑起来就出错。这个新基准框架通过搭建标准化的编译、运行和验证环境,只让AI翻译核心运算部分,还用“干扰测试”故意修改代码结构,看AI是否真的理解逻辑而非死记硬背。测试多家顶尖AI模型后发现,它们在不同编程语言间的并行代码翻译仍存在方向不对称、多文件协调差、对原代码改动敏感等问题。对普通程序员来说,这意味着日后用AI自动迁移老旧并行代码到新硬件(比如GPU、多核CPU)时,有了更靠谱的评估手段,能大幅减少手工调试的麻烦;对科学计算和AI应用开发者而言,这个工具将推动自动代码迁移技术走向实用,加速高性能软件在各类加速器上的部署。
arXiv:2607.22588v1 Announce Type: new
Abstract: Modern compute-intensive software must migrate across a changing ecosystem of accelerators, programming APIs, compiler stacks, and portability layers, including CUDA, OpenMP, OpenCL, and OpenMP target offload. Large language models and autonomous coding agents are increasingly proposed for such migration, but the field lacks reliable ways to measure whether they preserve the low-level parallel semantics that make translations behaviorally valid, including thread indexing, synchronization, memory management, host-device coordination, and API-specific execution structure.
We present ParBench, a kernel-centric benchmark framework for evaluating LLM-based parallel API translation under executable, reproducible conditions. ParBench fixes the surrounding build, run, and verification infrastructure through declarative benchmark specifications and asks models to translate only the computational kernels. It draws on multiple open-source HPC suites and covers representative cross-API translation directions among CUDA, OpenMP, OpenCL, and OpenMP target offload. To test whether success reflects robust translation rather than surface-form memorization, ParBench includes AST-driven, intended behavior-preserving, baseline-validated source augmentation. Evaluations on state-of-the-art open and proprietary LLMs show persistent barriers to reliable parallel code translation, including direction asymmetry, multi-file coordination, incomplete API adaptation, and uneven robustness to source-level perturbations. Code is available at https://github.com/Scientific-Computing-Lab/ParBench.
分享
阅读原文 ↗