This documentation is designed for beginners in Graphics Processing Unit (GPU)-programming and who want to get familiar with OpenACC and OpenMP offloading models. Here we present an overview of these two programming models as well as of the GPU-architectures. Specifically, we provide some insights into the functionality of these models and perform experiments involving different directives and discuss their performance. This is achieved through the use of a mini-application based on solving numerically the Laplace equation. Such experiments reveal the benefit of the use of GPU, which in our case manifests by an increase of the performance by almost a factor of 52. We further carry out a comparative study between the OpenACC and OpenMP models in the aim of converting OpenACC to OpenMP on heterogeneous systems. In this context, we present a short overview of the open-source OpenACC compiler Clacc, which is designed based on translating OpenACC to OpenMP in Clang.
翻译:本文是为图形处理股(GPU)程序化初学者设计的,他们希望熟悉 OpenACC 和 OpenMP 卸载模型。 我们在此概述这两个程序化模型以及 GPU 结构化模型。 具体地说, 我们对这些模型的功能提供一些洞察力, 并进行涉及不同指令的实验, 并讨论其性能。 这是通过使用基于数字解析 Laplace 方程式的微型应用实现的。 这些实验揭示了使用 GPU 的好处。 以我们为例, 其表现为性能几乎增加了52倍。 我们进一步对 OpenACC 和 OpenMP 模型进行比较研究, 目的是将 OpenACC 转换为关于多种系统的 OpenMP 。 在这方面, 我们简要概述开源的 OpenACC 编译器 Clacc, 其设计是将开关译为Clang 的 OpenMP 。