paper-with-me

홈 › Papers

Learning to Parallelize in a Shared-Memory Environment with Transformers

2022-04-27 · Re'em Harel, Yuval Pinter, Gal Oren

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 recent advances in ML techniques, specifically in natural language processing (NLP), to replace S2S compilers altogether. We create a database (corpus), Open-OMP, specifically for this goal. Open-OMP contains over 28,000 code snippets, half of which contain OpenMP directives while the other half do not need parallelization at all with high probability. We use the corpus to train systems to automatically classify code segments in need of parallelization, as well as suggest individual OpenMP clauses. We train several transformer models, named PragFormer, for these tasks, and show that they outperform statistically-trained baselines and automatic S2S parallelization compilers in both classifying the overall need for an OpenMP directive and the introduction of private and reduction clauses. Our source code and database are available at: https://github.com/Scientific-Computing-Lab-NRCN/PragFormer.

📄 PDF Abstract BibTeX arXiv:2204.12835

Code (2)

pragformer/pragformer 공식 구현 pytorch
scientific-computing-lab-nrcn/pragformer 공식 구현 pytorch

Tasks

Management

Similar Papers 제목 키워드 기반

PaReprop: Fast Parallelized Reversible Backpropagation

2023-06-15 · Tyler Zhu, Karttikeya Mangalam

The growing size of datasets and deep learning models has made faster and memory-efficient training crucial. Reversible transformers have recently been introduced as an exciting new method for extremely memory-efficient …

Benchmarking

Hierarchical Associative Memory, Parallelized MLP-Mixer, and Symmetry Breaking

2024-06-18 · Ryo Karakida, Toshihiro Ota, Masato Taki

Transformers have established themselves as the leading neural network model in natural language processing and are increasingly foundational in various domains. In vision, the MLP-Mixer model has demonstrated competitiv…

FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning

2023-07-17 · Tri Dao

Scaling Transformers to longer sequence lengths has been a major problem in the last several years, promising to improve performance in language modeling and high-resolution image understanding, as well as to unlock new …

GPULanguage ModelingLanguage Modelling

Scaling the Wild: Decentralizing Hogwild!-style Shared-memory SGD

2022-03-13 · Bapi Chatterjee, Vyacheslav Kungurtsev, Dan Alistarh

Powered by the simplicity of lock-free asynchrony, Hogwilld! is a go-to approach to parallelize SGD over a shared-memory setting. Despite its popularity and concomitant extensions, such as PASSM+ wherein concurrent proce…

Blockingimage-classificationImage Classification

ClipFormer: Key-Value Clipping of Transformers on Memristive Crossbars for Write Noise Mitigation

2024-02-04 · Abhiroop Bhattacharjee, Abhishek Moitra, Priyadarshini Panda

Transformers have revolutionized various real-world applications from natural language processing to computer vision. However, traditional von-Neumann computing paradigm faces memory and bandwidth limitations in accelera…