Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

The Kokkos OpenMPTarget Backend: Implementation and Lessons Learned

Conference ·

As the supercomputing landscape diversifies, solutions such as Kokkos to write vendor agnostic applications and libraries have risen in popularity. Kokkos provides a programming model designed for performance portability, which allows developers to write a single source implementation that can run efficiently on various architectures. At its heart, Kokkos maps parallel algorithms to architecture and vendor specific backends written in lower level programming models such as CUDA and HIP. Another approach to writing vendor agnostic parallel code is using OpenMP’s directives based approach, which lets developers annotate code to express parallelism. It is implemented at the compiler level and is supported by all major high performance computing vendors, as well as the primary Open Source toolchains GNU and LLVM. Since its inception, Kokkos has used OpenMP to parallelize on CPU architectures. In this paper, we explore leveraging OpenMP for a GPU backend and discuss the challenges we encountered when mapping the Kokkos APIs and semantics to OpenMP target constructs. As an exemplar workload we chose a simple conjugate gradient solver for sparse matrices. We find that performance on NVIDIA and AMD GPUs varies widely based on details of the implementation strategy and the chosen compiler. Furthermore, the performance of the OpenMP implementations decreases with increasing complexity of the investigated algorithms.

Research Organization:
Oak Ridge National Laboratory (ORNL), Oak Ridge, TN (United States)
Sponsoring Organization:
USDOE; USDOE Office of Science (SC)
DOE Contract Number:
AC05-00OR22725
OSTI ID:
2224192
Country of Publication:
United States
Language:
English

Similar Records

Evaluating performance and portability of high-level programming models: Julia, Python/Numba, and Kokkos on exascale nodes
Conference · Mon May 01 00:00:00 EDT 2023 · OSTI ID:1994693

Case Study of Using Kokkos and SYCLs Performance-Portable Frameworks for Milc-Dslash Benchmark on NVIDIA, AMD and Intel GPUs
Conference · Thu Dec 31 23:00:00 EST 2020 · OSTI ID:1892057

KokkACC: Enhancing Kokkos with OpenACC
Conference · Tue Nov 01 00:00:00 EDT 2022 · OSTI ID:2000279

Related Subjects