GPU中的Sockchpad共享
Scratchpad Sharing in GPUs
摘要:
GPGPU应用程序利用图形处理单元(GPU)中可用的片上暂存器来提高性能。GPU中存在的线程级并行性的量受到驻留线程的数量的限制,而驻留线程的数量又取决于其流式多处理器(SM)中的暂存器存储器的可用性。由于暂存存储器是以线程块粒度分配的,因此部分存储器可能未被利用。在本文中,我们提出了架构和编译器优化,以提高暂存器的利用率。我们的方法,Sockchpad共享,通过在每个SM中启动额外的线程块来解决暂存器利用率不足的问题。这些线程块使用未使用的暂存器,并且还与其他驻留块共享暂存器。为了提高暂存器共享的性能,我们提出了Owner Warp First(OWF)调度,有效地从额外的线程块调度线程束。然而,这种方法的性能受到暂存器的共享部分的可用性的限制。我们提出了编译器优化,以提高共享暂存器的可用性。我们描述了一个暂存器分配方案,有助于分配暂存器变量,使共享暂存器访问的时间很短。我们引入了一条新的指令relssp,当它被执行时,会释放共享的暂存器。最后,我们描述了一个分析relssp指令的最佳位置,以便共享暂存器被释放,尽可能早。我们使用GPGPU-Sim模拟器实现了硬件更改,并在Ocelot框架中实现了编译器优化。我们评估了我们的方法在来自3个基准套件的19个内核上的有效性:CUDA-SDK,GPGPU-Sim和Rodinia。与基线方法相比,未充分利用暂存器内存的内核显示出19%的平均改进和92.17%的最大改进。
英文摘要:
GPGPU applications exploit on-chip scratchpad memory available in the Graphics Processing Units (GPUs) to improve performance. The amount of thread level parallelism present in the GPU is limited by the number of resident threads, which in turn depends on the availability of scratchpad memory in its streaming multiprocessor (SM). Since the scratchpad memory is allocated at thread block granularity, part of the memory may remain unutilized. In this paper, we propose architectural and compiler optimizations to improve the scratchpad utilization. Our approach, Scratchpad Sharing, addresses scratchpad under-utilization by launching additional thread blocks in each SM. These thread blocks use unutilized scratchpad and also share scratchpad with other resident blocks. To improve the performance of scratchpad sharing, we propose Owner Warp First (OWF) scheduling that schedules warps from the additional thread blocks effectively. The performance of this approach, however, is limited by the availability of the shared part of scratchpad. We propose compiler optimizations to improve the availability of shared scratchpad. We describe a scratchpad allocation scheme that helps in allocating scratchpad variables such that shared scratchpad is accessed for short duration. We introduce a new instruction, relssp, that when executed, releases the shared scratchpad. Finally, we describe an analysis for optimal placement of relssp instructions such that shared scratchpad is released as early as possible. We implemented the hardware changes using the GPGPU-Sim simulator and implemented the compiler optimizations in Ocelot framework. We evaluated the effectiveness of our approach on 19 kernels from 3 benchmarks suites: CUDA-SDK, GPGPU-Sim, and Rodinia. The kernels that underutilize scratchpad memory show an average improvement of 19% and maximum improvement of 92.17% compared to the baseline approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。