Skip to content Skip to navigation
University of Warwick
  • Study
  • |
  • Research
  • |
  • Business
  • |
  • Alumni
  • |
  • News
  • |
  • About

University of Warwick
Publications service & WRAP

Highlight your research

  • WRAP
    • Home
    • Search WRAP
    • Browse by Warwick Author
    • Browse WRAP by Year
    • Browse WRAP by Subject
    • Browse WRAP by Department
    • Browse WRAP by Funder
    • Browse Theses by Department
  • Publications Service
    • Home
    • Search Publications Service
    • Browse by Warwick Author
    • Browse Publications service by Year
    • Browse Publications service by Subject
    • Browse Publications service by Department
    • Browse Publications service by Funder
  • Help & Advice
University of Warwick

The Library

  • Login
  • Admin

OP2-Clang : a source-to-source translator using Clang/LLVM LibTooling

Tools
- Tools
+ Tools

Balogh, G. D., Mudalige, Gihan R., Reguly, I. Z. , Antao, S. F. and Bertolli, C. (2019) OP2-Clang : a source-to-source translator using Clang/LLVM LibTooling. In: The Fifth Workshop on the LLVM Compiler Infrastructure in HPC Workshop, The International Conference for High Performance Computing, Networking, Storage and Analysis, November 2018, Dallas, Texas, USA , 12 Nov 2018. Published in: 2018 IEEE/ACM 5th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC) ISBN 9781728101880. doi:10.1109/LLVM-HPC.2018.8639205

[img]
Preview
PDF
WRAP-OP2-Clang-source-source-translator-tooling-Bertoli-2018.pdf - Accepted Version - Requires a PDF viewer.

Download (577Kb) | Preview
Official URL: https://doi.org/10.1109/LLVM-HPC.2018.8639205

Request Changes to record.

Abstract

Domain Specific Languages or Active Library frameworks have recently emerged as an important method for gaining performance portability, where an application can be efficiently executed on a wide range of HPC architectures without significant manual modifications. Embedded DSLs such as OP2, provides an API embedded in general purpose languages such as C/C++/Fortran. They rely on source-to-source translation and code refactorization to translate the higher-level API calls to platform specific parallel implementations. OP2 targets the solution of unstructured-mesh computations, where it can generate a variety of parallel implementations for execution on architectures such as CPUs, GPUs, distributed memory clusters and heterogeneous processors making use of a wide range of platform specific optimizations. Compiler tool-chains supporting source-to-source translation of code written in mainstream languages currently lack the capabilities to carry out such wide-ranging code transformations. Clang/LLVM’s Tooling library (LibTooling) has long been touted as having such capabilities but have only demonstrated its use in simple source refactoring tasks.

In this paper we introduce OP2-Clang, a source-to-source translator based on LibTooling, for OP2’s C/C++ API, capable of generating target parallel code based on SIMD, OpenMP, CUDA and their combinations with MPI. OP2-Clang is designed to significantly reduce maintenance, particularly making it easy to be extended to generate new parallelizations and optimizations for hardware platforms. In this research, we demonstrate its capabilities including (1) the use of LibTooling’s AST matchers together with a simple strategy that use parallelization templates or skeletons to significantly reduce the complexity of generating radically different and transformed target code and (2) chart the challenges and solution to generating optimized parallelizations for OpenMP, SIMD and CUDA. Results indicate that OP2-Clang produces near-identical parallel code to that of OP2’s current source-to-source translator. We believe that the lessons learnt in OP2-Clang can be readily applied to developing other similar source-to-source translators, particularly for DSLs.

Item Type: Conference Item (Paper)
Subjects: Q Science > QA Mathematics > QA76 Electronic computers. Computer science. Computer software
Divisions: Faculty of Science > Computer Science
Library of Congress Subject Headings (LCSH): Domain-specific programming languages, Parallel processing (Electronic computers), Compilers (Computer programs), Parallel programming (Computer science)
Journal or Publication Title: 2018 IEEE/ACM 5th Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC)
Publisher: IEEE
ISBN: 9781728101880
Official Date: 14 February 2019
Dates:
DateEvent
14 February 2019Published
12 November 2018Accepted
DOI: 10.1109/LLVM-HPC.2018.8639205
Status: Peer Reviewed
Publication Status: Published
Publisher Statement: © 2018 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
Access rights to Published version: Restricted or Subscription Access
RIOXX Funder/Project Grant:
Project/Grant IDRIOXX Funder NameFunder ID
János Bolyai Research ScholarshipMagyar Tudományos Akadémiahttp://dx.doi.org/10.13039/501100003825
PD_17Nemzeti Kutatási és Technológiai Hivatalhttp://dx.doi.org/10.13039/501100003827
EFOP-3.6.2-16-2017-00013European Social Fundhttp://dx.doi.org/10.13039/501100004895
UNSPECIFIEDInnovate UKhttp://dx.doi.org/10.13039/501100006041
UNSPECIFIEDRolls-Roycehttp://dx.doi.org/10.13039/501100000767
EP/I006079/1[EPSRC] Engineering and Physical Sciences Research Councilhttp://dx.doi.org/10.13039/501100000266
EP/I00677X/1[EPSRC] Engineering and Physical Sciences Research Councilhttp://dx.doi.org/10.13039/501100000266
Conference Paper Type: Paper
Title of Event: The Fifth Workshop on the LLVM Compiler Infrastructure in HPC Workshop
Type of Event: Workshop
Location of Event: The International Conference for High Performance Computing, Networking, Storage and Analysis, November 2018, Dallas, Texas, USA
Date(s) of Event: 12 Nov 2018
Open Access Version:
  • https://warwick.ac.uk/fac/sci/dcs/people...

Request changes or add full text files to a record

Repository staff actions (login required)

View Item View Item

Downloads

Downloads per month over past year

View more statistics

twitter

Email us: wrap@warwick.ac.uk
Contact Details
About Us