Winter 2005ICS 252-Intro to Computer Design ICS 252 Introduction to Computer Design Lecture 5-Scheudling Algorithms Winter 2005 Eli Bozorgzadeh Computer.

Slides:



Advertisements
Similar presentations
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 19: November 21, 2005 Scheduling Introduction.
Advertisements

ECE 667 Synthesis and Verification of Digital Circuits
ECE Longest Path dual 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality – Longest.
Architecture-dependent optimizations Functional units, delay slots and dependency analysis.

Introduction to Algorithms
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
Optimal Instruction Scheduling for Multi-Issue Processors using Constraint Programming Abid M. Malik and Peter van Beek David R. Cheriton School of Computer.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
COE 561 Digital System Design & Synthesis Scheduling Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals.
Introduction to Data Flow Graphs and their Scheduling Sources: Gang Quan.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 10: RC Principles: Software (3/4) Prof. Sherief Reda.
Lecture 4 Data-Flow Scheduling Forrest Brewer. Data Flow Model Hierarchy Kahn Process Networks (KPN) (asynchronous task network) Dataflow Networks –special.
Modern VLSI Design 2e: Chapter 8 Copyright  1998 Prentice Hall PTR Topics n High-level synthesis. n Architectures for low power. n Testability and architecture.
Clock Skewing EECS 290A Sequential Logic Synthesis and Verification.
The Out of Kilter Algorithm in Introduction The out of kilter algorithm is an example of a primal-dual algorithm. It works on both the primal.
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 17: April 2, 2008 Scheduling Introduction.
ECE Synthesis & Verification - Lecture 2 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Scheduling.
COE 561 Digital System Design & Synthesis Architectural Synthesis Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
ECE Synthesis & Verification - Lecture 3 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Scheduling.
Courseware High-Level Synthesis an introduction Prof. Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Approximation Algorithms
Chapter 10: Iterative Improvement
EDA (CS286.5b) Day 11 Scheduling (List, Force, Approximation) N.B. no class Thursday (FPGA) …
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
ICS 252 Introduction to Computer Design Fall 2006 Eli Bozorgzadeh Computer Science Department-UCI.
COE 561 Digital System Design & Synthesis Resource Sharing and Binding Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
SCHEDULING SOURCES- Mark Manwaring Kia Bazargan Giovanni De Micheli Gupta Youn-Long Lin M. Balakrishnan Camposano, J. Hofstede, Knapp, MacMillen Lin.
ECE Synthesis & Verification - Lecture 4 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Circuits Allocation:
ICS 252 Introduction to Computer Design
ECE Synthesis & Verification - LP Scheduling 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Scheduling Algorithms Analytical approach.
Fall 2006EE VLSI Design Automation I VII-1 EE 5301 – VLSI Design Automation I Kia Bazargan University of Minnesota Part VII: High Level Synthesis.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Introduction to Data Flow Graphs and their Scheduling Sources: Gang Quan.
Universität Dortmund  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Hardware/software partitioning  Functionality to be implemented in software.
Register-Transfer (RT) Synthesis Greg Stitt ECE Department University of Florida.
COE 561 Digital System Design & Synthesis Architectural Synthesis Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum.
Decision Procedures An Algorithmic Point of View
ENCI 303 Lecture PS-19 Optimization 2
© J. Christopher Beck Lecture 5: Project Planning 2.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 12: February 13, 2002 Scheduling Heuristics and Approximation.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
ICS 252 Introduction to Computer Design Lecture 9 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
ICS 252 Introduction to Computer Design Lecture 10 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
High-Level Synthesis-II Virendra Singh Indian Institute of Science Bangalore IEP on Digital System IIT Kanpur.
1 Iterative Integer Programming Formulation for Robust Resource Allocation in Dynamic Real-Time Systems Sethavidh Gertphol and Viktor K. Prasanna University.
ICS 252 Introduction to Computer Design Lecture 12 Winter 2004 Eli Bozorgzadeh Computer Science Department-UCI.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
L12 : Lower Power High Level Synthesis(3) 성균관대학교 조 준 동 교수
CS 3343: Analysis of Algorithms Lecture 19: Introduction to Greedy Algorithms.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Carnegie Mellon Lecture 8 Software Pipelining I. Introduction II. Problem Formulation III. Algorithm Reading: Chapter 10.5 – 10.6 M. LamCS243: Software.
ICS 252 Introduction to Computer Design Lecture 8- Heuristics for Two-level Logic Synthesis Winter 2005 Eli Bozorgzadeh Computer Science Department-UCI.
Approximation Algorithms based on linear programming.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Scheduling Determines the precise start time of each task.
Scheduling Algorithms
ICS 252 Introduction to Computer Design
Integrated Systems Centre © Giovanni De Micheli – All rights reserved
ICS 252 Introduction to Computer Design
EE5900 Advanced Embedded System For Smart Infrastructure
ICS 252 Introduction to Computer Design
ICS 252 Introduction to Computer Design
CSE 417: Algorithms and Computational Complexity
Chapter 10: Iterative Improvement
Reconfigurable Computing (EN2911X, Fall07)
Linear Constrained Optimization
Presentation transcript:

