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

高效CUDA和OpenCL内核基准集及其动态自调优

A Benchmark Set of Highly-efficient CUDA and OpenCL Kernels and its Dynamic Autotuning with Kernel Tuning Toolkit

Filip Petrovič, David Střelák, Jana Hozzová, Jaroslav Oľha, Richard Trembecký, Siegfried Benkner, Jiří Filipovič

摘要:

与性能相关的源代码参数的自动调优允许在没有硬编码优化的情况下自动调优应用程序,从而有助于保持性能的可移植性。在本文中,我们介绍了一个基准集的10个自动可调内核的重要计算问题,在OpenCL或CUDA实现。使用我们的内核调优工具包,我们表明,通过自动调优,大多数内核在各种GPU上都达到了接近峰值的性能,并且在CPU和Xeon Phis上的性能优于基准实现。我们的评估还表明,自动调优是性能可移植性的关键。除了离线调优之外,我们还引入了在应用程序运行时对代码优化参数的动态自动调优。通过动态调优,Kernel Tuning Toolkit使应用程序能够在运行时根据需要(例如,当输入数据更改时)重新调优性能关键型内核。虽然人们普遍认为,自动调整空间往往是太大,在应用程序运行时搜索,我们表明,这是不一定的情况下,调整空间的合理设计。我们的许多内核都达到了接近峰值的性能,具有中等大小的调优空间,可以在运行时以可接受的开销进行搜索。最后,我们展示了如何动态性能调整可以集成到一个现实世界的应用程序从冷冻电子显微镜域。

英文摘要:

Autotuning of performance-relevant source-code parameters allows to automatically tune applications without hard coding optimizations and thus helps with keeping the performance portable. In this paper, we introduce a benchmark set of ten autotunable kernels for important computational problems implemented in OpenCL or CUDA. Using our Kernel Tuning Toolkit, we show that with autotuning most of the kernels reach near-peak performance on various GPUs and outperform baseline implementations on CPUs and Xeon Phis. Our evaluation also demonstrates that autotuning is key to performance portability. In addition to offline tuning, we also introduce dynamic autotuning of code optimization parameters during application runtime. With dynamic tuning, the Kernel Tuning Toolkit enables applications to re-tune performance-critical kernels at runtime whenever needed, for example, when input data changes. Although it is generally believed that autotuning spaces tend to be too large to be searched during application runtime, we show that it is not necessarily the case when tuning spaces are designed rationally. Many of our kernels reach near peak-performance with moderately sized tuning spaces that can be searched at runtime with acceptable overhead. Finally we demonstrate, how dynamic performance tuning can be integrated into a real-world application from cryo-electron microscopy domain.

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

↑