Conjugate Gradient Solvers with High Accuracy and Bit-wise Reproducibility between CPU and GPU using Ozaki Scheme
Preprint
Abstract
On Krylov subspace methods such as the Conjugate Gradient (CG), the number of iterations until convergence may increase due to the loss of computation accuracy caused by rounding errors in floating-point computations. Besides, as the order of operations is non-deterministic on parallel computations, the result and the behavior of the convergence may be non-identical in different environments, even for the same input. This paper presents a new approach for the CG method with high accuracy as well as bit-level reproducibility of computed solutions on many-core processors, including both x86 CPUs and NVIDIA GPUs. In our proposed approach, accurate and reproducible operations are installed into all the inner-product based operations such as matrix-vector multiplication and dot-product, which are the main sources that may disturb reproducibility in the CG method. The accurate and reproducible operations are performed using the Ozaki scheme, which is the error-free transformation for dot-product that can ensure the correct-rounding. As this method can be built upon vendor-provided linear algebra libraries such as Intel Math Kernel Library and NVIDIA cuBLAS/ cuSparse, it reduces the development cost. In this paper, showing some examples with the non-identical conver-gences and computed solutions on different platforms, we demonstrate the applicability and the effectiveness of the proposed approach as well as its performance on both CPUs and GPUs. Besides, we compare against an existing accurate and reproducible CG implementation based on the Exact BLAS (ExBLAS) on CPUs.Keywords
All Related Versions
This publication has 13 references indexed in Scilit:
- DGEMM Using Tensor Cores, and Its Accurate and Reproducible Versions2020
- Reproducibility strategies for parallel Preconditioned Conjugate GradientJournal of Computational and Applied Mathematics, 2020
- Posit NPB: Assessing the Precision Improvement in HPC Scientific ApplicationsLecture Notes in Computer Science, 2020
- Reproducible BLAS Routines with Tunable Accuracy Using Ozaki Scheme for Many-Core ArchitecturesLecture Notes in Computer Science, 2020
- Numerical reproducibility for the parallel reduction on multi- and many-core architecturesParallel Computing, 2015
- The university of Florida sparse matrix collectionACM Transactions on Mathematical Software, 2011
- Error-free transformations of matrix multiplication by using fast routines of matrix multiplication and its applicationsNumerical Algorithms, 2011
- Accurate Floating-Point Summation Part II: Sign, K-Fold Faithful and Rounding to NearestSIAM Journal on Scientific Computing, 2009
- Accurate Floating-Point Summation Part I: Faithful RoundingSIAM Journal on Scientific Computing, 2008
- Design, implementation and testing of extended and mixed precision BLASACM Transactions on Mathematical Software, 2002