cs137 today electronic design automation
play

CS137: Today Electronic Design Automation Scheduling - PDF document

CS137: Today Electronic Design Automation Scheduling Force-Directed SAT/ILP Day 20: November 23, 2005 Branch-and-Bound Scheduling Variants and Approaches 1 2 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 --


  1. CS137: Today Electronic Design Automation • Scheduling – Force-Directed – SAT/ILP Day 20: November 23, 2005 – Branch-and-Bound Scheduling Variants and Approaches 1 2 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Last Time Force-Directed • Resources aren’t free • Problem : how exploit schedule freedom (slack) to minimize instantaneous • Share to reduce costs resources • Schedule operations on resources – Directly solve time constrained • Greedy approximation algorithm – Trying to minimize resources 3 4 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Force-Directed A1 A3 A5 A7 A8 A9 A10 A11 A12 A13 A2 A4 A6 • Given a node, can schedule anywhere B2 between ASAP and ALAP schedule time B3 B10 B1 B11 – Between latest schedule predecessor and B4 ALAP B5 – Between ASAP and already scheduled successors B6 • N.b.: Scheduling node will limit freedom B7 of nodes in path B8 5 B9 6 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 1

  2. Force-Directed Force-Directed • If everything where scheduled, except • Problem: don’t know resource for the target node, we would: utilization during scheduling – examine resource usage in all timeslots allowed by precedence • Strategy: estimate resource utilization – place in timeslot which has least increase maximum resources 7 8 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Force-Directed Estimate 2 2 2 2 2 2 2 2 2 2 2 2 2 • Assume a node is uniformly distributed 8 within slack region 8 8 8 – between earliest and latest possible 8 schedule time 8 • Use this estimate to identify most used 8 timeslots 8 8 8 9 8 10 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 11 8 12 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 2

  3. Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 2 3/9 8 8 8 8 2 1/9 8 8 8 8 8 13 8 14 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Force-Directed 2 2 2 2 2 2 2 2 2 2 2 2 2 • Scheduling a node will shift distribution 8 Repeat – all of scheduled node’s cost goes into one 8 8 timeslot 8 8 – predecessor/successors may have 8 freedom limited so shift their contributions 8 • Want to shift distribution to minimize 8 maximum resource utilization (estimate) 8 8 15 8 16 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 Repeat 8 8 8 8 8 8 8 8 8 8 2 3/9 8 8 8 8 2 1/9 8 8 8 8 8 17 8 18 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 3

  4. Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 3 4/9 8 8 8 8 8 8 8 8 8 19 8 20 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 2 3/9 3 2/9 8 8 8 8 2 1/9 8 8 8 8 8 21 8 22 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 2 3/9 2 3/9 8 8 8 8 8 8 8 8 8 23 8 24 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 4

  5. Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 3 8 8 8 8 8 8 8 25 8 26 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 2 13/18 8 8 8 8 8 8 8 27 8 28 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 3 2/9 8 8 8 8 8 8 8 8 8 29 8 30 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 5

  6. Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 2 13/18 2 13/18 8 8 8 8 8 8 8 31 8 32 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 2 13/18 8 8 8 8 8 8 8 33 8 34 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 2 13/18 8 8 8 8 8 8 8 35 8 36 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 6

  7. Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 2 13/18 8 8 8 8 8 8 8 37 8 38 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Single Resource Challenge Single Resource Challenge 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 8 8 8 8 8 8 8 8 8 8 8 8 8 8 Many steps… 8 8 8 8 8 8 8 39 8 40 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Force-Directed Algorithm Time • Evaluate force of putting in timeslot 1. ASAP/ALAP schedule to determine range of O(NT) times for each node – Potentially perturbing slack on net 2. Compute estimated resource usage prefix/postfix for this node � N 3. Pick most constrained node – Each node potentially in T slots (in largest time slot…) • Evaluate all timeslots can put in O(NT 2 ) – Evaluate effects of placing in feasible time slots (compute forces) • N nodes to place – Place in minimum cost slot and update • O(N 2 T 2 ) estimates – Loose bound--don’t get both T slots and N – Repeat until done perturbations 41 42 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 7

  8. Two Constraint Challenge • Processing elements have limited SAT/ILP memory (Integer-Linear Programming) – Instruction memory (data memory) • Tasks have different requirements for compute and instruction memory – i.e. Run length not correlated to code length 43 44 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Task Task • Task: schedule tasks onto PEs obeying • Task: schedule tasks onto PEs obeying both memory and compute capacity limits both memory and compute capacities • � two capacity partitioning problem – …actually, didn’t say anything about communication… • � two capacity bin packing problem Example and • Task: i <C i ,I i > ILP solution From Plishker et al. NSCD2004 45 46 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon SAT Packing Allow Code Sharing • A i,j – task i assigned to resource j • Two tasks of same type can share code • Instead of memory capacity Constraints – Vector of memory usage • Coverage constraints • Compute PE Imem vector • Uniqueness constraints – As OR of task vectors assigned to it • Cardinality constraints • Compute mem space as sum of non- – PE compute zero vector entries – PE memory 47 48 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 8

  9. Allow Code Sharing Symmetries • As with partitioning, many symmetries • Two tasks of same type can share code • Speedup with symmetry breaking • Task has vector of memory uage – Tasks in same class are equivalent – Task i needs set of instructions k: T i,k – PEs indistinguishable – Total ordering on tasks and PEs • Compute PE Imem vector – Add constraints to force tasks to be assigned – OR (all i): PE.Imem j,k +=A i,j * T i,k to PEs by ordering • PE Mem space – Plishker claims “significant runtime speedup” – PE.Total_Imem j = Σ (PE.Imem j,k *Instrs(k)) – Using GALENA [DAC 2003] psuedo-Boolean SAT solver 49 50 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Plishker Task Example Results SAT/ILP Solve Greedy (first-fit) binpack Solutions in < 1 second 51 52 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon Why can they do this? Why can they do this? • Ignore precedence? • Ignore precedence? – feed forward, buffered • Ignore Interconnect? • Ignore Interconnect? – Through shared memory, not dominant? 53 54 CALTECH CS137 Fall2005 -- DeHon CALTECH CS137 Fall2005 -- DeHon 9

Recommend


More recommend