Author:
Vazquez Jose Luis,Sanchez Pablo
Abstract
AbstractSince the introduction of the “target” directive in the 4.0 specification, the usage of OpenMP for heterogeneous computing programming has increased significantly. However, the compiler support limits its usage because the code for the accelerated region has to be generated in compile time. This restricts the usage of accelerator-specific design flows (e.g. FPGA hardware synthesis) and the support of new devices that typically requires extending and modifying the compiler itself.This paper explores a solution to these limitations: a generic device that is supported by the OpenMP compiler but whose functionality is defined at runtime. The generic device framework has been integrated in an OpenMP compiler (LLVM/Clang). It acts as a device type for the compiler and interfaces with the physical devices to execute the accelerated code. The framework has an API that provides support for new devices and accelerated code without additional OpenMP compiler modifications. It also includes a code generator that extracts the source code of OpenMP target regions for external compilation chains.In order to evaluate the approach, we present a new device implementation that allows executing OpenCL code as an OpenMP target region. We study the overhead that the framework produces and show that it is minimal and comparable to other OpenMP devices.
Publisher
Springer International Publishing
Reference15 articles.
1. Lecture Notes in Computer Science;Á Álvarez,2019
2. Khronos Group, “OpenCL: The open standard for parallel programming of heterogeneous systems” (2010). https://www.khronos.org/opencl/
3. NVIDIA, CUDA – Compute Unified Device Architecture. https://developer.nvidia.com/cuda-zone
4. Open MP API Specification. Version 5.0 (November 2018). https://www.openmp.org/specifications/
5. Bertolli, C., et al.: Integrating GPU support for OpenMP offloading directives into Clang. In: LLVM-HPC2015, Austin, Texas, USA, 15–20 November 2015