CLtune:一个通用的OpenCL内核自动调优器
CLTune: A Generic Auto-Tuner for OpenCL Kernels
摘要:
这项工作提出了CLTune,OpenCL内核的自动调谐器。它评估和调整一个通用的,用户定义的可能的参数-值组合的搜索空间的内核性能。示例参数包括OpenCL的大小、矢量数据类型、图块大小和循环展开因子。CLTune可用于以下场景:1)当有太多可调参数需要手动探索时,2)当需要跨OpenCL设备的性能可移植性时,或3)当最佳参数基于输入参数值(例如矩阵维度)而更改时。自动调谐器是通用的,易于使用,开源,并支持多种搜索策略,包括模拟退火和粒子群优化。CLTune是在两个GPU案例研究上进行评估的,这两个案例研究的灵感来自于最近在深度学习方面取得的成功:2D卷积和矩阵乘法(GEMM)。对于2D卷积,我们通过优化不同的滤波器大小来证明自动调整的必要性,从而实现与最先进技术相当或更好的性能。对于矩阵乘法,我们使用CLTune探索超过20万个配置的参数空间,我们证明了特定于设备的调整的必要性,并且在NVIDIA,AMD和Intel GPU上的性能优于clBLAS库。
英文摘要:
This work presents CLTune, an auto-tuner for OpenCL kernels. It evaluates and tunes kernel performance of a generic, user-defined search space of possible parameter-value combinations. Example parameters include the OpenCL workgroup size, vector data-types, tile sizes, and loop unrolling factors. CLTune can be used in the following scenarios: 1) when there are too many tunable parameters to explore manually, 2) when performance portability across OpenCL devices is desired, or 3) when the optimal parameters change based on input argument values (e.g. matrix dimensions). The auto-tuner is generic, easy to use, open-source, and supports multiple search strategies including simulated annealing and particle swarm optimisation. CLTune is evaluated on two GPU case-studies inspired by the recent successes in deep learning: 2D convolution and matrix-multiplication (GEMM). For 2D convolution, we demonstrate the need for auto-tuning by optimizing for different filter sizes, achieving performance on-par or better than the state-of-the-art. For matrix-multiplication, we use CLTune to explore a parameter space of more than two-hundred thousand configurations, we show the need for device-specific tuning, and outperform the clBLAS library on NVIDIA, AMD and Intel GPUs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。