Abstract
As High-Performance Computing (HPC) moves toward Exascale, the hardware landscape has diversified significantly, encompassing various CPUs, GPUs, and specialized vector engines. This paper presents a comprehensive study of performance portability—the ability of a single code base to run efficiently across these disparate platforms. By evaluating five scientific mini-apps across 12 architectures and six programming models, the authors quantify the trade-offs between productivity, performance, and portability. The study highlights that while C++ abstraction layers like Kokkos provide the most robust cross-platform efficiency, compiler maturity remains a critical limiting factor for standard models like OpenMP on non-native hardware.
Introduction
The HPC community has transitioned from a dominant x86 CPU monoculture to a "Cambrian explosion" of diverse architectures, including Intel, AMD, and Arm CPUs, NVIDIA and AMD GPUs, and NEC vector engines. This diversity poses a significant challenge: avoiding "siloed" development where code is locked into a specific vendor's ecosystem (e.g., CUDA for NVIDIA). The goal of performance portability is to achieve high efficiency across diverse hardware without requiring a total code rewrite for every new machine.
Methodology
The study employs a rigorous experimental design centered on the Pennycook et al. performance portability metric ($\mathcal{P}$), defined as the harmonic mean of performance efficiency across a set of platforms. Efficiency is measured in two ways:
- Architectural Efficiency: Performance as a fraction of theoretical hardware peak.
- Application Efficiency: Performance relative to the best-observed result on specific hardware.
To visualize portability, the authors use a "heuristic" approach, plotting how $\mathcal{P}$ changes as the "least compatible" hardware is progressively removed from the test set. This reveals which architectures act as "outliers" that break a model's portability.
Experimental Setup
The research utilizes five "mini-apps" representing common computational patterns in scientific computing:
- BabelStream: Memory bandwidth benchmark.
- TeaLeaf & CloverLeaf: Stencil-based solvers for heat diffusion and hydrodynamics.
- Neutral: Latency-sensitive Monte Carlo particle transport.
- MiniFMM: Compute-heavy N-body application using the Fast Multipole Method.
In total, the study covers approximately 360 combinations of code, language, and platform.
Key Insights
The Compiler Bottleneck
A primary finding is that performance portability is often limited by compiler maturity rather than the programming language itself. While OpenMP 4.5/5.0 is a standard, different compilers (Cray, Clang, GCC) exhibit vastly different capabilities when offloading code to GPUs.
The Abstraction Tax
High-level frameworks like Kokkos, which use C++ lambdas to abstract hardware details, showed a remarkably low "abstraction tax"—often less than 10% overhead compared to hand-tuned CUDA or OpenMP—while offering significantly broader hardware coverage.
CPU vs. GPU Divide
Portability remains high within a hardware class (e.g., across different CPUs) but drops significantly when spanning both CPUs and GPUs. This is often due to fundamental algorithmic differences, such as preferred data layouts (AoS vs. SoA).
Results
- OpenMP on CPUs: Achieved nearly 100% portability across all tested CPU architectures (Skylake, KNL, Power 9, Naples, ThunderX2).
- Kokkos Robustness: Emerged as the most robust model for cross-architecture work, with a mean performance portability of 68% across the entire hardware set.
- BabelStream Success: For simple memory-bound tasks, OpenMP 4.5 achieved 97.5% portability across 11 platforms.
- Hardware Outliers: Older architectures, such as the NVIDIA K20 GPU, often acted as "portability killers" because modern compilers are no longer optimized for them.
Conclusion
Achieving "write-once, run-anywhere" performance is possible but depends heavily on the workload and the maturity of the software stack. While low-level models like CUDA and OpenCL offer high performance, they require significantly more code (up to 2.2x) and maintenance effort. Future work will focus on the maturation of SYCL and the inclusion of next-generation hardware like the A64FX and AMD "Rome" CPUs.
Summary updated