CALTECH CS137 Winter2002 -- DeHon CS137: Electronic Design Automation Day 11: February 11, 2002 Scheduling Introduction.

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
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 22: December 2, 2005 Routing 2 (Pathfinder)
Traveling Salesperson Problem
EDA (CS286.5b) Day 10 Scheduling (Intro Branch-and-Bound)
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: February 23, 2011 Routing 2 (Pathfinder)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 11, 2015 Scheduling Introduction.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
EE 553 Integer Programming
Lecture 10: Integer Programming & Branch-and-Bound
Branch & Bound Algorithms
Winter 2005ICS 252-Intro to Computer Design ICS 252 Introduction to Computer Design Lecture 5-Scheudling Algorithms Winter 2005 Eli Bozorgzadeh Computer.
CPSC 322, Lecture 9Slide 1 Search: Advanced Topics Computer Science cpsc322, Lecture 9 (Textbook Chpt 3.6) January, 23, 2009.
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day17: November 20, 2000 Time Multiplexing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 17: April 2, 2008 Scheduling Introduction.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 21: April 2, 2007 Time Multiplexing.
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
Caltech CS184a Fall DeHon1 CS184a: Computer Architecture (Structures and Organization) Day8: October 18, 2000 Computing Elements 1: LUTs.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 11: February 14, 2007 Compute 1: LUTs.
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 20: April 7, 2008 Scheduling Variants and Approaches.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
EDA (CS286.5b) Day 3 Clustering (LUT Map and Delay) N.B. no lecture Thursday.
EDA (CS286.5b) Day 14 Routing (Pathfind, netflow).
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
CS294-6 Reconfigurable Computing Day 15 October 13, 1998 LUT Mapping.
EDA (CS286.5b) Day 7 Placement (Simulated Annealing) Assignment #1 due Friday.
EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.
CS294-6 Reconfigurable Computing Day 19 October 27, 1998 Multicontext.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 13, 2008 Retiming.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 13: February 4, 2005 Interconnect 1: Requirements.
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 15: February 12, 2003 Interconnect 5: Meshes.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 12: February 13, 2002 Scheduling Heuristics and Approximation.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 9: February 16, 2015 Scheduling Variants and Approaches.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 9, 2015 Scheduled Operator Sharing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 24: April 18, 2011 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2015 Architecture Synthesis (Provisioning, Allocation)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 10: February 6, 2002 Placement (Simulated Annealing…)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 7: February 3, 2002 Retiming.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Lecture 3: Uninformed Search
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 3: January 12, 2004 Clustering (LUT Mapping, Delay)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 3: January 16, 2013 Scheduled Operator Sharing.
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 15: March 4, 2002 Two-Level Logic-Synthesis.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: February 27, 2002 Routing 2 (Pathfinder)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 6: January 26, 2004 Sequential Optimization (FSM Encoding)
Lecture 17: Dynamic Reconfiguration I November 10, 2004 ECE 697F Reconfigurable Computing Lecture 17 Dynamic Reconfiguration I Acknowledgement: Andre DeHon.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 17: March 11, 2002 Sequential Optimization (FSM Encoding)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: March 1, 2003 Scheduling Introduction.
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 11: January 31, 2005 Compute 1: LUTs.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: January 31, 2011 Scheduling Variants and Approaches.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 20: November 23, 2005 Scheduling Variants and Approaches.
CS137: Electronic Design Automation
BackTracking CS255.
CS184a: Computer Architecture (Structure and Organization)
CS137: Electronic Design Automation
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
CS137: Electronic Design Automation
Presentation transcript:

CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 11: February 11, 2002 Scheduling Introduction

CALTECH CS137 Winter DeHon Today Scheduling –Basic problem –variants –branching –bounds –and pruning

CALTECH CS137 Winter DeHon General Problem Resources are not free –wires, io ports –functional units LUTs, ALUs, Multipliers, …. –memory locations –memory access ports

CALTECH CS137 Winter DeHon Trick/Technique Resources can be shared (reused) in time Sharing resources can reduce –instantaneous resource requirements –total costs (area)

CALTECH CS137 Winter DeHon Example

CALTECH CS137 Winter DeHon Sharing Does not have to increase delay –w/ careful time assignment –can often reduce peak resource requirements –while obtaining original (unshared) delay Alternately: Minimize delay given fixed resources

CALTECH CS137 Winter DeHon Schedule Examples time resource

CALTECH CS137 Winter DeHon More Schedule Examples

CALTECH CS137 Winter DeHon Scheduling Task: assign time slots (and resources) to operations –time-constrained: minimizing peak resource requirements n.b. time-constrained, not always constrained to minimum execution time –resource-constrained: minimizing execution time

