计算机科学 ›› 2025, Vol. 52 ›› Issue (9): 152-159.doi: 10.11896/jsjkx.240800018
冀立光, 杨鸿儒, 周玉畅, 崔梦琦, 何昊天, 许瑾晨
JI Liguang, YANG Hongru, ZHOU Yuchang, CUI Mengqi, HE Haotian, XU Jinchen
摘要: 浮点数采用有限的位数来表示无限的实数进行计算,因此浮点数计算天然具有不准确性,这种不准确性可以用最大误差来度量。传统浮点数最大误差检测算法采用串行计算思维并结合经典搜索算法,当采样点数量较少时,容易将局部极大值作为全局最大值处理,从而遗漏最大误差值。如果大规模提升采样点数量,那么检测程序用时大幅增加,检测性能降低。通过应用并行计算模式指数级增加采样点数量,同步结合局部性原理在误差热点附近采用浮点动态采样策略,大幅提高检测结果的准确性。这种方法可以最大限度地发挥并行计算的算力,不仅可以提升浮点数最大误差的检测精度,还可以压缩检测程序的执行时间并提升性能,加速比可以达到1 136.3,检测出的最大误差值优于当前主流检测工具,这为衡量浮点数计算指标提供了新的检测方法。
中图分类号:
[1]KOTIPALLI P V,SINGH R,WOOD P,et al.AMPT-GA:Automatic Mixed Precision Floating Point Tuning for GPU Applications[C]//Proceedings of the ACM International Conference on Supercomputing.New York:ACM,2019:160-170. [2]DAMOUCHE N,MARTEL M.Salsa:An Automatic Tool toImprove the Numerical Accuracy of Programs[J].Automated Formal Methods,2018,5:63-76. [3]SANCHEZ-STERN A,PANCHEKHA P,LERNER S,et al.Finding Root Causes of Floating-Point Error[C]//Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation.ACM,2018:256-269. [4]GUO H,RUBIO-GONZÁLEZ C.Exploiting Community Structure for Floating-Point Precision Tuning[C]//Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis.New York:ACM,2018:333-343. [5]SAIKI B,FLATT O,NANDI C,et al.Combining Precision Tuning and Rewriting[C]//2021 IEEE 28th Symposium on Computer Arithmetic(ARITH).2021:1-8. [6]MAGRON V,CONSTANTINIDES G,DONALDSON A.Certified Roundoff Error Bounds Using Semidefinite Programming[J].ACM Transactions on Mathematical Software,2017,43(4):34. [7]DARULOVA E,HORN E,SHARMA S.Sound Mixed-Precision Optimization with Rewriting[C]//Proceedings of the 9th ACM/IEEE International Conference on Cyber-Physical Systems.2018:208-219. [8]YI X,CHEN L Q,MAO X G,et al.Efficient automated repair of high floating-point errors in numerical libraries[C]//Proceedings of the ACM on Programming Languages.2019:1-29. [9]CHIANG W F,GOPALAKRISHNAN G,RAKAMARIC Z,et al.Efficient search for inputs causing high floating-point errors[J].ACM SIGPLAN Notices,2014,49(8):43-52. [10]ZOUD,ZENG M,XIONG Y,et al.Detecting floating-point errors via atomic conditions[C]//Proceedings of the ACM on Programming Languages.2019:1-27. [11]PANCHEKHA P,SANCHEZ-STERN A,WILCOX J R,et al.Automatically improving accuracy for floating point expressions[J].ACM SIGPLAN Notices,2015,50(6):1-11. [12]WAGNER J,NISSAN M I,RASIN A.Database memory forensics:Identifying cache patterns for log verification[J].Forensic Science International:Digital Investigation,2023,45(S):301567. [13]MENON H,LAM M O,OSEI-KUFFUOR D,et al.ADAPT:Algorithmic Differentiation Applied to Floating-Point Precision Tuning[C]//International Conference for High Performance Computing,Networking,Storage and Analysis.IEEE,2018. [14]LIUX,GUO H,SUN R J,et al.Large-scale Application Characteristics Analysis and E-level Scalability Research of “Shenwei Taihu Light” computer system[J].Journal of Computer Science,2018,41(10):2209-2220. [15]SOLOVYEV A,JACOBSEN C,RAKAMARIĆ Z,et al.Rigorous Estimation of Floating-Point Round-off Errors with Symbolic Taylor Expansions[C]//Proceeding in 20th International Symposium on Formal Methods.New York:ACM,2015:532-550. [16]CHIANG W F,BARANOWSKI M,BRIGGS I,et al.Rigorous floating-point mixed-precision tuning[C]//Symposium on Principles of Programming Languages.New York:ACM,2017:300-315. [17]IZYCHEVA A,DARULOVA E.On Sound Relative ErrorBounds for Floating-Point Arithmetic[C]//2017 Formal Methods in Computer Aided Design.IEEE,2017:15-22. [18]CHERUBIN S,CATTANEO D,CHIARI M,et al.TAFFO:Tuning Assistant for Floating to Fixed Point Optimization[J].IEEE Embedded Systems Letters,2020,12(1):5-8. [19]CATTANEO D,BELLO A D,CHERUBIN S,et al.Embedded Operating System Optimization through Floating to Fixed Point Compiler Transformation[C]//21st Euromicro Conference on Digital System Design.IEEE,2018:172-176. [20]ZHANG Z Y,XU J C,HAO J W,et al.Hierarchical search algorithm for error detection in floating-point arithmetic expressions[J].Supercomput,2023,80:1183-1205. [21]DENIS C,CASTRO P D O,PETIT E.Verificarlo:CheckingFloating Point Accuracy through Monte Carlo Arithmetic[C]//2016 IEEE 23nd Symposium on Computer Arithmetic(ARITH).IEEE,2016:55-62. |
|