Construction and Performance Evaluation of an Arbitrary-Precision Floating-Point Arithmetic Environment on CUDA
Abstract
Arbitrary-precision floating-point arithmetic is used to solve ill-conditioned problems in scientific computing, and MPFR and MPC have become the de facto standard libraries for CPU-based computations. However, no publicly available environment provides MPFR/MPC functionality on GPUs. In this study, we developed mpc\_cuda, an arbitrary-precision arithmetic environment for GPUs, by leveraging generative AI (Claude Code) and rerunnable conversion scripts to faithfully port the mini-GMP-based MPFR/MPC libraries to CUDA kernels while reserving a per-thread temporary storage region (a bump arena). This approach accelerates real and complex elementary functions and basic linear algebra on GPUs by approximately 40--105, while remaining bit-identical to the host. In addition, we implemented compile-time fixed-precision types cu\_freal/cu\_fcomplex, and demonstrate, through benchmark tests involving the GMRES() method and algebraic equation solving on GB10 and H100 GPUs, that the proposed implementation outperforms the existing GPU libraries CUMP and CAMPARY at low-to-medium precision.
Create a lesson
Related papers
Portable Extended-Precision Floating-Point Arithmetic for Scientific Computing Kernels
Shared title terminology · Manas Vishal
Simulation of Custom-Precision OCP MX Block Floating-Point Formats and Arithmetic
Shared title terminology · Maliha Islam, Mantas Mikaitis
Low Precision Fortran -- Enabling Low Precision Floating Point Arithmetic in Modern Fortran
Shared title terminology · Martin Köhler, Peter Benner
Floating-point autotuning with customized precisions
Shared title terminology · Xinye Chen, Fabienne Jézéquel, Thibault Hilaire
Lord of the Precision, the Two Floats: Double-Word Arithmetic for Complex Numbers
Shared title terminology · František Stloukal, Fabienne Jézéquel
The Rise of Low Precision Floating Point
Shared title terminology · Guy Lemieux, Michael L. Overton