Winter 2005ICS 252-Intro to Computer Design ICS 252 Introduction to Computer Design Lecture 5-Scheudling Algorithms Winter 2005 Eli Bozorgzadeh Computer Science Department-UCI

Winter 2005ICS 252-Intro to Computer Design References Lecture notes by Kia Bazargan on High level Synthesis [©Bazargan] – Lecture note by Rajesh Gupta on scheduling [©Gupta] – Chapter 5 ( ) of the textbook

Winter 2005ICS 252-Intro to Computer Design Scheduling Without resource constraint –Unconstrained Scheduling: ASAP –Latency-constrained scheduling :ALAP –Scheduling under timing constraint With resource constraint –Exact: ILP model –Heuristic: List scheduling, force-directed scheduling, etc.

Winter 2005ICS 252-Intro to Computer Design ASAP Scheduling Schedule each operation as-soon-as- possible NOP * * * * * * + +< Time 1 Time 2 Time 3 Time 4

Winter 2005ICS 252-Intro to Computer Design ALAP scheduling Schedule each operation as late as possible under given latency NOP * * * * * * + +< Time 1 Time 2 Time 3 Time 4

Winter 2005ICS 252-Intro to Computer Design Quick overview Tasks in high-level synthesis –Scheduling √ –Allocation –Binding Scheduling –Without resource constraint √ –With resource constraint (next) ILP model: exact solution List scheduling, force-directed scheduling: heuristic

