具有重写的声音混合精度优化
Sound Mixed-Precision Optimization with Rewriting
摘要:
高精度算术计算面临着准确性和效率之间的内在权衡。除其他因素外,该折衷空间中的点由不同的数据类型以及评估顺序确定。简单地说,精度的位长度越短,舍入误差就越大,但程序运行得越快。类似地,程序执行的算术运算越少,运行速度就越快;然而,对舍入误差的影响就不那么明显了。手动优化有限精度程序的效率,同时确保结果保持足够准确是一项挑战。有限精度的非直观和离散性质使得舍入误差的估计困难;此外,可能的数据类型和评估顺序的空间非常大。我们提出了第一个完全自动化和健全的技术和工具,用于优化浮点和定点运算内核的性能。我们的技术结合了重写和混合精度调整。重写搜索不同的评估顺序,以找到一个最小化舍入误差,而没有额外的运行时成本。混合精度调优为不同的变量和操作分配不同的有限精度,因此提供比统一精度更细粒度的控制。我们表明,当这两种技术的设计和应用在一起,他们可以提供更高的性能改善比单独。
英文摘要:
Finite-precision arithmetic computations face an inherent tradeoff between accuracy and efficiency. The points in this tradeoff space are determined, among other factors, by different data types but also evaluation orders. To put it simply, the shorter a precision's bit-length, the larger the roundoff error will be, but the faster the program will run. Similarly, the fewer arithmetic operations the program performs, the faster it will run; however, the effect on the roundoff error is less clear-cut. Manually optimizing the efficiency of finite-precision programs while ensuring that results remain accurate enough is challenging. The unintuitive and discrete nature of finite-precision makes estimation of roundoff errors difficult; furthermore the space of possible data types and evaluation orders is prohibitively large. We present the first fully automated and sound technique and tool for optimizing the performance of floating-point and fixed-point arithmetic kernels. Our technique combines rewriting and mixed-precision tuning. Rewriting searches through different evaluation orders to find one which minimizes the roundoff error at no additional runtime cost. Mixed-precision tuning assigns different finite precisions to different variables and operations and thus provides finer-grained control than uniform precision. We show that when these two techniques are designed and applied together, they can provide higher performance improvements than each alone.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。