Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 57 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
57
Dung lượng
287,94 KB
Nội dung
c 2007 MICHAEL EDWIN RICHTER ALL RIGHTS RESERVED VARIATIONS ON ROTATION SCHEDULING A Thesis Presented to The Graduate Faculty of The University of Akron In Partial Fulfillment of the Requirements for the Degree Master of Science Michael Edwin Richter August, 2007 VARIATIONS ON ROTATION SCHEDULING Michael Edwin Richter Thesis Accepted: Approved: Advisor Dean of the College Dr. Timothy W. O’Neil Dr. Ronald F. Levant Faculty Reader Dean of the Graduate School Dr. Kathy J. Liszka Dr. George R. Newkome Faculty Reader Date Dr. Zhong-Hui Duan Department Chair Dr. Wolfgang Pelz ii ABSTRACT The best way to increase the overall speed of a process is to increase the speed of the part of the process that takes the most time. Effective parallelization of iterative processes has been a focus of research, since the vast majority of computation performed by modern systems is iterative. For an iterative process to be parallelized, the operations that comprise the process must be organized into a schedule that will allow the hardware to correctly execute the instructions. The focus of our research is rotation scheduling, a list-scheduling- based method for producing compact, static schedules for iterative processes on parallel hardware. We develop a technique called rotation span to compute the complete space of schedules that can be produced by rotation scheduling. We use rotation span as a basis of comparison for priority functions that can be used in rotation scheduling. We present three new heuristics based on rotation scheduling, half-rotation, random rotation, and best span, and compare them with existing methods. We discuss problems with existing methods, and show that random rotation is an effective alternative that avoids these problems. iii TABLE OF CONTENTS Page LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii LIST OF ALGORITHMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii CHAPTER I. INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Rotation Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 II. BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 Directed Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Data-Flow Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Schedule Length Minimization . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 Retiming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6 Rotation Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.7 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 iv III. METHODOLOGY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 Rotation Span . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3 Alternative Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 IV. EXPERIMENTAL RESULTS . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.1 Example DFGs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.2 Rotation Scheduling Results . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.3 Comparison of Priority Functions . . . . . . . . . . . . . . . . . . . . . . 33 4.4 Performance of RS2 Compared Random Rotation . . . . . . . . . . . . . 35 4.5 Dependence of RS2 on δ and ρ . . . . . . . . . . . . . . . . . . . . . . . 37 4.6 Computation Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.7 Other Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 V. CONCLUSIONS AND FUTURE WORK . . . . . . . . . . . . . . . . . . . . 42 5.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 5.2 Future Developments . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.3 Future Directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 BIBLIOGRAPHY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 v LIST OF TABLES Table Page 4.1 Characteristics of the DFGs in our Test Cases . . . . . . . . . . . . . . . . . . . 31 4.2 Shortest Schedule Lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.3 Size of the Space of Schedules Computed by Rotation Span . . . . . . . . . . . 34 4.4 Ratio of Optimal Schedules found by Rotation Span . . . . . . . . . . . . . . . 35 4.5 Performance of Random Rotations on Elliptic Filter on Two Multipliers and Three Adders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.6 Random Rotations on the Differential Equation Solver on Two Multipliers and One Adder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 4.7 RS2 on Differential Equation Solver on Two Multipliers and One Adder . . . . . 38 4.8 Computation Time in Milliseconds . . . . . . . . . . . . . . . . . . . . . . . . 40 vi LIST OF FIGURES Figure Page 2.1 Initial graph G(V, E, t, d) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2 Graph G(V, E, t, d) after one down rotation . . . . . . . . . . . . . . . . . . . . 19 4.1 Data-Flow Graphs for Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . 31 vii LIST OF ALGORITHMS Algorithm Page 2.1 down rotate(G, S G , ℓ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 rotation phase(G, S G , ℓ, δ, S best ) . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3 RS1(G, δ, ρ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4 RS2(G, δ, ρ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1 rotation span(G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2 random rotation(G, iterations) . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.3 half rotation(G, iterations) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4 best span(G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 viii CHAPTER I INTRODUCTION Our search for knowledge is expressed in part by our growing thirst for computational power. As our techniques for processor fabrication approach theoretical speed limits, we must develop paradigms that embrace computations in parallel. In this work, we examine one facet of parallelism: improvement of static schedules for iterative processes on parallel hardware using a technique called rotation scheduling. 1.1 Rotation Scheduling Iterative processes are composed of a sequence of operations that are repeated over and over. These operations are related: the output from one operation is passed as the input to another, and so on. An operation cannot be executed before the operations on which it depends have completed. These dependencies describe how the data must flow from operation to operation, and these relationships can be expressed in a data-flow graph or DFG. Each operation in the process is represented by a vertex in the DFG. Each dependence of one operation upon another is represented by a directed edge in the DFG. In order for a process described by a DFG to be computed on general-purpose hardware, a valid order for the operations must be found. We are only concerned with a fixed ordering. This ordering is formalized as a static schedule, which specifies astart time for every vertex. Once a valid static schedule is found for a DFG, the operations can be executed correctly in that order, over and over. For some DFGs, some operations can be executed independently 1 [...]... presentation of methods involved in rotation scheduling 2 We describe a method, called rotation span, that finds all possible schedules that can be obtained from an initial schedule using down rotations 3 We use rotation span to compare several well known priority functions used in list scheduling in terms of their effects upon rotation scheduling 4 We develop two rotation scheduling heuristics, half -rotation. .. iteration bound or the ceiling of the resource bound 3.3 Alternative Heuristics There are two basic elements in rotation scheduling: down rotation, and the heuristic that controls application of down rotations Rotation scheduling could be improved by 25 modifying down rotation to more thoroughly span the set of valid schedules Knowledge of the entire space would provide perspective on how well down rotation. .. combining rotation scheduling with other methods In the original work [1], little explanation is given for the design of the methods involved The focus of our research is examination and improvement of the fundamental methods in rotation scheduling 3 1.2 Contributions We present several contributions that are centered around using down rotations for the compaction of static schedules for cyclic processes on. .. calculation within the algorithms The primitive operation in rotation scheduling is the down rotation A down rotation of size ℓ extracts all of the vertices that are scheduled within the first ℓ time-steps of the schedule This set of vertices is then retimed by 1, which decrements the delays by one on all incoming edges, and increments the delays by one on all outgoing edges Thus, down rotations are... comprise rotation scheduling We also provide an example to demonstrate these ideas With this background, we present basic elements and the details of our implementation in chapter 3 We describe AEAP scheduling, ALAP scheduling, and priority functions derived from them, as well as several other priority functions We describe rotation span, a method for finding all possible results from rotation scheduling. .. down rotation of size equal to the length of the schedule This means that all of the graph and schedule transformations in RS2 (as well as RS1) can be described by down rotations The complete subset can be constructed by recursively applying every valid-sized down rotation to each schedule Down rotations can have size as small as 1, and given our prior discussion about full scheduling, down rotations... of functional unit is only capable of computing one type of operation Further, all functional units of a particular type are equivalent, each requiring the same amount of time to compute one operation All of the operations of a particular type can only be computed by the appropriate functional units This provides a lower bound on schedule length that takes resource constraints into consideration The... down rotations that rotations large enough to rely on vertex priorities would be more useful Repeatedly applying rotations that are precisely half the length of the current 26 Algorithm 3.2 random rotation( G, iterations) Input: G is a DFG, iterations is the number of random down rotations to apply Output: the shortest known schedule in Sbest SG ← list schedule(G) Sbest ← SG for i = 1 to iterations do... schedule long cycle For comparison we tried a method we call half -rotation that produces an initial DAG schedule and then cumulatively applies some number of down rotations with size s slightly larger than half the length of the current schedule Half -rotation is detailed in Algorithm 3.3 Algorithm 3.3 half rotation( G, iterations) Input: G is a DFG, iterations is the number of down rotations to apply... that, after a sequence of small down rotations, the new schedule will be equivalent to a DAG schedule of the retimed graph It is interesting to note that in doing a full rescheduling after each rotation phase, the down rotations are only used to retime the DFG Again, any improvements to schedule length made during either the rotation phases, or as a consequence of rescheduling G are recorded RS2 is described . basis of comparison for priority functions that can be used in rotation scheduling. We present three new heuristics based on rotation scheduling, half -rotation, random rotation, and best span, and. down rotations. 3. We use rotation span to compare several well known priority functions used in list scheduling in terms of their effects upon rotation scheduling. 4. We develop two rotation scheduling. examination and improvement of the fundamental methods in rotation scheduling. 3 1.2 Contributions We present several contributions that are centered around using down rotations for the compaction