• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2025, Vol. 47 ›› Issue (5): 761-774.

所属专题: 高性能计算

• 高性能计算 • 上一篇    下一篇

面向国产芯片的可复现矩阵分解

唐滔,姜浩,彭林,漆海俊,鲁轻风   

  1. (国防科技大学计算机学院,湖南 长沙 410073)

  • 收稿日期:2023-12-05 修回日期:2024-06-20 出版日期:2025-05-25 发布日期:2025-05-27
  • 基金资助:
    国家重点研发计划(2020YFA0709803)

Reproducible matrix decomposition on domestic chip

TANG Tao,JIANG Hao,PENG Lin,QI Haijun,LU Qingfeng   

  1. (College of Computer Science and Technology,National University of Defense Technology,Changsha 410073,China) 
  • Received:2023-12-05 Revised:2024-06-20 Online:2025-05-25 Published:2025-05-27

摘要: 浮点程序的可复现性是指相同的浮点程序在多次不同的运行中得到按位完全相同的数值结果,这对程序调试或数值结果的正确性检验具有重要意义,在数值仿真模拟领域应用广泛。然而,浮点计算的结果往往受到计算顺序的影响,因而指令的动态调度和乱序执行使得浮点计算的精确可复现成为一个挑战。矩阵分解算法在数值仿真应用中有着非常广泛的应用背景,基于可复现的矩阵分解算法可有效提升精度敏感的数值仿真应用的调试和结果分析的效率。基于无误差变换技术,在可复现BLAS库的基础上实现了分块LU分解、Cholesky分解和QR分解3个可复现矩阵分解算法,并在国产处理器上进行了验证。实验结果表明,可复现矩阵分解算法具备良好的数值精确性和可复现性。

关键词: 可复现, LU分解, Cholesky分解, QR分解

Abstract: The reproducibility of floating-point programs refers to the fact that the same floating-point program exactly obtains the same numerical results in bits in multiple different runs. This is of great significance for program debugging or correctness verification of numerical results, and is widely used in numerical simulation. However, the results of floating-point calculations are often influenced by the order of calculations, so the dynamic scheduling & disordered execution of instructions makes the reproducibility a challenge. Matrix decomposition algorithms are widely used in numerical simulation applications. Reproducible matrix decomposition algorithms can effectively improve the efficiency of debugging and result analysis in precision sensitive numerical simulation applications. Based on error free transformation technology, three reproducible matrix decomposition algorithms are implemented based on the reproducible BLAS library, including block LU decomposition, Cholesky decomposition, and QR decomposition, and verified on domestic processor. The experimental results show that reproducible matrix decomposition algorithms are numerical accurate and reproducible. 

Key words: reproducibility, LU decomposition, Cholesky decomposition, QR decomposition