“Rate-Optimal” Resource-Constrained Software Pipelining

Slides:



Advertisements
Similar presentations
Thursday, March 14 Introduction to Network Flows
Advertisements

Integer Optimization Basic Concepts Integer Linear Program(ILP): A linear program except that some or all of the decision variables must have integer.
Optimization problems using excel solver
1 Material to Cover  relationship between different types of models  incorrect to round real to integer variables  logical relationship: site selection.
ECE 667 Synthesis and Verification of Digital Circuits
Hadi Goudarzi and Massoud Pedram
ECE Longest Path dual 1 ECE 665 Spring 2005 ECE 665 Spring 2005 Computer Algorithms with Applications to VLSI CAD Linear Programming Duality – Longest.
1 Chapter 11 Here we see cases where the basic LP model can not be used.
Linear Programming Problem
BA 452 Lesson B.3 Integer Programming 11ReadingsReadings Chapter 7 Integer Linear Programming.
Linear Programming Models & Case Studies
Coverage by Directional Sensors Jing Ai and Alhussein A. Abouzeid Dept. of Electrical, Computer and Systems Engineering Rensselaer Polytechnic Institute.
Introduction to Algorithms
Introduction to Linear and Integer Programming
Cpeg421-08S/final-review1 Course Review Tom St. John.
Math443/543 Mathematical Modeling and Optimization
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
A Tool for Partitioning and Pipelined Scheduling of Hardware-Software Systems Karam S Chatha and Ranga Vemuri Department of ECECS University of Cincinnati.
ECE Synthesis & Verification - LP Scheduling 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Scheduling Algorithms Analytical approach.
ECE Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Retiming.
INTRODUCTION TO LINEAR PROGRAMMING
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Solving Linear Programming Problems Using Excel Ken S. Li Southeastern Louisiana University.
FORMULATION AND GRAPHIC METHOD
Linear programming. Linear programming… …is a quantitative management tool to obtain optimal solutions to problems that involve restrictions and limitations.
Software Pipelining for Stream Programs on Resource Constrained Multi-core Architectures IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEM 2012 Authors:
Operations Research Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD4207 University of Palestine.
© J. Christopher Beck Lecture 5: Project Planning 2.
Types of IP Models All-integer linear programs Mixed integer linear programs (MILP) Binary integer linear programs, mixed or all integer: some or all of.
Linear Programming Data Structures and Algorithms A.G. Malamos References: Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
Chapter 1. Formulations 1. Integer Programming  Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program, MIP) min c’x + d’y Ax +
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2015 Architecture Synthesis (Provisioning, Allocation)
Resource Mapping and Scheduling for Heterogeneous Network Processor Systems Liang Yang, Tushar Gohad, Pavel Ghosh, Devesh Sinha, Arunabha Sen and Andrea.
1 Iterative Integer Programming Formulation for Robust Resource Allocation in Dynamic Real-Time Systems Sethavidh Gertphol and Viktor K. Prasanna University.
ELEC692 VLSI Signal Processing Architecture Lecture 3
Integer Programming (정수계획법)
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
OPTIMIZING DSP SCHEDULING VIA ADDRESS ASSIGNMENT WITH ARRAY AND LOOP TRANSFORMATION Chun Xue, Zili Shao, Ying Chen, Edwin H.-M. Sha Department of Computer.
1 Inventory Control with Time-Varying Demand. 2  Week 1Introduction to Production Planning and Inventory Control  Week 2Inventory Control – Deterministic.
CDAE Class 12 Oct. 4 Last class: 2. Review of economic and business concepts Today: 3. Linear programming and applications Quiz 3 (sections 2.5 and.
LINEAR PROGRAMMING.
1 Optimization Techniques Constrained Optimization by Linear Programming updated NTU SY-521-N SMU EMIS 5300/7300 Systems Analysis Methods Dr.
Linear Programming Short-run decision making model –Optimizing technique –Purely mathematical Product prices and input prices fixed Multi-product production.
LINEAR PROGRAMMING 3.4 Learning goals represent constraints by equations or inequalities, and by systems of equations and/or inequalities, and interpret.
Workload Clustering for Increasing Energy Savings on Embedded MPSoCs S. H. K. Narayanan, O. Ozturk, M. Kandemir, M. Karakoy.
Review for E&CE Find the minimal cost spanning tree for the graph below (where Values on edges represent the costs). 3 Ans. 18.
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.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
1 2 Linear Programming Chapter 3 3 Chapter Objectives –Requirements for a linear programming model. –Graphical representation of linear models. –Linear.
CS4234 Optimiz(s)ation Algorithms L2 – Linear Programming.
Scheduling Determines the precise start time of each task.
deterministic operations research
Ph.D. in Computer Science
The minimum cost flow problem
Data Dependence, Parallelization, and Locality Enhancement (courtesy of Tarek Abdelrahman, University of Toronto)
Chapter 6. Large Scale Optimization
Integer Programming (정수계획법)
Loop Scheduling and Software Pipelining
Integrated Systems Centre © Giovanni De Micheli – All rights reserved
TRLabs & University of Alberta © Wayne D. Grover 2002, 2003, 2004
Chapter 12 Software Optimisation
Integer Programming (정수계획법)
Dr. Arslan Ornek DETERMINISTIC OPTIMIZATION MODELS
1.6 Linear Programming Pg. 30.
Flexible Assembly Systems
Lecture 6 – Integer Programming Models
Chapter 1. Formulations.
Chapter 6. Large Scale Optimization
Presentation transcript:

“Rate-Optimal” Resource-Constrained Software Pipelining 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Objectives Establish good bounds Help compiler writers Help architects Study pragmatic issues when implemented as an option of compilers Study its payoffs 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

A Motivating Example for i = 0 to n do 0: a [i] = X + d [i - 2]; 1: b [i] = a [i] * F + f [i - 2] + e [i - 2]; 2: c [i] = Y - b [i]; 3: d [i] = 2 * c [i]; 4: e [i] = X - b [i]; 5: f [i] = Y + b [i] end 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Assume all statements have a delay = 1 2 L: for ( i = 0; i < n; i ++) { 3 S : a [i] = X + d [i - 2]; S : b [i] = a [i] * F + f [i - 2] + e [i - 2]; 1 S : c [i] = Y - b [i]; 1 2 2 S : d [i] = 2 * c [i]; 3 2 2 S : e [i] = X - b [i]; 4 4 5 S : f [i] = Y + b [i] 5 } Data Dependence Graph Program Representation Assume all statements have a delay = 1 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Question How fast can L run (I.e.optimal computation rate) without resource constraints? How many FUs it needs minimally to achieve the optimal rate? 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

. Schedule A : # of FUs = 4 Schedule A: t (i, Sj) = 2i + tsj where: ts2 = ts4 = ts5 = 2 ts3 = 3 iter #1 #2 #3 . . . S 1 S 1 2 S , S , S S 2 4 5 3 S S 3 1 4 S , S , S S 2 4 5 5 S S 3 1 6 S , S , S 2 4 5 7 S . 3 Schedule A : # of FUs = 4 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Can we do better? 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

. Schedule B : # of FUs = 3 Schedule B : t (i, Sj) = 2i + tsj where: ts2 = ts4 = 2 ts3 = ts5 = 3 iter #1 #2 #3 . . . S 1 S 1 2 S , S S 2 4 3 S S S 3, 5 1 4 S , S S 2 4 5 S S S 3, 5 1 6 S , S 2 4 7 S S . 3, 5 Schedule B : # of FUs = 3 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Problem Statements Assumptions: homogeneous function units Problem 0: Given a loop L, determine a “rate-optimal” schedule for L which uses minimum # of FUs. Problem I (FIxed Rate SofTware Pipelining with minimum Resource - FIRST): Given a loop L and a fixed initiation rate determine a schedule for L which uses minimum # of FUs. Problem II (REsource Constrained SofTware Pipelining - REST) Given a loop L and the # of Fus, determine an optimal schedule which can run under the given resource constraints. 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Problem Formulation of FIRST How to formulate resource constraints into a linear form? 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

all dependence constraints R is the maximum width R = Max (width) Min R Subject to: all dependence constraints R is the maximum width for a fixed rate (or period) The SWP kernel: --- The “frustum” 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Min (max ari) . R Frustum A Now R = max ari r [ 0, II - 1] time r . 1 2 . . . N-1 3 II-1 Min (max ari) R Frustum A Contribution of node i to step r’s resource requirement Now R = max ari r [ 0, II - 1] 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

FIRST: A Linear Programming Formulation Example 0 1 2 3 4 5 a00 a01 a02 a03 a04 a05 a10 a11 a12 a13 a14 a15 So for node I: ti = ki II + (aoi , a1i ) * 1 Where ari = 1 means node i start at step r = 0 otherwise 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

FIRST: A Linear Programming Formulation Minimize R Subject to R: Max T T = T Periodic Dependence Constraints and are integers 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Example Revisited . . . . . Min R R - ( a + a + a + a + a + a ) ³ R - Subjected to: R - ( a + a + a + a + a + a ) ³ 00 01 02 03 04 05 R - ( a + a + a + a + a + a ) ³ 10 11 12 13 14 15 2 × k + × a + 1 × a = t 00 10 2 × k 1 + × a + 1 × a = t 1 01 11 . 2 × k + × a + 1 × a = t 5 05 15 5 a + a = 1 00 10 a + a = 1 01 11 . a + a = 1 05 15 t - t . 1 ³ 1 . t - t 1 4 ³ - 3 t - t 1 5 ³ - 3 . t ³ , k ³ , a ³ 1 i ri 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Solution so, # of FUs = 3! Schedule C t(i, s) = 2i + ts where t0 = 0 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Linear Programming A Linear Program is a problem that can be expressed in the following form: minimize cx subject to Ax = b x >= 0 where x: vector of variables to be solved A: matrix of known coefficients c, b: vectors of known coefficients cx: it is called the objective function Ax=b is called the constraints 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Linear Programming “programming” actually means “planning” here. Importance of LP many applications the existence of good general-purpose techniques for finding optimal solutions 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Integer Linear Programming (ILP) Integer programming have proved valuable for modeling many and diverse types of problems in : planning, routing, scheduling, assignment, and design. Industry applications: transportation, energy, telecommunications, and manufacturing 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Integer Linear Programming Classification: mixed integer (part of variables) pure integer (all variables) zero-one (only takes 0 or 1) Much harder to solve Many existing tools and product solve the LP/ILP problem and get optimal solution help to model the problem, and then solve the problem 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

How to handle cases where di 1 for node i Quiz How to handle cases where di 1 for node i ? >= 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

a((r - 1)%II)i The “Trick” At time step r, the # of FUs required Contributed by node i {Started at steps in [0, (t + di-1)%II]} a((r - 1)%II)i Note: if actor i requires a FU at time r or 0 otherwise. So objective function becomes: Max Min 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

How to extend the FIRST formulation to heterogeneous function units? 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Heterogeneous Function Units Solution Hints: “weighted Sum”! For FU of type k: Mk = max " r Î [ , II - 1 ] and so, the objective should be min Ck Mk Where h is the total # of FU types Mk - 0 FU(i) = k " k Î [ , h - 1 ], " r Î [ , II - 1 ] 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Resource - constraint rate-optimal software pipelining problem Solution of the REST Resource - constraint rate-optimal software pipelining problem 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Hints Based on scheme for “FIRST” and play “trial-and improve” 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Solution Space for REST 1 2 MII = max { RecMII, ResMII} 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

MII = max {RecMII, ResMII } Note: The bounds of initiation interval 1. Loop-carried dependence constraints: 2. Resource constraints As a result: RecMII = Max cycles C d(C) m(C) ResMII = # of nodes # of FUs MII = max {RecMII, ResMII } 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt

Other Work Extend the technique to “more benchmarks” and establish “bounds” Extend the framework to include register constraints Extend the model for pipelined architectures (with structural “hazards”) Extend the model to consider superscalar and multithreaded with dynamic scheduling support. 5/26/2019 \course\cpeg421-08s\Topic-7a.ppt