Enabling mixed-precision with the help of tools: A Nekbone case study
Yanxiang Chen, Pablo de Oliveira Castro, Paolo Bientinesi, Roman Iakymchuk
TL;DR
The paper addresses enabling mixed-precision in exascale CFD codes by presenting a three-part workflow that combines roofline profiling and computer-arithmetic tools Verificarlo (VPREC and MCA backends) to identify precision-cropping opportunities in Nekbone, followed by targeted implementation and validation. It demonstrates that restricting mixed-precision to the CG solve with careful data-type management yields substantial performance and energy benefits while preserving accuracy, e.g., up to 40.7% time-to-solution and 47.1% energy-to-solution reductions on 128 MPI ranks. The study also discusses accuracy and stability considerations, including stagnation observed under certain compiler configurations, and outlines future work on adaptive precision in the CG solver and scaling to larger codes like Nek and SOD2D. Overall, the work provides a practical methodology and empirical evidence that selective mixed-precision can meaningfully accelerate real CFD workloads with manageable accuracy trade-offs.
Abstract
Mixed-precision computing has the potential to significantly reduce the cost of exascale computations, but determining when and how to implement it in programs can be challenging. In this article, we consider Nekbone, a mini-application for the CFD solver Nek5000, as a case study, and propose a methodology for enabling mixed-precision with the help of computer arithmetic tools and roofline model. We evaluate the derived mixed-precision program by combining metrics in three dimensions: accuracy, time-to-solution, and energy-to-solution. Notably, the introduction of mixed-precision in Nekbone, reducing time-to-solution by 40.7% and energy-to-solution by 47% on 128 MPI ranks.
