120 likes | 243 Vues
This study explores the use of integer programming to create optimal instruction schedules focusing on single-execution constraints and resource limitations. By defining variables for each instruction, start time, and functional unit, we aim to optimize the schedule length while adhering to constraints like data dependencies and execution unit availability. The research employs random data dependency trees to evaluate preliminary results, showing that optimal scheduling is possible for basic blocks of approximately 10 instructions. Alternative methods, including heuristics, are also considered for locally optimal schedules.
E N D
An Integer Programming Approach to Instruction Scheduling Matt Streeter Carsten Schwicking
Objective • To use integer programming to obtain optimal instruction schedules • Assume partioning has already been done (copies inserted, etc.)
Optimization & Constraints • Optimize schedule length • Constraints • Single execution (of each instruction) • Resource • Data dependence • Not yet dealing with crossbar constraint
Formulation Source • Daniel Kaestner and Sebastian Winkel. “ILP-based Instruction Scheduling for IA-64,” in LCTES 2001. • Used a real multiple issue architecture • IA-64 has VLIW characteristics
Integer Programming Formulation • Define a variable for each possible instruction, start time, and function unit tuple • Xkm t {0,1} • m = instruction id • t = start time (cycle #) • k = execution unit #
Constraints:Resource • Rk = # of execution units of type k • R(n) = all possible execution units for n
Constraints:Data Dependence • where n must not execute until m finishes
Preliminary results • Generated random data dependency trees • Each node has degree chosen uniformly at random from {0, 1, 2, 3}; durations chosen from {1, 2, 3, 4}; function unit assigned at random • 4 function units, one of each type • Maximum height H (=6 here)
Preliminary results • Optimal scheduling only feasible for basic blocks of ~10 instructions • An alternative is to search for locally optimal schedules
Preliminary results • Use simple heuristic (list scheduling) to generate a “center” schedule • Until 10 seconds have elapsed: • For r from 1 to rmax do: • Generate optimal schedule subject to the constraint that the cycle assigned to each instruction is within a distance r of the cycle assigned by the center schedule