Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Chen, Le, Mahmud, Quazi Ishtiaque, Phan, Hung, Ahmed, Nesreen K., Jannesari, Ali
Format: Preprint
Publié: 2023
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909398911156224
author Chen, Le
Mahmud, Quazi Ishtiaque
Phan, Hung
Ahmed, Nesreen K.
Jannesari, Ali
author_facet Chen, Le
Mahmud, Quazi Ishtiaque
Phan, Hung
Ahmed, Nesreen K.
Jannesari, Ali
contents 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. 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.
format Preprint
id arxiv_https___arxiv_org_abs_2305_05779
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation
Chen, Le
Mahmud, Quazi Ishtiaque
Phan, Hung
Ahmed, Nesreen K.
Jannesari, Ali
Machine Learning
Software Engineering
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. 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.
title Learning to Parallelize with OpenMP by Augmented Heterogeneous AST Representation
topic Machine Learning
Software Engineering
url https://arxiv.org/abs/2305.05779