Penn ESE535 Spring 2009 -- DeHon 1 ESE535: Electronic Design Automation Day 7: February 9, 2009 Scheduling Variants and Approaches.

Slides:



Advertisements
Similar presentations
NP-Completeness.
Advertisements

Presented by Monissa Mohan 1.  A highly optimized BCP algorithm  Two watched literals  Fast Backtracking  Efficient Decision Heuristic  Focused on.
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 19: November 21, 2005 Scheduling Introduction.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
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)
Architecture-dependent optimizations Functional units, delay slots and dependency analysis.
EDA (CS286.5b) Day 10 Scheduling (Intro Branch-and-Bound)
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.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View SAT.
1/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
EE 553 Integer Programming
Winter 2005ICS 252-Intro to Computer Design ICS 252 Introduction to Computer Design Lecture 5-Scheudling Algorithms Winter 2005 Eli Bozorgzadeh Computer.
Best-First Search: Agendas
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 11: March 4, 2008 Placement (Intro, Constructive)
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.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2009 Modern SAT Solvers ({z}Chaff, GRASP,miniSAT)
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 15: March 12, 2007 Interconnect 3: Richness.
Chaff: Engineering an Efficient SAT Solver Matthew W.Moskewicz, Concor F. Madigan, Ying Zhao, Lintao Zhang, Sharad Malik Princeton University Presenting:
Penn ESE Fall DeHon 1 ESE (ESE534): Computer Organization Day 19: March 26, 2007 Retime 1: Transformations.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
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 14 Routing (Pathfind, netflow).
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 12: March 2, 2009 Sequential Optimization (FSM Encoding)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 11, 2009 Dataflow.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 18, 2009 Static Timing Analysis and Multi-Level Speedup.
Penn ESE Spring DeHon 1 FUTURE Timing seemed good However, only student to give feedback marked confusing (2 of 5 on clarity) and too fast.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Penn ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 21, 2008 Modern SAT Solvers ({z}Chaff, GRASP,miniSAT)
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.
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 ESE 535 Spring DeHon 1 ESE535: Electronic Design Automation Day 18: April 1, 2015 Modern SAT Solvers ({z}Chaff, GRASP, miniSAT)
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 7: February 3, 2002 Retiming.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey.
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 6: January 26, 2004 Sequential Optimization (FSM Encoding)
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
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 13: March 1, 2003 Scheduling Introduction.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 15: March 13, 2013 High Level Synthesis II Dataflow Graph Sharing.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 11: February 11, 2002 Scheduling Introduction.
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
CS137: Electronic Design Automation
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
Decision Procedures An Algorithmic Point of View
Constraints and Search
ICS 252 Introduction to Computer Design
CS137: Electronic Design Automation
Presentation transcript:

Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 9, 2009 Scheduling Variants and Approaches

Penn ESE535 Spring DeHon 2 Previously Introduced Scheduling Greedy Schedule Approximation Optimal ILP Formulation SAT solve

Penn ESE535 Spring DeHon 3 Today SAT –Learning Scheduling –Force-Directed for Time-Bound Schedule –SAT/ILP for Multiple Resources

Penn ESE535 Spring DeHon 4 Learning SAT

Penn ESE535 Spring DeHon 5 SAT Reminder Avoid full exponential with pruning search –Constraint propagation –Contradictions Variable ordering important –Use statistics on variable/clause activity

Penn ESE535 Spring DeHon 6 Learning When encounter a conflict –Determine variable assignment contributing to conflict –Add new clause to database New clause allows pruning

