arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1701.08547cs.DCcs.PF
收藏

通过静态和预测分析自动调整GPU内核

Autotuning GPU Kernels via Static and Predictive Analysis

Robert V. Lim, Boyana Norris, Allen D. Malony

摘要:

优化GPU内核的性能对于人类程序员和代码生成器来说都是一个挑战。例如,CUDA程序员必须为内核设置线程和块参数,但可能没有直觉做出正确的选择。类似地,编译器可以生成工作代码,但是可能由于不针对GPU模型或执行代码转换而错过调优机会。虽然经验自动调优解决了其中的一些挑战,但它需要大量的实验和搜索最佳代码变体。本文提出了一种基于静态分析的CUDA内核优化方法,该方法考虑了GPU的细粒度代码结构和特定的GPU架构特征。值得注意的是,我们的方法不需要任何程序运行,以发现接近最佳的参数设置。我们证明了我们的方法的适用性,使代码自动调谐器,如Orio产生有竞争力的代码变体相比,基于药物的方法,没有高成本的实验。

英文摘要:

Optimizing the performance of GPU kernels is challenging for both human programmers and code generators. For example, CUDA programmers must set thread and block parameters for a kernel, but might not have the intuition to make a good choice. Similarly, compilers can generate working code, but may miss tuning opportunities by not targeting GPU models or performing code transformations. Although empirical autotuning addresses some of these challenges, it requires extensive experimentation and search for optimal code variants. This research presents an approach for tuning CUDA kernels based on static analysis that considers fine-grained code structure and the specific GPU architecture features. Notably, our approach does not require any program runs in order to discover near-optimal parameter settings. We demonstrate the applicability of our approach in enabling code autotuners such as Orio to produce competitive code variants comparable with empirical-based methods, without the high cost of experiments.

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

↑