并发GPGPU核的在线结构预测抢占式线程块调度
Preemptive Thread Block Scheduling with Online Structural Runtime Prediction for Concurrent GPGPU Kernels
摘要:
最新的NVIDIA图形处理单元(GPU)可以同时执行多个内核。在这些GPU上,线程块调度器(TBS)使用FIFO策略来调度它们的线程块。我们发现,FIFO离开性能的机会,导致显着的损失的性能和公平性。为了提高性能和公平性,我们建议使用抢占式最短剩余时间优先(SRTF)的政策。虽然SRTF需要估计的GPU内核的运行时间,我们表明,这样的估计的运行时间可以很容易地获得使用在线分析和利用一个简单的观察GPU内核的网格结构。具体来说,我们提出了一种新的结构预测。使用一个简单的阶梯模型的GPU内核执行,我们表明,内核的运行时可以预测分析只有前几个线程块。我们评估了基于该模型的在线预测器的基准测试,从ERCBench,并发现它可以合理地估计实际的运行时间后,只有一个线程块的执行。接下来,我们设计了一个线程块调度器,它是并发内核感知的,并使用这个预测器。我们实现了SRTF政策,并评估它的两个程序的工作负载从ERCBench。与FIFO相比,SRTF将STP提高了1.18倍,ANTT提高了2.25倍。与MPMax(一种最先进的并发内核资源分配策略)相比,SRTF将STP提高了1.16倍,ANTT提高了1.3倍。为了提高公平性,我们还提出了SRTF/Adaptive,它控制并发执行内核的资源使用,以最大限度地提高公平性。与FIFO相比,SRTF/Adaptive将STP提高1.12倍,ANTT提高2.23倍,公平性提高2.95倍。总的来说,我们实现的SRTF实现系统吞吐量在12.64%的最短作业优先(SJF,Oracle的最优调度策略),桥接FIFO和SJF之间的差距的49%。
英文摘要:
Recent NVIDIA Graphics Processing Units (GPUs) can execute multiple kernels concurrently. On these GPUs, the thread block scheduler (TBS) uses the FIFO policy to schedule their thread blocks. We show that FIFO leaves performance to chance, resulting in significant loss of performance and fairness. To improve performance and fairness, we propose use of the preemptive Shortest Remaining Time First (SRTF) policy instead. Although SRTF requires an estimate of runtime of GPU kernels, we show that such an estimate of the runtime can be easily obtained using online profiling and exploiting a simple observation on GPU kernels' grid structure. Specifically, we propose a novel Structural Runtime Predictor. Using a simple Staircase model of GPU kernel execution, we show that the runtime of a kernel can be predicted by profiling only the first few thread blocks. We evaluate an online predictor based on this model on benchmarks from ERCBench, and find that it can estimate the actual runtime reasonably well after the execution of only a single thread block. Next, we design a thread block scheduler that is both concurrent kernel-aware and uses this predictor. We implement the SRTF policy and evaluate it on two-program workloads from ERCBench. SRTF improves STP by 1.18x and ANTT by 2.25x over FIFO. When compared to MPMax, a state-of-the-art resource allocation policy for concurrent kernels, SRTF improves STP by 1.16x and ANTT by 1.3x. To improve fairness, we also propose SRTF/Adaptive which controls resource usage of concurrently executing kernels to maximize fairness. SRTF/Adaptive improves STP by 1.12x, ANTT by 2.23x and Fairness by 2.95x compared to FIFO. Overall, our implementation of SRTF achieves system throughput to within 12.64% of Shortest Job First (SJF, an oracle optimal scheduling policy), bridging 49% of the gap between FIFO and SJF.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。