Winter 2005ICS 252-Intro to Computer Design Resource Constraint Scheduling Constrained scheduling –General case NP-complete –Minimize latency given constraints on area or the resources (ML-RCS) –Minimize resources subject to bound on latency (MR- LCS) Exact solution methods: –Integer linear programming (ILP) model –Hu’s algorithm Heuristics: –List scheduling –Force-directed scheduling [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design ILP model for scheduling problem Binary variable x il –x il =1 if start time of operation i is at time l –x il =0 otherwise Constraints: set of linear inequalities –Uniqueness of start time for each operation ∑x il = 1 i =0,1…,n How to compute t i, start time of operation i ? –Sequencing relation

Winter 2005ICS 252-Intro to Computer Design Start Time vs. Execution Time For each operation v i, only one start time If d i =1, then the following questions are the same: –Does operation v i start at step l ? –Is operation v i running at step l ? But if d i >1, then the two questions should be formulated as: –Does operation v i start at step l ? Does x il = 1 hold? –Is operation v i running at step l ? Does the following hold? ? [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Operation v i Still Running at Step l ? Is v 9 running at step 6? –Is x 9,6 + x 9,5 + x 9,4 = 1 ? Note: –Only one (if any) of the above three cases can happen –To meet resource constraints, we have to ask the same question for ALL steps, and ALL operations of that type v9v x 9,4 =1 v9v x 9,5 =1 v9v x 9,6 =1 [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Operation v i Still Running at Step l ? Is v i running at step l ? –Is x i,l + x i,l x i,l-di+1 = 1 ? vivi l l-1 l-d i x i,l-di+1 =1 vivi l l-1 l-d i x i,l-1 =1 vivi l l-1 l-d i x i,l =1... [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design ILP Model (cont’d) Constraints (cont’d) –Resource bound at each time step of scheduling Objective –Minimize c T t –t = vector of start time of operations

Winter 2005ICS 252-Intro to Computer Design ILP Example Assume = 4 First, perform ASAP and ALAP –(we can write the ILP without ASAP and ALAP, but using ASAP and ALAP will simplify the inequalities) + NOP   +<      +< v2v1 v3 v4 v5 vn v6 v7 v8 v9 v10 v11 v2 v1 v3 v4 v5 vn v6 v7 v8 v9 v10 v11 [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design ILP Example: Unique Start Times Constraint Without using ASAP and ALAP values: Using ASAP and ALAP: [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design ILP Example: Dependency Constraints Using ASAP and ALAP, the non-trivial inequalities are: (assuming unit delay for + and *) [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design ILP Example: Resource Constraints Resource constraints (assuming 2 adders and 2 multipliers) Objective: –Since =4 and sink has no mobility, any feasible solution is optimum, but we can use the following anyway: [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design ILP Formulation of MR-LCS Dual problem to ML-RCS Objective: –Goal is to optimize total resource usage, a. –Objective function is c T a, where entries in c are respective area costs of resources Constraints: –Same as ML-RCS constraints, plus: –Latency constraint added: –Note: unknown a k appears in constraints. [©Gupta]

Winter 2005ICS 252-Intro to Computer Design Hu’s Algorithm Simple case of the scheduling problem –Operations of unit delay –Operations (and resources) of the same type Hu’s algorithm –Greedy –Polynomial AND optimal –Computes lower bound on number of resources for a given latency OR: computes lower bound on latency subject to resource constraints Basic idea: –Label operations based on their distances from the sink –Try to schedule nodes with higher labels first (i.e., most “critical” operations have priority) [©Gupta]

Winter 2005ICS 252-Intro to Computer Design Hu’s Algorithm HU (G(V,E), a) { Label the vertices // label = length of longest path passing through the vertex l = 1 repeat { U = unscheduled vertices in V whose predecessors have been scheduled (or have no predecessors) Select S  U such that |S|  a and labels in S are maximal Schedule the S operations at step l by setting t i =l, i: v i  S. l = l + 1 } until v n is scheduled. } [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Hu’s Algorithm: Example [©Gupta]

Winter 2005ICS 252-Intro to Computer Design List Scheduling Greedy algorithm for ML-RCS and MR-LCS –Does NOT guarantee optimum solution Similar to Hu’s algorithm –Operation selection decided by criticality –O(n) time complexity More general input –Resource constraints on different resource types [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design List Scheduling Algorithm: ML-RCS LIST_L (G(V,E), a) { l = 1 repeat { for each resource type k { U l,k = available vertices in V. T l,k = operations in progress. Select S k  U l,k such that | S k | + | T l,k |  a k Schedule the S k operations at step l } l = l + 1 } until v n is scheduled. } [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design List Scheduling Example [©Gupta]

Winter 2005ICS 252-Intro to Computer Design List Scheduling Algorithm: MR-LCS LIST_R (G(V,E), ’) { a = 1, l = 1 Compute the ALAP times t L. if t 0 L < 0 return (not feasible) repeat { for each resource type k { U l,k = available vertices in V. Compute the slacks { s i = t i L - l,  v i  U l,k }. Schedule operations with zero slack, update a Schedule additional S k  U l,k under a constraints } l = l + 1 } until v n is scheduled. } [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Force-Directed Scheduling Similar to list scheduling –Can handle ML-RCS and MR-LCS –For ML-RCS, schedules step-by-step –BUT, selection of the operations tries to find the globally best set of operations Idea: –Find the mobility  i = t i L – t i S of operations –Look at the operation type probability distributions –Try to flatten the operation type distributions Definition: operation probability density –p i ( l ) = Pr { v i starts at step l }. –Assume uniform distribution: [©Gupta]

Winter 2005ICS 252-Intro to Computer Design Force-Directed Scheduling: Definitions Operation-type distribution (NOT normalized to 1) – Operation probabilities over control steps: – Distribution graph of type k over all steps: – – q k ( l ) can be thought of as expected operator cost for implementing operations of type k at step l. [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Example + NOP   +< [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Force-Directed Scheduling Algorithm: Idea Very similar to LIST_L(G(V,E), a) –Compute mobility of operations using ASAP and ALAP –Computer operation probabilities and type distributions –Select and schedule operations –Update operation probabilities and type distributions –Go to next control step Difference with list scheduling in selecting operations –Select operations with least force –Consider the effect on the type distribution –Consider the effect on successor nodes and their type distributions [©Bazargan]

Winter 2005ICS 252-Intro to Computer Design Summary Architectural Synthesis –Scheduling –Binding and resource allocation –Challenge: Area/performance trade-off Scheduling –Without resource constraints –With resource constraints Exact solution Heuristics Next: Resource sharing and binding