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

自动调整支架模式的OpenCL工作组大小

Autotuning OpenCL Workgroup Size for Stencil Patterns

Chris Cummins, Pavlos Petoumenos, Michel Steuwer, Hugh Leather

摘要:

选择适当的内存大小对于OpenCL内核的性能至关重要,并且需要了解底层硬件、正在操作的数据以及内核的实现。这使得OpenCL程序的可移植性能成为一个具有挑战性的目标,因为简单的算法和静态选择的值无法利用可用的性能。为了解决这个问题,我们建议使用支持机器学习的自动调整来自动预测CPU和多GPU上的模板图案的尺寸。我们提出了三种方法来预测尺寸。第一,使用分类器来选择最佳的样本大小。第二种和第三种方法分别采用回归器的新用途,通过预测内核的运行时间和不同大小的内核的相对性能来进行分类。我们评估了每种技术的有效性,在429种架构,内核和数据集组合的实证研究中,比较了每种技术平均629种不同的数据集大小。我们发现,自动调整提供了一个中位数3.79倍的加速比最好的固定的磁盘大小,实现94%的最大性能。

英文摘要:

Selecting an appropriate workgroup size is critical for the performance of OpenCL kernels, and requires knowledge of the underlying hardware, the data being operated on, and the implementation of the kernel. This makes portable performance of OpenCL programs a challenging goal, since simple heuristics and statically chosen values fail to exploit the available performance. To address this, we propose the use of machine learning-enabled autotuning to automatically predict workgroup sizes for stencil patterns on CPUs and multi-GPUs. We present three methodologies for predicting workgroup sizes. The first, using classifiers to select the optimal workgroup size. The second and third proposed methodologies employ the novel use of regressors for performing classification by predicting the runtime of kernels and the relative performance of different workgroup sizes, respectively. We evaluate the effectiveness of each technique in an empirical study of 429 combinations of architecture, kernel, and dataset, comparing an average of 629 different workgroup sizes for each. We find that autotuning provides a median 3.79x speedup over the best possible fixed workgroup size, achieving 94% of the maximum performance.

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

↑