Recent advances in large language models (LLMs) have significantly accelerated progress in code translation, enabling more accurate and efficient transformation across programming languages. While originally developed for natural language processing, LLMs have shown strong capabilities in modeling programming language syntax and semantics, outperforming traditional rule-based systems in both accuracy and flexibility. These models have streamlined cross-language conversion, reduced development overhead, and accelerated legacy code migration. In this paper, we introduce OMPILOT, a novel domain-specific encoder-decoder transformer tailored for translating C++ code into OpenMP, enabling effective shared-memory parallelization. OMPILOT leverages custom pre-training objectives that incorporate the semantics of parallel constructs and combines both unsupervised and supervised learning strategies to improve code translation robustness. Unlike previous work that focused primarily on loop-level transformations, OMPILOT operates at the function level to capture a wider semantic context. To evaluate our approach, we propose OMPBLEU, a novel composite metric specifically crafted to assess the correctness and quality of OpenMP parallel constructs, addressing limitations in conventional translation metrics.


翻译:近年来,大型语言模型(LLMs)的进展显著推动了代码翻译领域的进步,实现了更准确、高效的跨编程语言转换。尽管最初是为自然语言处理而开发,LLMs在建模编程语言语法和语义方面展现出强大能力,在准确性和灵活性上均超越了传统的基于规则的系统。这些模型简化了跨语言转换流程,降低了开发开销,并加速了遗留代码的迁移。本文提出OMPILOT,一种专为将C++代码翻译为OpenMP而设计的领域特定编码器-解码器Transformer,以实现高效的共享内存并行化。OMPILOT利用融合并行结构语义的自定义预训练目标,并结合无监督与有监督学习策略,以提升代码翻译的鲁棒性。与先前主要关注循环级转换的研究不同,OMPILOT在函数级别进行操作,以捕获更广泛的语义上下文。为评估我们的方法,我们提出了OMPBLEU,一种专门设计用于评估OpenMP并行结构正确性与质量的新型复合指标,以解决传统翻译指标的局限性。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
【ICML2024】上下文感知标记化的高效世界模型
专知会员服务
29+阅读 · 2024年7月2日
【AAAI2024】LAMM: 多模态提示学习的标签对齐
专知会员服务
41+阅读 · 2023年12月14日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
【文本生成现代方法】Modern Methods for Text Generation
专知会员服务
44+阅读 · 2020年9月11日
Python图像处理,366页pdf,Image Operators Image Processing in Python
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
【NeurIPS2019】图变换网络:Graph Transformer Network
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
RNN | RNN实践指南(2)
KingsGarden
19+阅读 · 2017年5月4日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Arxiv
18+阅读 · 2024年12月27日
Arxiv
175+阅读 · 2023年4月20日
A Survey of Large Language Models
Arxiv
499+阅读 · 2023年3月31日
Arxiv
27+阅读 · 2023年3月17日
Deep Face Recognition: A Survey
Arxiv
18+阅读 · 2019年2月12日
VIP会员
相关VIP内容
【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
【ICML2024】上下文感知标记化的高效世界模型
专知会员服务
29+阅读 · 2024年7月2日
【AAAI2024】LAMM: 多模态提示学习的标签对齐
专知会员服务
41+阅读 · 2023年12月14日
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
【文本生成现代方法】Modern Methods for Text Generation
专知会员服务
44+阅读 · 2020年9月11日
Python图像处理,366页pdf,Image Operators Image Processing in Python
相关资讯
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
高效的文本生成方法 — LaserTagger 现已开源
TensorFlow
30+阅读 · 2020年2月27日
【NeurIPS2019】图变换网络:Graph Transformer Network
LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
RNN | RNN实践指南(2)
KingsGarden
19+阅读 · 2017年5月4日
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员