CAMPS: Composable Adapters for Mixed-Precision Solvers
Abstract
Mixed-precision solvers usually assign a fixed precision to each algorithmic component. This makes it hard to reuse a lower-precision solver at different depths inside a higher-precision solver. We introduce CAMPS (Composable Adapters for Mixed-Precision Solvers), a framework that uses iterative refinement to connect solvers across precisions. An adapter computes residuals and updates in the precision of its parent and passes each correction solve to a child solver in a lower precision. The child can be a direct solver, an iterative solver, or another adapter. The adapter checks every correction and keeps it if the residual does not increase. We prove three results. Adapters can be placed at any compatible set of precision boundaries in a solver tree without breaking the solver interface. Every output that the root solver reports as successful satisfies a backward-error bound set by the stopping tolerance and the root precision. Convergence follows from one sufficient condition per boundary, computed from the leaves of the tree to its root. We test five configurations on dense and sparse systems in 64-bit, 32-bit, and 16-bit floating-point arithmetic (FP64, FP32, and FP16). On dense well-conditioned systems, CAMPS is up to 9.6x faster than an FP64 direct solver for a single solve that includes the factorization. On sparse nonsymmetric systems, a three-precision hierarchy is the fastest method we tested. Compared with our implementation of the nested solver F3R, CAMPS is as fast and uses about 3.4x less peak memory. CAMPS does not always win. Plain conjugate gradient is faster on sparse symmetric positive definite systems. On very ill-conditioned systems, FP32 corrections fail, and the adapter detects the failure and switches to an FP64 fallback.
Create a lesson
Metadata
- Categories
- cs.MS, cs.NA, math.NA
Related papers
TOMOS: Eliminating Data Duplication in Mixed-Precision Matrix Computations
Shared title terminologycs.MSVasileios Georgiou, Petros Drineas
The involute function and its inverse in IEEE 754 double precision: measured and proved accuracy, and its effect on gear inspection
Shared title terminologycs.MSAndrew Prestridge
Portable Extended-Precision Floating-Point Arithmetic for Scientific Computing Kernels
Shared title terminologycs.MSManas Vishal
Discontinuity-Aware Solvers for Vapor-Compression Cycles
Shared title terminologycs.MSShreyas Ekanathan, Avinash Subramanian, Oscar Smith et al.
Lord of the Precision, the Two Floats: Double-Word Arithmetic for Complex Numbers
Shared title terminologycs.MSFrantišek Stloukal, Fabienne Jézéquel
The Rise of Low Precision Floating Point
Shared title terminologycs.MSGuy Lemieux, Michael L. Overton