CALTECH CS137 Winter DeHon Resource-Time Example Time Constraint: <5  -- 5  4 6,7  2 >7  1

CALTECH CS137 Winter DeHon Scheduling Use Very general problem formulation –HDL/Behavioral  RTL –Register/Memory allocation/scheduling –Time-Switched Routing TDMA, bus scheduling, static routing –Instruction/Functional Unit scheduling –Routing (share channel) –Processor tasks

CALTECH CS137 Winter DeHon Two Types (1) Data independent –graph static –resource requirements and execution time independent of data –schedule staticly –maybe bounded-time guarantees –typical ECAD problem

CALTECH CS137 Winter DeHon Two Types (2) Data Dependent –execution time of operators variable depend on data –flow/requirement of operators data dependent –if cannot bound range of variation must schedule online/dynamically cannot guarantee bounded-time general case (I.e. halting problem) –typical “General-Purpose” (non-real-time) OS problem

CALTECH CS137 Winter DeHon Unbounded Problem Easy: –compute ASAP schedule I.e. schedule everything as soon as predecessors allow –will achieve minimum time –won’t achieve minimum area (meet resource bounds)

CALTECH CS137 Winter DeHon ASAP Schedule For each input –mark input on successor –if successor has all inputs marked, put in visit queue While visit queue not empy –pick node –update time-slot based on latest input –mark inputs of all successors, adding to visit queue when all inputs marked

CALTECH CS137 Winter DeHon ASAP Example

CALTECH CS137 Winter DeHon ASAP Example

CALTECH CS137 Winter DeHon Also Useful to Define ALAP As Late As Possible Work backward from outputs of DAG Also achieve minimum time w/ unbounded resources

CALTECH CS137 Winter DeHon ALAP Example

CALTECH CS137 Winter DeHon ALAP and ASAP Difference in labeling between ASAP and ALAP is slack of node –Freedom to select timeslot If ASAP=ALAP, no freedom to schedule

CALTECH CS137 Winter DeHon Why hard? 3 units

CALTECH CS137 Winter DeHon General When selecting, don’t know –need to tackle critical path –need to run task to enable work Can generalize example to single resource case

CALTECH CS137 Winter DeHon Single Resource Hard (1) A7A8A9 B4 B5 B6 A1 A2 A3 A4 A5 A6 AaAbAdAc B7 B3B2B1 A1A3A5A7A8A9AaAbAcAd A2A4A6B1B2B3B4B5B6B7 A1A2A3A4A5A6A7A8A9Aa B1B2B3B4B5B6B7 AbAcAd

CALTECH CS137 Winter DeHon Single Resource Hard (2a) A7A8A9A1 A2 A3 A4 A5 A6 AaAbAdAc B4 B5 B6 B7 B3B2B1 A1A2A3A4A5A6A7A8A9Aa B1B2B3B4B5B6B7B8B9Ba AbAc Bb Ad B8 B9 Ba Bb A1A3A5A7A8A9AaAbAcAd A2A4A6B1B2B3B4B5B6B7 B8 B9Ba Bb Doesn’t quite show what I intended.

CALTECH CS137 Winter DeHon Single Resources Hard (2b) A7A8A9A1 A2 A3 A4 A5 A6 AaAbAdAc B4 B5 B6 B7 B3B2B1 A1A2A3A4A5A6A7A8A9Aa B1B2B3B4B5B6B7B8B9Ba AbAc Bb AdB8 B9 Ba Bb A1 A2 A3A4A5A6A7A8A9AaAbAc B1B2B3B4B5B6B7B8B9BaBb Ad

CALTECH CS137 Winter DeHon Brute-Force Try all schedules Branching/Backtracking Search Start w/ nothing scheduled (ready queue) At each move (branch) pick: –available resource time slot –ready task (predecessors completed) –schedule task on resource

CALTECH CS137 Winter DeHon Example T1 T2 T3 T4 T5 T6 T1  time 1 T3  time 1 T2  time 1 idle  time 1 T3  time2 T4  time 2 idle  time 2 Target: 2 FUs

CALTECH CS137 Winter DeHon Branching Search Explores entire state space –finds optimum schedule Exponential work –O (N (resources*time-slots) ) Many schedules completely uninteresting

CALTECH CS137 Winter DeHon Reducing Work Canonicalize “equivalent” schedule configurations Identify “dominating” schedule configurations Prune partial configurations which will lead to worse (or unacceptable results)

CALTECH CS137 Winter DeHon “Equivalent” Schedules If multiple resources of same type –assignment of task to particular resource at a particular timeslot is not distinguishing T1 T2 T3 T2 T1 T3 Keep track of resource usage by capacity at time-slot.

CALTECH CS137 Winter DeHon “Equivalent” Schedule Prefixes T1T3 T2T4 T1 T3 T2 T4 T1 T2 T3 T4 T5 T6

