Page 19 - 《软件学报》2025年第12期
P. 19

5400                                                      软件学报  2025  年第  36  卷第  12  期


                  5   总 结

                    激进编译优化会改变程序中的浮点计算行为, 导致计算结果不一致性问题. 本文提出了一种浮点指令序列差
                 异性引导的    Delta-Debugging  定位方法  FI3D, 能够高效定位程序中导致编译优化结果不一致性的代码. 一方面,
                 FI3D  基于  Delta-Debugging  中的回溯搜索机制有效支持了多源问题代码的定位. 另一方面, FI3D              利用函数编译优
                 化前后浮点指令序列的差异性过滤掉冗余代码并优先搜索浮点计算行为改变程度高的代码, 提升了问题代码搜索
                 定位效率. 本文基于      LLVM  编译器、Python difflib  模块和编译优化结果不一致性代码定位工具               PLiner 实现了
                 FI3D, 并基于  NPB  测试集、GSL   数学库和    floatsmith  测试集中的典型用例进行了评测. 相比当前最先进的工具
                 PLiner, FI3D  能够有效定位  PLiner 失效的  4  个用例, 且对  PLiner 成功定位的  14  个用例  FI3D  获得了平均  26.8%
                 的性能提升. 实验结果显示了         FI3D  的有效性和高效性. 未来主要工作是将           FI3D  的分析定位思想移植支持其他开
                 源编译器, 例如    GNU  编译器  GCC  等.


                 References:
                  [1]   Corden MJ, Kreitzer D. Consistency of floating-point results using the intel compiler or why doesn’t my application always give the same
                     answer. 2009. https://software.intel.com/sites/default/files/article/164389/fp-consistency-102511.pdf
                  [2]   Sawaya G, Bentley M, Briggs I, Gopalakrishnan G, Ahn DH. FLiT: Cross-platform floating-point result-consistency tester and workload.
                     In:  Proc.  of  the  2017  IEEE  Int’l  Symp.  on  Workload  Characterization.  Seattle:  IEEE,  2017.  229–238.  [doi:  10.1109/IISWC.2017.
                     8167780]
                  [3]   Bentley M, Briggs I, Gopalakrishnan G, Ahn DH, Laguna I, Lee GL, Jones HE. Multi-level analysis of compiler-induced variability and
                     performance tradeoffs. In: Proc. of the 28th Int’l Symp. on High-performance Parallel and Distributed Computing. Phoenix: ACM, 2019.
                     61–72. [doi: 10.1145/3307681.3325960]
                  [4]   Guo H, Laguna I, C. Rubio-González. PLiner: Isolating lines of floating-point code for compiler-induced variability. In: Proc. of the 2020
                     Int’l Conf. for High Performance Computing, Networking, Storage and Analysis. Atlanta: IEEE, 2020. 1–14. [doi: 10.1109/SC41405.
                     2020.00053]
                  [5]   Laguna I. Varity: Quantifying floating-point variations in HPC systems through randomized testing. In: Proc. of the 2020 IEEE Int’l
                     Parallel and Distributed Processing Symp. NewOrleans: IEEE, 2020. 622–633. [doi: 10.1109/IPDPS47924.2020.00070]
                  [6]   Yu HB, Yi X, Yin BH, Li F, Chen ZB, Huang C. Efficient generation of floating-point inputs for compiler-induced variability. In: Proc.
                     of  the  2023  IEEE  Int’l  Conf.  on  Software  Analysis,  Evolution  and  Reengineering.  Macao:  IEEE,  2023.  224–235.  [doi:  10.1109/
                     SANER56733.2023.00030]
                  [7]   Miao D, Laguna I, Rubio-González C. Expression isolation of compiler-induced numerical inconsistencies in heterogeneous code. In:
                     Proc. of the 38th Int’l Conf. on High Performance Computing. Hamburg: Springer, 2023. 381–401. [doi: 10.1007/978-3-031-32041-5_20]
                  [8]   Panchekha P, Sanchez-Stern A, Wilcox JR, Tatlock Z. Automatically improving accuracy for floating point expressions. In: Proc. of the
                     36th ACM SIGPLAN Conf. on Programming Language Design and Implementation. Portland: ACM, 2015. 1–11. [doi: 10.1145/2737924.
                     2737959]
                  [9]   Yi X, Chen LQ, Mao XG, Ji T. Efficient automated repair of high floating-point errors in numerical libraries. Proc. of the ACM on
                     Programming Languages, 2019, 3(POPL): 56. [doi: 10.1145/3290369]
                 [10]   Zou DM, Gu YC, Shi YF, Wang MZ, Xiong YF, Su ZD. Oracle-free repair synthesis for floating-point programs. Proc. of the ACM on
                     Programming Languages, 2022, 6(OOPSLA2): 159. [doi: 10.1145/3563322]
                 [11]   Zeller A. Yesterday, my program worked. Today, it does not. Why? In: Proc. of the 7th European Software Engineering Conf. Held
                     Jointly with the 7th ACM SIGSOFT Symp. on the Foundations of Software Engineering. Toulouse: Springer, 1999. 253–267. [doi: 10.
                     1007/3-540-48166-4_16]
                 [12]   Galassi M, Davies J, Theiler J, Gough B, Jungman G, Alken P, Booth M, Rossi F. GNU Scientific Library Reference Manual. 3rd ed.,
                     Godalming: Network Theory Ltd., 2009. 1–572.
                 [13]   Lam  MO,  Vanderbruggen  T,  Menon  H,  Schordan  M.  Tool  integration  for  source-level  mixed  precision.  In:  Proc.  of  the  3rd  Int’l
                     Workshop  on  Software  Correctness  for  HPC  Applications.  Denver:  IEEE,  2019.  27–35.  [doi:  10.1109/CORRECTNESS49594.2019.
                     00009]
                 [14]   Benz  F,  Hildebrandt  A,  Hack  S.  A  dynamic  program  analysis  to  find  floating-point  accuracy  problems.  In:  Proc.  of  the  33rd  ACM
                     SIGPLAN  Conf.  on  Programming  Language  Design  and  Implementation.  Beijing:  ACM,  2012.  453–462.  [doi:  10.1145/2254064.
                     2254118]
                 [15]   Sanchez-Stern A, Panchekha P, Lerner S, Tatlock Z. Finding root causes of floating point error. In: Proc. of the 39th ACM SIGPLAN
                     Conf. on Programming Language Design and Implementation. Philadelphia: ACM, 2018. 256–269. [doi: 10.1145/3192366.3192411]
   14   15   16   17   18   19   20   21   22   23   24