OMPar:基于AI驱动的源到源编译的自动并行化
OMPar: Automatic Parallelization with AI-Driven Source-to-Source Compilation
AI总结:
本文提出AI驱动的自动并行化工具OMPar,通过OMPify评估循环并行化潜力及微调模型MonoCoder-OMP生成OpenMP pragmas,在HeCBench和ParEval基准上显著优于传统方法,展现了LLM在自动并行化领域的潜力。
摘要:
由于现代软件系统的复杂性和多核架构的广泛采用,代码的手动并行化仍然是一个重大挑战。本文介绍了OMPar,这是一种AI驱动的工具,旨在使用OpenMP pragmas实现C/C++代码的自动化并行化。OMPar通过两个关键组件集成了大型语言模型(LLMs):OMPify用于评估循环并行化潜力,以及MonoCoder-OMP,这是一个新的微调模型,用于生成精确的OpenMP pragmas。OMPar的评估遵循与传统工具(如源到源AutoPar和ICPC编译器)相同的严格过程:(1)确保生成的代码以串行形式正确编译和运行,(2)评估随着线程和相应物理核心逐渐增加的性能,以及(3)验证和确认代码输出的正确性。使用来自HeCBench和ParEval的基准来评估准确性和性能。实验结果表明,OMPar显著优于传统方法,在识别可并行化循环和生成高效pragmas方面实现了更高的准确性。除了准确性之外,OMPar还具有能够在部分或不完整的代码库上工作以及持续从新代码模式中学习的能力等优势,从而随着时间的推移增强其并行化能力。这些结果突显了LLMs在彻底改变自动并行化技术方面的潜力,为更高效和可扩展的并行计算系统铺平了道路。
英文摘要:
Manual parallelization of code remains a significant challenge due to the complexities of modern software systems and the widespread adoption of multi-core architectures. This paper introduces OMPar, an AI-driven tool designed to automate the parallelization of C/C++ code using OpenMP pragmas. OMPar integrates Large Language Models (LLMs) through two key components: OMPify, which assesses loop parallelization potential, and MonoCoder-OMP, a new fine-tuned model which generates precise OpenMP pragmas. The evaluation of OMPar follows the same rigorous process applied to traditional tools like source-to-source AutoPar and ICPC compilers: (1) ensuring the generated code compiles and runs correctly in serial form, (2) assessing performance with the gradual addition of threads and corresponding physical cores, and (3) verifying and validating the correctness of the code's output. Benchmarks from HeCBench and ParEval are used to evaluate accuracy and performance. Experimental results demonstrate that OMPar significantly outperforms traditional methods, achieving higher accuracy in identifying parallelizable loops and generating efficient pragmas. Beyond accuracy, OMPar offers advantages such as the ability to work on partial or incomplete codebases and the capacity to continuously learn from new code patterns, enhancing its parallelization capabilities over time. These results underscore the potential of LLMs in revolutionizing automatic parallelization techniques, paving the way for more efficient and scalable parallel computing systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。