mlsanityData to 7 Oct 2026

Advising OpenMP Parallelization via a Graph-Based Approach with Transformers

arXiv 2305.11999 ↗First posted 16 May 2023cs.DC cs.AI cs.LGcited by 10

Not on the map. Why?

Abstract (arXiv)

There is an ever-present need for shared memory parallelization schemes to exploit the full potential of multi-core architectures. The most common parallelization API addressing this need today is OpenMP. Nevertheless, writing parallel code manually is complex and effort-intensive. Thus, many deterministic source-to-source (S2S) compilers have emerged, intending to automate the process of translating serial to parallel code. However, recent studies have shown that these compilers are impractical in many scenarios. In this work, we combine the latest advancements in the field of AI and natural language processing (NLP) with the vast amount of open-source code to address the problem of automatic parallelization. Specifically, we propose a novel approach, called OMPify, to detect and predict the OpenMP pragmas and shared-memory attributes in parallel code, given its serial version. OMPify is based on a Transformer-based model that leverages a graph-based representation of source code that exploits the inherent structure of code. We evaluated our tool by predicting the parallelization pragmas and attributes of a large corpus of (over 54,000) snippets of serial code written in C and C++ languages (Open-OMP-Plus). Our results demonstrate that OMPify outperforms existing approaches, the general-purposed and popular ChatGPT and targeted PragFormer models, in terms of F1 score and accuracy. Specifically, OMPify achieves up to 90% accuracy on commonly-used OpenMP benchmark tests such as NAS, SPEC, and PolyBench. Additionally, we performed an ablation study to assess the impact of different model components and present interesting insights derived from the study. Lastly, we also explored the potential of using data augmentation and curriculum learning techniques to improve the model's robustness and generalization capabilities.

Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 17 of its 39 references that are in the map. First posted on arXiv 16 May 2023.

Builds on

17 of 39 references.

References · 17

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  5. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  6. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  7. 2019Competence-based Curriculum Learning for Neural Machine Translationcited by 201
  8. 2021Data Augmentation Can Improve Robustnesscited by 193
  9. 2018CurriculumNet: Weakly Supervised Learning from Large-Scale Web Imagescited by 126
  10. 2020Semantic Robustness of Models of Source Codecited by 43
  11. 2019Misleading Authorship Attribution of Source Code using Adversarial Learningcited by 33
  12. 2021Bridging Pre-trained Models and Downstream Tasks for Source Code Understandingcited by 27
5 more
  1. 2023An Empirical Comparison of Pre-Trained Models of Source Codecited by 25
  2. 2022Learning to Parallelize in a Shared-Memory Environment with Transformerscited by 10
  3. 2020ComPar: Optimized Multi-Compiler for Automatic OpenMP S2S Parallelizationcited by 8
  4. 2020ControlFlag: A Self-Supervised Idiosyncratic Pattern Detection System for Software Control Structurescited by 5
  5. 2021DeepSCC: Source Code Classification Based on Fine-Tuned RoBERTacited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 2; 2024: 5; 2025: 2; 2026: 1.

10 papers.