Penn ESE535 Spring DeHon 7 Davis-Putnam w/ Learning while (true) { if (!decide()) // no unassigned vars return(satisfiable); while ( !bcp()) { // constraint propagation analyzeConflicts(); // learning if (!resolveConflict()) // backtrack return(not satisfiable); }

Penn ESE535 Spring DeHon 8 Implication Graph As perform bcp propagation –When set variable, insert back link to previous variable set forcing this variable set –Graph captures what this implication depends upon When encounter a conflict –Identify what variable values caused

Penn ESE535 Spring DeHon 9 Example Marques-Silva/Sakallah TRCOMP v48n5p

Penn ESE535 Spring DeHon 10 Conflict Resolution x1 & /x9 & /x10 & /x11 lead to conflict /(x1 & /x9 & /x10 & /x11) /x1+x9+x10+x11  new clause for DB

Penn ESE535 Spring DeHon 11 New Clause New clause does not include x12, x13 May encounter this case again /x1+x9+x10+x11  new clause for DB

Penn ESE535 Spring DeHon 12 More Implications x4 & /x10 & /x11 lead to conflict /x4+x10+x11  new clause for DB Also (/x1+x9+x4) since x1*/x9  x4

Penn ESE535 Spring DeHon 13 Unique Implication Point UIP = vetext that dominates verticies leading to conflict –x1 is UIP (decision variable causing is always a UIP) –x4 is UIP

Penn ESE535 Spring DeHon 14 New Clauses /x4+x10+x11 Doesn’t depend on x9 (/x1+x9+x4) x4 not in decision tree Will be useful for later pruning

Penn ESE535 Spring DeHon 15 Clause Tradeoff Adding clauses facilitates implications –Increases pruning –Must make fewer decisions Adding clauses increases size of clause database –Increases memory –Could add exponential clauses –Forces more work to push implications

Penn ESE535 Spring DeHon 16 Learned Clauses Runtime = Decisions * ImplicationTime –Decisions decreasing –Implication Time increasing Starting from 0 learned clauses, –Net decrease in runtime Eventually, Implication Time too large and slows down Optimum with limited number of learned clauses

Penn ESE535 Spring DeHon 17 Limiting Learned Clauses Filter out dominated clauses Keep smaller clauses (fewer literals) –Have most relevance zChaff study suggest inserting only UIP closest to conflict [Zhang et al., ICCAD2001] Treat like cache and evict learned clauses –Use activity statistics as with variables so keep most useful clauses [minisat 1.2]

Penn ESE535 Spring DeHon 18 (Recall) Restarts Periodically restart –Clearing the state of all variables i.e. clear decision stack –Leave clauses in clause database –State of clause database drives variable ordering Benefit: new variable ordering based on lessons of previous search

Penn ESE535 Spring DeHon 19 Impact of Learning zChaff [ICCAD2001] showed 2x improvement based on tuning the learning scheme Learning can be orders of magnitude benefit

Penn ESE535 Spring DeHon 20 Impact of Learning Marques-Silva/Sakallah TRCOMP v48n5p

Penn ESE535 Spring DeHon 21 SAT/ILP Scheduling Variant

Penn ESE535 Spring DeHon 22 Two Constraint Challenge Processing elements have limited memory –Instruction memory (data memory) Tasks have different requirements for compute and instruction memory –i.e. Run length not correlated to code length

Penn ESE535 Spring DeHon 23 Task Task: schedule tasks onto PEs obeying both memory and compute capacity limits Example and ILP solution From Plishker et al. NSCD2004

Penn ESE535 Spring DeHon 24 Plishker Task Example

Penn ESE535 Spring DeHon 25 Task Task: schedule tasks onto PEs obeying both memory and compute capacity limits Example and ILP solution From Plishker et al. NSCD2004

Penn ESE535 Spring DeHon 26 Task Task: schedule tasks onto PEs obeying both memory and compute capacities  two capacity assignment problem  two capacity bin packing problem Task: i

Penn ESE535 Spring DeHon 27 SAT Packing Variables: A i,j – task i assigned to resource j Constraints Coverage constraints Uniqueness constraints Cardinality constraints –PE compute –PE memory

Penn ESE535 Spring DeHon 28 Allow Code Sharing Two tasks of same type can share code Instead of memory capacity –Vector of memory usage Compute PE Imem vector –As OR of task vectors assigned to it Compute mem space as sum of non- zero vector entry weights (dot product)

Penn ESE535 Spring DeHon 29 Allow Code Sharing Two tasks of same type can share code Task has vector of memory uage –Task i needs set of instructions k: T i,k Compute PE Imem vector –OR (all i): PE.Imem j,k +=A i,j * T i,k PE Mem space –PE.Total_Imem j =  (PE.Imem j,k *Instrs(k))

Penn ESE535 Spring DeHon 30 Symmetries Many symmetries Speedup with symmetry breaking –Tasks in same class are equivalent –PEs indistinguishable –Total ordering on tasks and PEs –Add constraints to force tasks to be assigned to PEs by ordering –Plishker claims “significant runtime speedup” –Using GALENA [DAC 2003] psuedo-Boolean SAT solver

Penn ESE535 Spring DeHon 31 Plishker Task Example

Penn ESE535 Spring DeHon 32 Results SAT/ILP Solve Greedy (first-fit) binpack Solutions in < 1 second

Penn ESE535 Spring DeHon 33 Why can they do this? Ignore precedence? Ignore Interconnect?

Penn ESE535 Spring DeHon 34 Why can they do this? Ignore precedence? –feed forward, buffered Ignore Interconnect? –Through shared memory, not dominant?

Penn ESE535 Spring DeHon 35 Interconnect Buffers Allow “Software Pipelining” Each data item Spatial we would pipeline, running all three at once Think of each schedule instance as one timestep in spatial pipeline.

Penn ESE535 Spring DeHon 36 Interconnect Buffer ABC A B C PE0 PE1 ABC ABC ABCABC A BC A BC A BC A BC

Penn ESE535 Spring DeHon 37 Add Precedence to SAT/ILP? Saw that formulation on Day 5 Combine constraints introduced here –Added memory w/ contraints saw there –Precedence

Penn ESE535 Spring DeHon 38 Memory Schedule Variants Persistent: holds memory whole time –E.g. task state, instructions Task temporary: only uses memory space while task running Intra-Task: use memory between point of production and consumption –E.g. Def-Use chains, preclass example

Penn ESE535 Spring DeHon 39 Memory Schedule Variants Persistent: –Binpacking in memory Task temporary: –Co-schedule memory slot with execution Intra-Task: –Lifetime in memory depends on scheduling def and last use –Phase Ordered: Register coloring

Penn ESE535 Spring DeHon 40 Force Directed

Penn ESE535 Spring DeHon 41 Previously Resources aren’t free Share to reduce costs Schedule operations on resources –Fixed resources Greedy approximation algorithm

Penn ESE535 Spring DeHon 42 Force-Directed Problem: how exploit schedule freedom (slack) to minimize instantaneous resources –Directly solve time constrained (previously only solved indirectly) –Trying to minimize resources

Penn ESE535 Spring DeHon 43 Force-Directed Given a node, can schedule anywhere between ASAP and ALAP schedule time –Between latest schedule predecessor and ALAP –Between ASAP and already scheduled successors N.b.: Scheduling node will limit freedom of nodes in path

Penn ESE535 Spring DeHon 44 Single Resource Challenge A7A8 B11 A9 B2 B3 B4 A1 A2 A3 A4 A5 A6 A10A11A13A12 B5 B1 B6 B7 B8 B9 B10

Penn ESE535 Spring DeHon 45 Force-Directed If everything where scheduled, except for the target node, what would we do?: –examine resource usage in all timeslots allowed by precedence –place in timeslot which has least increase maximum resources

Penn ESE535 Spring DeHon 46 Force-Directed Problem: don’t know resource utilization during scheduling Strategy: estimate resource utilization

Penn ESE535 Spring DeHon 47 Force-Directed Estimate Assume a node is uniformly distributed within slack region –between earliest and latest possible schedule time Use this estimate to identify most used timeslots

Penn ESE535 Spring DeHon 48 Single Resource Challenge

Penn ESE535 Spring DeHon 49 Single Resource Challenge

Penn ESE535 Spring DeHon 50 Single Resource Challenge

Penn ESE535 Spring DeHon 51 Single Resource Challenge

Penn ESE535 Spring DeHon 52 Single Resource Challenge /9 2 1/9

Penn ESE535 Spring DeHon 53 Force-Directed Scheduling a node will shift distribution –all of scheduled node’s cost goes into one timeslot –predecessor/successors may have freedom limited so shift their contributions Want to shift distribution to minimize maximum resource utilization (estimate)

Penn ESE535 Spring DeHon 54 Single Resource Challenge Repeat

Penn ESE535 Spring DeHon 55 Single Resource Challenge /9 2 1/9 Repeat

Penn ESE535 Spring DeHon 56 Single Resource Challenge

Penn ESE535 Spring DeHon 57 Single Resource Challenge /9

Penn ESE535 Spring DeHon 58 Single Resource Challenge

Penn ESE535 Spring DeHon 59 Single Resource Challenge /9

Penn ESE535 Spring DeHon 60 Single Resource Challenge /9 2 1/9

Penn ESE535 Spring DeHon 61 Single Resource Challenge /9

Penn ESE535 Spring DeHon 62 Single Resource Challenge /9

Penn ESE535 Spring DeHon 63 Single Resource Challenge

Penn ESE535 Spring DeHon 64 Single Resource Challenge

Penn ESE535 Spring DeHon 65 Single Resource Challenge

Penn ESE535 Spring DeHon 66 Single Resource Challenge /18

Penn ESE535 Spring DeHon 67 Single Resource Challenge

Penn ESE535 Spring DeHon 68 Single Resource Challenge /9

Penn ESE535 Spring DeHon 69 Single Resource Challenge /18

Penn ESE535 Spring DeHon 70 Single Resource Challenge /18

Penn ESE535 Spring DeHon 71 Single Resource Challenge

Penn ESE535 Spring DeHon 72 Single Resource Challenge /18

Penn ESE535 Spring DeHon 73 Single Resource Challenge

Penn ESE535 Spring DeHon 74 Single Resource Challenge /18

Penn ESE535 Spring DeHon 75 Single Resource Challenge /18

Penn ESE535 Spring DeHon 76 Single Resource Challenge

Penn ESE535 Spring DeHon 77 Single Resource Challenge

Penn ESE535 Spring DeHon 78 Single Resource Challenge Many steps…

Penn ESE535 Spring DeHon 79 Force-Directed Algorithm 1.ASAP/ALAP schedule to determine range of times for each node 2.Compute estimated resource usage 3.Pick most constrained node (in largest time slot…) –Evaluate effects of placing in feasible time slots (compute forces) –Place in minimum cost slot and update estimates –Repeat until done

Penn ESE535 Spring DeHon 80 Time Evaluate force of putting in timeslot O(N) –Potentially perturbing slack on net prefix/postfix for this node  N Each node potentially in T slots: ×T N nodes to place: ×N O(N 2 T) –Loose bound--don’t get both T slots and N perturbations

Penn ESE535 Spring DeHon 81 Summary Learning –Understand structure –Enhance pruning SAT/ILP Schedule Resource estimates and refinement Software Pipelining

Penn ESE535 Spring DeHon 82 Admin Reading –Wednesday online

Penn ESE535 Spring DeHon 83 Big Ideas: Estimate Resource Usage Exploit Structure –Learning (discover structure) Techniques: –Force-Directed –SAT/ILP –Coloring, bin packing