核融合优化CUDA码--在BLAS上的应用
Optimizing CUDA Code By Kernel Fusion---Application on BLAS
摘要:
现代GPU能够执行比将单个字传输到全局内存或从全局内存传输更多的算术运算。因此,许多GPU内核受到内存带宽的限制,无法利用GPU的运算能力。然而,当执行一系列内核并且该序列中的一些内核共享数据时,内核融合通常可以改善存储器局部性。在本文中,我们展示了如何内核执行地图,减少或其嵌套组合可以自动融合我们的源到源编译器。为了证明编译器的可用性,我们已经实现了几个BLAS-1和BLAS-2例程,并展示了如何通过融合来提高其序列的性能。与使用CUBLAS的类似序列相比,我们的编译器生成代码的速度比测试的示例快2.61倍。
英文摘要:
Modern GPUs are able to perform significantly more arithmetic operations than transfers of a single word to or from global memory. Hence, many GPU kernels are limited by memory bandwidth and cannot exploit the arithmetic power of GPUs. However, the memory locality can be often improved by kernel fusion when a sequence of kernels is executed and some kernels in this sequence share data. In this paper, we show how kernels performing map, reduce or their nested combinations can be fused automatically by our source-to-source compiler. To demonstrate the usability of the compiler, we have implemented several BLAS-1 and BLAS-2 routines and show how the performance of their sequences can be improved by fusions. Compared to similar sequences using CUBLAS, our compiler is able to generate code that is up to 2.61x faster for the examples tested.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。