Saved in:
Bibliographic Details
Main Authors: Miki, Yohei, Hanawa, Toshihiro
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.18889
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913590043213824
author Miki, Yohei
Hanawa, Toshihiro
author_facet Miki, Yohei
Hanawa, Toshihiro
contents GPU is the dominant accelerator device due to its high performance and energy efficiency. Directive-based GPU offloading using OpenACC or OpenMP target is a convenient way to port existing codes originally developed for multicore CPUs. Although OpenACC and OpenMP target provide similar features, both methods have pros and cons. OpenACC has better functions and an abundance of documents, but it is virtually for NVIDIA GPUs. OpenMP target supports NVIDIA/AMD/Intel GPUs but has fewer functions than OpenACC. Here, we have developed a header-only library, Solomon (Simple Off-LOading Macros Orchestrating multiple Notations), to unify the interface for GPU offloading with the support of both OpenACC and OpenMP target. Solomon provides three types of notations to reduce users' implementation and learning costs: intuitive notation for beginners and OpenACC/OpenMP-like notations for experienced developers. This manuscript denotes Solomon's implementation and usage and demonstrates the GPU-offloading in $N$-body simulation and the three-dimensional diffusion equation. The library and sample codes are provided as open-source software and publicly and freely available at \url{https://github.com/ymiki-repo/solomon}.
format Preprint
id arxiv_https___arxiv_org_abs_2411_18889
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Unified schemes for directive-based GPU offloading
Miki, Yohei
Hanawa, Toshihiro
Distributed, Parallel, and Cluster Computing
Instrumentation and Methods for Astrophysics
Performance
Programming Languages
GPU is the dominant accelerator device due to its high performance and energy efficiency. Directive-based GPU offloading using OpenACC or OpenMP target is a convenient way to port existing codes originally developed for multicore CPUs. Although OpenACC and OpenMP target provide similar features, both methods have pros and cons. OpenACC has better functions and an abundance of documents, but it is virtually for NVIDIA GPUs. OpenMP target supports NVIDIA/AMD/Intel GPUs but has fewer functions than OpenACC. Here, we have developed a header-only library, Solomon (Simple Off-LOading Macros Orchestrating multiple Notations), to unify the interface for GPU offloading with the support of both OpenACC and OpenMP target. Solomon provides three types of notations to reduce users' implementation and learning costs: intuitive notation for beginners and OpenACC/OpenMP-like notations for experienced developers. This manuscript denotes Solomon's implementation and usage and demonstrates the GPU-offloading in $N$-body simulation and the three-dimensional diffusion equation. The library and sample codes are provided as open-source software and publicly and freely available at \url{https://github.com/ymiki-repo/solomon}.
title Unified schemes for directive-based GPU offloading
topic Distributed, Parallel, and Cluster Computing
Instrumentation and Methods for Astrophysics
Performance
Programming Languages
url https://arxiv.org/abs/2411.18889