Learning to Parallelize in a Shared-Memory Environment with Transformers
Re'em Harel, Yuval Pinter, Gal Oren

TL;DR
This paper introduces PragFormer, a transformer-based NLP approach trained on a large code corpus to automatically identify and suggest OpenMP parallelization directives, outperforming existing compilers.
Contribution
It presents a novel ML-based method using transformers and a new code corpus to improve automatic parallelization in shared-memory environments.
Findings
PragFormer outperforms baseline models in classifying code needing parallelization.
It effectively suggests specific OpenMP clauses like private and reduction.
The approach demonstrates higher accuracy than traditional source-to-source compilers.
Abstract
In past years, the world has switched to many-core and multi-core shared memory architectures. As a result, there is a growing need to utilize these architectures by introducing shared memory parallelization schemes to software applications. OpenMP is the most comprehensive API that implements such schemes, characterized by a readable interface. Nevertheless, introducing OpenMP into code is challenging due to pervasive pitfalls in management of parallel shared memory. To facilitate the performance of this task, many source-to-source (S2S) compilers have been created over the years, tasked with inserting OpenMP directives into code automatically. In addition to having limited robustness to their input format, these compilers still do not achieve satisfactory coverage and precision in locating parallelizable code and generating appropriate directives. In this work, we propose leveraging…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Parallel Computing and Optimization Techniques · Topic Modeling