CALTECH CS137 Winter DeHon “Non-Equivalent” Schedule Prefixes T1 T2 T3 T2 T3 T1 T2 T3 T4 T5 T6

CALTECH CS137 Winter DeHon Pruning Prefixes? I’m not sure there is an efficient way (general)? Keep track of schedule set –walk through state-graph of scheduled prefixes –unfortunately, set is power-set so 2 N

CALTECH CS137 Winter DeHon Dominant Schedules A strictly shorter schedule –scheduling the same or more tasks –will always be superior to the longer schedule T1 T2T1T2T5 T4 T5 T3 T2 T1 T5 T4

CALTECH CS137 Winter DeHon Pruning If can establish a particular schedule path will be worse than one we’ve already seen –we can discard it w/out further exploration In particular: –current schedule time + lower_bound_estimate –if greater than existing solution, prune

CALTECH CS137 Winter DeHon Pruning Techniques Establish Lower Bound on schedule time Critical Path (ASAP schedule) Aggregate Resource Requirements Critical Chain

CALTECH CS137 Winter DeHon Critical Path Lower Bound ASAP schedule ignoring resource constraints –(look at length of remaining critical path) Certainly cannot finish any faster than that

CALTECH CS137 Winter DeHon Resource Capacity Lower Bound Sum up all capacity required per resource Divide by total resource (for type) Lower bound on remaining schedule time –(best can do is pack all use densely) –Ignores schedule constraints

CALTECH CS137 Winter DeHon Example Critical Path Resource Bound (2 resources) Resource Bound (4 resources)

CALTECH CS137 Winter DeHon Example Critical Path Resource Bound (2 resources) Resource Bound (4 resources) 3 7/2=4 4/4=2

CALTECH CS137 Winter DeHon “Critical Chain” Lower Bound Bottleneck resource present coupled resource and latency bound Single red resource

CALTECH CS137 Winter DeHon “Critical Chain” Lower Bound Bottleneck resource present coupled resource and latency bound Single red resource Critical path 5 Resource Bound (1,1) 4 Critical Chain (1,1) 7

CALTECH CS137 Winter DeHon Lower Bound Pruning Typically –make move (schedule) –recalculate lower bound –if best case completion greater than current best prune branch

CALTECH CS137 Winter DeHon Search Ordering Performance sensitive to ordering –e.g. if find best path first, easy to prune paths in order of decreasing length, cannot Depth first –get complete time for bound –may find long paths first Breadth first –don’t have complete path for bound –lots of intermediate data to keep –ultimately finds short paths before long

CALTECH CS137 Winter DeHon Search Ordering Mixture of depth and breadth Use heuristics to select nodes for expansion If heuristics help find good solutions –helps prune –focus attention in search

CALTECH CS137 Winter DeHon Alpha-Beta Search Generalization –keep both upper and lower bound estimates on partial schedule –expand most promising paths (least upper bound, least lower bound) –prune based on lower bounds exceeding known upper bound –(technique typically used in games/Chess)

CALTECH CS137 Winter DeHon Alpha-Beta Each scheduling decision will tighten –lower/upper bound estimates Can choose to expand –least current time (breadth first) –least lower bound remaining (depth first) –least lower bound estimate –least upper bound estimate Can control greediness –weighting lower/upper bound –selecting “most promising”

CALTECH CS137 Winter DeHon Upper Bounds Determine upper bounds by heuristics/approximations –talk about next time

CALTECH CS137 Winter DeHon Note Aggressive pruning and ordering –can sometimes make polynomial time in practice –often cannot prove will be polynomial time –usually represents problem structure we still need to understand Not sure we’ve covered enough techniques today to make scheduling (in general) polynomial time in practice

CALTECH CS137 Winter DeHon Adapt Time Constrained Vary resources and run as-is Binary search for minimum resources achieving time target Use lower bounds to define region of interest to search Use lower bounds to prune/exit search early if won’t meet target

CALTECH CS137 Winter DeHon Multiple Resources Works for multiple resource case Computing lower-bounds per resource –resource constrained Sometimes deal with resource coupling –e.g. must have 1 A and 1 B simultaneously or in fixed time slot relation e.g. bus and memory port

CALTECH CS137 Winter DeHon Summary Resource sharing saves area –allows us to fit in fixed area Requires that we schedule tasks onto resources General kind of problem arises Branch-and-bound search –“equivalent” states –dominators –estimates/pruning

CALTECH CS137 Winter DeHon Big Ideas: Exploit freedom in problem to reduce costs –(slack in schedules) Use dominating effects –(constrained resources) Use dominators to reduce work Technique: Search –Branch-and-Bound –Alpha-Beta