Using MultiPrecisonArrays.jl: Iterative Refinement in Julia

C. T. Kelley
2024-06-19
Abstract:MultiPrecisionArrays.jl is a Julia package. This package provides data structures and solvers for several variants of iterative refinement. It will become much more useful when half precision (aka Float16) is fully supported in LAPACK/BLAS. For now, its only general-purpose application is classical iterative refinement with double precision equations and single precision factorizations.
Numerical Analysis
What problem does this paper attempt to address?
The paper primarily focuses on the issue of iterative refinement (IR) using the `MultiPrecisionArrays.jl` package in the Julia language. Specifically, it explores how to optimize storage and time costs in the process of solving linear systems by utilizing data structures and algorithms with different precisions. The core objectives of the paper include: 1. **Implementing the iterative refinement algorithm**: By performing factorization at a lower precision and then solving the linear system at a higher precision to reduce computational costs. 2. **Evaluating the effects of different precision combinations**: Comparing the performance impact of double precision with single precision, and single precision with half precision on iterative refinement. 3. **Exploring the challenges of half-precision computation**: Discussing the issues encountered when using half-precision format for low precision and providing a solution—using iterative refinement as a preconditioning technique. 4. **Optimizing memory allocation and computational efficiency**: Proposing a data structure (MPArray) to manage data at different precisions and demonstrating its performance in various scenarios through examples. The paper also provides a detailed introduction on how to implement the iterative refinement algorithm using the `MultiPrecisionArrays.jl` package, including specific steps of the algorithm, parameter settings, and how to obtain statistical information during the iterative process. Additionally, it offers strategies for addressing specific problems (such as matrices with ill-conditioned numbers), for example, using low-precision factors obtained from iterative refinement as preconditioners combined with Krylov subspace methods to improve convergence. In summary, this paper aims to address the issue of how to effectively utilize multi-precision computation in the process of solving linear systems, particularly how to reduce computational costs while ensuring the quality of the solution.