Numerically Stable Cholesky-QR on GPU via Mixed-Precision Randomized Preconditioning
arXiv:2606.18411
Abstract
Cholesky-QR is among the fastest algorithms for computing the thin QR factorization of tall-and-skinny matrices on GPUs, relying entirely on BLAS-3 operations. However, it is numerically unstable: forming the Gram matrix squares the condition number, causing breakdown when . We present MRCQR (Mixed-Precision Randomized Cholesky-QR), a stable GPU algorithm that addresses this limitation. MRCQR uses a subsampled randomized trigonometric transform to construct a preconditioner that reduces to near unity with high probability, then applies Cholesky-QR in double precision to the preconditioned matrix. The key insight -- supported by perturbation analysis -- is that the preconditioner requires far less accuracy than the final result: single (FP32) precision suffices when , and half (FP16) when . MRCQR produces an explicit orthogonal factor satisfying (, double-precision unit roundoff) for condition numbers up to , far beyond the limit of CholQR2. Experiments on an NVIDIA H100 GPU show that MRCQR (FP16) outperforms rand-cholQR by -- across all tested column counts and is -- faster than cuSOLVER geqrf, while the FP16 sketch (used when ) is cheaper than FP64 at no accuracy cost.