arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.08716cs.DC
收藏

自动调整基准技术:Roofline模型案例研究

Autotuning Benchmarking Techniques: A Roofline Model Case Study

Jacob Odgård Tørring, Jan Christian Meyer, Anne C. Elster

摘要:

供应商公布的峰值性能指标通常与实际可实现的性能指标不一致。因此,对核心应用程序和库例程进行广泛的基准测试是非常有意义的。由于DGEMM是计算密集型数字代码中使用最多的代码之一,因此它通常是高度供应商优化的,并且对经验基准非常感兴趣。在本文中,我们将展示如何构建一个新的工具,自动调整Roofline模型的基准测试过程。我们的新方法可以有效地,可靠地找到任何目标硬件的最佳配置。包括我们的工具在一系列硬件架构和理论峰值性能比较的结果。我们的工具通过状态空间缩减和穷举搜索来确定最佳参数,从而自动调整目标架构的基准。我们的核心思想包括使用方差和均值计算置信区间,并将其与当前的最优解进行比较。然后,如果置信区间的最大值低于当前最优解,我们可以提前终止评估过程。与传统的固定样本量方法相比,这种动态方法使DGEMM基准测试过程的搜索时间提高了116.33倍。我们的工具产生相同的基准测试结果,对于我们应用的每种优化技术,误差小于2%,同时大大减少了搜索时间。我们将这些结果与手动调整的基准参数进行比较。内存密集型TRIAD基准测试的结果,以及未来发展方向的一些想法也包括在内。

英文摘要:

Peak performance metrics published by vendors often do not correspond to what can be achieved in practice. It is therefore of great interest to do extensive benchmarking on core applications and library routines. Since DGEMM is one of the most used in compute-intensive numerical codes, it is typically highly vendor optimized and of great interest for empirical benchmarks. In this paper we show how to build a novel tool that autotunes the benchmarking process for the Roofline model. Our novel approach can efficiently and reliably find optimal configurations for any target hardware. Results of our tool on a range of hardware architectures and comparisons to theoretical peak performance are included. Our tool autotunes the benchmarks for the target architecture by deciding the optimal parameters through state space reductions and exhaustive search. Our core idea includes calculating the confidence interval using the variance and mean and comparing it against the current optimum solution. We can then terminate the evaluation process early if the confidence interval's maximum is lower than the current optimum solution. This dynamic approach yields a search time improvement of up to 116.33x for the DGEMM benchmarking process compared to a traditional fixed sample-size methodology. Our tool produces the same benchmarking result with an error of less than 2% for each of the optimization techniques we apply, while providing a great reduction in search time. We compare these results against hand-tuned benchmarking parameters. Results from the memory-intensive TRIAD benchmark, and some ideas for future directions are also included.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