We consider the solution of the general Sylvester equation $AX+XB=C$ in mixed precision. First, we investigate the use of GMRES-based iterative refinement (GMRES-IR) to solve the equation using implicitly its Kronecker product form: we propose an efficient scheme to use the Schur factors of the coefficient matrices as preconditioners, but we demonstrate that this approach is not suitable in the case of the Sylvester equation. By revisiting a stationary iteration for linear systems, we therefore derive a new iterative refinement scheme for the quasi-triangular Sylvester equation, and our rounding error analysis provides sufficient conditions for convergence and a bound on the attainable relative residual. We leverage this iterative scheme to solve the general Sylvester equation in mixed precision. The new algorithms compute the Schur decomposition of the matrix coefficients in low precision, use the low-precision Schur factors to obtain an approximate solution to the quasi-triangular equation, and iteratively refine it to obtain a working-precision solution to the quasi-triangular equation. However, being only orthonormal to low precision, the unitary Schur factors of $A$ and $B$ cannot be used to recover the solution to the original equation. We propose two effective approaches to address this issue: one is based on re-orthonormalization in the working precision, and the other on explicit inversion of the almost-unitary factors. We test these mixed-precision algorithms on various Sylvester and Lyapunov equations from the literature. Our numerical experiments show that, for both classes of equations, the new algorithms are at least as accurate as existing ones. Our cost analysis, on the other hand, suggests that they would typically be faster than mono-precision alternatives if implemented on hardware that natively supports low precision.
翻译:本文研究一般Sylvester方程$AX+XB=C$的混合精度求解方法。首先,我们探讨基于GMRES的迭代精化(GMRES-IR)方法在隐式利用方程Kronecker积形式求解时的应用:提出了一种使用系数矩阵Schur分解因子作为预处理子的高效方案,但论证了该方法不适用于Sylvester方程的情形。通过重新研究线性系统的定常迭代法,我们推导出针对拟三角Sylvester方程的新型迭代精化格式,其舍入误差分析给出了收敛的充分条件及可达相对残差界。基于此迭代格式,我们实现了对一般Sylvester方程的混合精度求解。新算法首先以低精度计算矩阵系数的Schur分解,利用低精度Schur因子获得拟三角方程的近似解,再通过迭代精化得到拟三角方程的工作精度解。然而,由于$A$和$B$的酉Schur因子仅具有低精度正交性,无法直接用于恢复原方程的解。针对此问题,我们提出两种有效方案:一种基于工作精度下的重正交化处理,另一种通过对近似酉因子进行显式求逆。我们在文献中的各类Sylvester方程和Lyapunov方程上测试了这些混合精度算法。数值实验表明,对于两类方程,新算法至少与现有方法具有同等精度。另一方面,成本分析显示,若在原生支持低精度的硬件上实现,新算法通常将比单精度方案具有更快的计算速度。