Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation

Le Chen, Quazi Ishtiaque Mahmud, Hung Phan, Nesreen K. Ahmed, Ali Jannesari
5/9/2023
20 citations
cs.LGcs.SE

No official code found. Best implementation: thelechen/OMP_serial_dataset (0 stars, last commit 2024-08-07).

Abstract

Detecting parallelizable code regions is a challenging task, even for experienced developers. Numerous recent studies have explored the use of machine learning for code analysis and program synthesis, including parallelization, in light of the success of machine learning in natural language processing.

Show full abstract

However, applying machine learning techniques to parallelism detection presents several challenges, such as the lack of an adequate dataset for training, an effective code representation with rich information, and a suitable machine learning model to learn the latent features of code for diverse analyses. To address these challenges, we propose a novel graph-based learning approach called Graph2Par that utilizes a heterogeneous augmented abstract syntax tree (Augmented-AST) representation for code. The proposed approach primarily focused on loop-level parallelization with OpenMP. Moreover, we create an OMP\_Serial dataset with 18598 parallelizable and 13972 non-parallelizable loops to train the machine learning models. Our results show that our proposed approach achieves the accuracy of parallelizable code region detection with 85\% accuracy and outperforms the state-of-the-art token-based machine learning approach. These results indicate that our approach is competitive with state-of-the-art tools and capable of handling loops with complex structures that other tools may overlook.

View on arXivView PDF

Code Implementations(1)

00Dec 6, 20232 years ago

Similar Papers

Cite this paper

@article{chen2023learning,
  title  = {Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation},
  author = {Le Chen and Quazi Ishtiaque Mahmud and Hung Phan and Nesreen K. Ahmed and Ali Jannesari},
  year   = {2023},
  eprint = {2305.05779},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.05779v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.05779.svg)](https://codeofpaper.com/paper/2305.05779)

Discussion