计算机科学 ›› 2025, Vol. 52 ›› Issue (9): 152-159.doi: 10.11896/jsjkx.240800018

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

基于局部性原理的最大误差并行检测方法

冀立光, 杨鸿儒, 周玉畅, 崔梦琦, 何昊天, 许瑾晨   

  1. 信息工程大学网络空间安全学院 郑州 450001
  • 收稿日期:2024-08-05 修回日期:2024-10-16 出版日期:2025-09-15 发布日期:2025-09-11
  • 通讯作者: 许瑾晨(atao728208@126.com)
  • 作者简介:(1194868658@qq.com)

Maximum Error Parallel Detection Method Based on Locality Principle

JI Liguang, YANG Hongru, ZHOU Yuchang, CUI Mengqi, HE Haotian, XU Jinchen   

  1. School of Cyberspace Security,University of Information Engineering,Zhengzhou 450001,China
  • Received:2024-08-05 Revised:2024-10-16 Online:2025-09-15 Published:2025-09-11
  • About author:JI Liguang,born in 1992,master.His main research interests includes high-performance computing.
    XU Jinchen,born in 1987,Ph.D,associate professor.His main research interests includes high-performance computing.

摘要: 浮点数采用有限的位数来表示无限的实数进行计算,因此浮点数计算天然具有不准确性,这种不准确性可以用最大误差来度量。传统浮点数最大误差检测算法采用串行计算思维并结合经典搜索算法,当采样点数量较少时,容易将局部极大值作为全局最大值处理,从而遗漏最大误差值。如果大规模提升采样点数量,那么检测程序用时大幅增加,检测性能降低。通过应用并行计算模式指数级增加采样点数量,同步结合局部性原理在误差热点附近采用浮点动态采样策略,大幅提高检测结果的准确性。这种方法可以最大限度地发挥并行计算的算力,不仅可以提升浮点数最大误差的检测精度,还可以压缩检测程序的执行时间并提升性能,加速比可以达到1 136.3,检测出的最大误差值优于当前主流检测工具,这为衡量浮点数计算指标提供了新的检测方法。

关键词: 浮点运算, 并行优化, 区间采样, 误差检测, 申威异构架构

Abstract: Floating-point numbers use a finite number of digits to represent infinite real numbers for computation,so floating-point computation is inherently inaccurate,which can be measured by the maximum error.The traditional floating-point maximum error detection algorithm uses serial computing thinking combined with classical search algorithm.When the number of sampling points is small,it is easy to treat the local maximum as the global maximum,thus omitting the maximum error value.If the number of sampling points is increased on a large scale,the time of the detection program will be greatly increased and the perfor-mance will be reduced.In this paper,the parallel computing mode is used to exponentially increase the number of sampling points,and the floating-point dynamic sampling strategy is used to near the error hot spot in combination with the principle of synchronization and locality,which greatly improves the accuracy of the detection results.This method can maximize the computing power of parallel computing,which can not only improves the detection accuracy of the maximum error of floating-point number calculation,but also reduces the execution time of the detection program and improves the performance,and the acceleration ratio can reach 1 136.3.The maximum error value detected is better than the current mainstream detection tools,which provides a new detection method for measuring the floating-point number calculation index.

Key words: Floating point arithmetic, Parallel optimization, Interval sampling, Error detection, Sunway heterogeneous architecture

中图分类号: 

  • TP314
[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.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!