GPU程序的最优与启发式最小寄存器调度算法
Optimal and Heuristic Min-Reg Scheduling Algorithms for GPU Programs
AI总结:
本文研究GPU指令调度中的最小寄存器调度问题,通过将其建模为约束规划问题利用CP-SAT求解器求得最优解,并基于最优解设计启发式方法应用于列表调度算法,平均寄存器压力比最优值高约17%。
摘要:
给定一个基本块指令,寻找一个评估时所需寄存器数量最少的调度方案是一个众所周知的问题。当指令间的依赖关系形成有向无环图而非树时,该问题是NP完全的。我们努力寻找该问题的高效近似算法,不仅仅因为它是理论上一个有趣的图优化问题。该问题的良好解决方案也是解决GPU上更复杂的指令调度问题的关键组成部分。在本文中,我们首先解释了为什么该问题在GPU指令调度中很重要。然后我们探索了两种不同的方法来解决该问题。首先,我们将该问题建模为约束规划问题。使用最先进的CP-SAT求解器,我们可以在一台普通的台式PC上找到比以往工作大得多的实例的最优解。其次,在最优解的指导下,我们设计并评估了可应用于多项式时间列表调度算法的启发式方法。这些启发式方法的组合可以实现平均比最优最小值高约17%的寄存器压力结果。然而,仍有近6%的案例中,启发式方法的寄存器压力比最优最小值高50%。
英文摘要:
Given a basic block of instructions, finding a schedule that requires the minimum number of registers for evaluation is a well-known problem. The problem is NP-complete when the dependences among instructions form a directed-acyclic graph instead of a tree. We are striving to find efficient approximation algorithms for this problem not simply because it is an interesting graph optimization problem in theory. A good solution to this problem is also an essential component in solving the more complex instruction scheduling problem on GPU. In this paper, we start with explanations on why this problem is important in GPU instruction scheduling. We then explore two different approaches to tackling this problem. First we model this problem as a constraint-programming problem. Using a state-of-the-art CP-SAT solver, we can find optimal answers for much larger cases than previous works on a modest desktop PC. Second, guided by the optimal answers, we design and evaluate heuristics that can be applied to the polynomial-time list scheduling algorithms. A combination of those heuristics can achieve the register-pressure results that are about 17\% higher than the optimal minimum on average. However, there are still near 6\% cases in which the register pressure by the heuristic approach is 50\% higher than the optimal minimum.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。