通过专业化的分阶段选择和排序提高OpenCL性能
Improving OpenCL Performance by Specializing Compiler Phase Selection and Ordering
摘要:
自动编译器阶段选择/排序传统上集中在CPU上,在较小程度上集中在FPGA上。我们目前的实验编译阶段订购专门化的OpenCL内核针对GPU。我们使用迭代探索将15个OpenCL基准测试的LLVM阶段顺序专门化到NVIDIA GPU。我们分析生成的NVIDIA PTX代码的各种版本,以确定最显着的改进的主要原因,并提出了一组实验的结果,证明了使用特定的相位顺序的重要性。通过使用专门的编译器阶段顺序,我们能够实现比NVIDIA CUDA编译器从相同内核的CUDA版本生成的PTX和执行从源代码编译的OpenCL内核分别提高1.54倍(最高5.48倍)和1.65倍(最高5.7倍)的几何平均性能。我们还评估了OpenCL内核中代码功能的使用。更具体地说,我们评估了一种方法,通过使用1个或3个最相似的基准的编译器序列,分别在相同的OpenCL基线上实现了1.49倍和1.56倍的几何平均改进。
英文摘要:
Automatic compiler phase selection/ordering has traditionally been focused on CPUs and, to a lesser extent, FPGAs. We present experiments regarding compiler phase ordering specialization of OpenCL kernels targeting a GPU. We use iterative exploration to specialize LLVM phase orders on 15 OpenCL benchmarks to an NVIDIA GPU. We analyze the generated NVIDIA PTX code for the various versions to identify the main causes of the most significant improvements and present results of a set of experiments that demonstrate the importance of using specific phase orders. Using specialized compiler phase orders, we were able to achieve geometric mean improvements of 1.54x (up to 5.48x) and 1.65x (up to 5.7x) over PTX generated by the NVIDIA CUDA compiler from CUDA versions of the same kernels, and over execution of the OpenCL kernels compiled from source with the NVIDIA OpenCL driver, respectively. We also evaluate the use of code-features in the OpenCL kernels. More specifically, we evaluate an approach that achieves geometric mean improvements of 1.49x and 1.56x over the same OpenCL baseline, by using the compiler sequences of the 1 or 3 most similar benchmarks, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。