arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2412.08059math.NAcs.NA
收藏

重启混合精度迭代稀疏求解器的参数优化

Parameter optimization for restarted mixed precision iterative sparse solver

Novosibirsk State University(新西伯利亚国立大学)

Alexander V. Prolubnikov

AI总结:

本文研究了共轭梯度法在稀疏线性系统中的最优精度切换问题,通过分析矩阵参数预测误差增长,提出基于k近邻分类的优化策略,降低计算复杂度17%以上。

摘要:

本文考虑了共轭梯度法在稀疏线性系统中最优精度切换问题。稀疏矩阵定义为n×n矩阵,其中非零元素数m=O(n)。算法首先在单精度下计算近似解,容忍度为ε₁,然后切换到双精度以细化解至所需停止容忍度ε₂。基于系统矩阵参数的估计(计算时间不超过双精度求解时间的1%),确定最优ε₁值以最小化总计算时间。该值通过在预计算的小样本上使用k近邻方法分类获得。分类依赖于特征向量,包括矩阵大小n、非零元素数m、矩阵稀疏图的伪直径以及单精度早期CG迭代中残差范数衰减的平均速率。我们证明,除了矩阵条件数外,稀疏图的直径还影响迭代计算中的舍入误差增长。所提算法在顺序设置下,将CG的计算复杂度(以等效双精度迭代表示)降低了超过17%。所得加速效果最多比最优( oracle)选择的ε₁的加速效果差1.5%。虽然矩阵结构对Krylov子空间方法收敛性的影响已被充分理解,但将稀疏图直径作为混合精度CG中舍入误差增长的预测特征似乎是新的。据我们所知,没有先前工作利用图直径指导迭代线性求解器中的精度切换。

英文摘要:

The problem of optimal precision switching for the conjugate gradient (CG) method applied to sparse linear systems is considered. A sparse matrix is defined as an $n\!\times\!n$ matrix with $m\!=\!O(n)$ nonzero entries. The algorithm first computes an approximate solution in single precision with tolerance $\varepsilon_1$, then switches to double precision to refine the solution to the required stopping tolerance $\varepsilon_2$. Based on estimates of system matrix parameters -- computed in time which does not exceed $1\%$ of the time needed to solve the system in double precision -- we determine the optimal value of $\varepsilon_1$ that minimizes total computation time. This value is obtained by classifying the matrix using the $k$-nearest neighbors method on a small precomputed sample. Classification relies on a feature vector comprising: the matrix size $n$, the number of nonzeros $m$, the pseudo-diameter of the matrix sparsity graph, and the average rate of residual norm decay during the early CG iterations in single precision. We show that, in addition to the matrix condition number, the diameter of the sparsity graph influences the growth of rounding errors during iterative computations. The proposed algorithm reduces the computational complexity of the CG -- expressed in equivalent double-precision iterations -- by more than $17\%$ on average across the considered matrix types in a sequential setting. The resulting speedup is at most $1.5\%$ worse than that achieved with the optimal (oracle) choice of $\varepsilon_1$. While the impact of matrix structure on Krylov subspace method convergence is well understood, the use of the sparsity graph diameter as a predictive feature for rounding error growth in mixed-precision CG appears to be novel. To the best of our knowledge, no prior work employs graph diameter to guide precision switching in iterative linear solvers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