CALTECH CS137 Winter2002 -- DeHon CS137: Electronic Design Automation Day 10: February 6, 2002 Placement (Simulated Annealing…)

Slides:



Advertisements
Similar presentations
EDA (CS286.5b) Day 10 Scheduling (Intro Branch-and-Bound)
Advertisements

Simulated Annealing Premchand Akella. Agenda Motivation The algorithm Its applications Examples Conclusion.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
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 20: April 13, 2009 Placement II (Simulated Annealing)
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
Placement 1 Outline Goal What is Placement? Why Placement?
EDA (CS286.5b) Day 5 Partitioning: Intro + KLFM. Today Partitioning –why important –practical attack –variations and issues.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
Reconfigurable Computing (EN2911X, Fall07)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 19: April 9, 2008 Routing 1.
Simulated Annealing 10/7/2005.
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)
Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.
EDA (CS286.5b) Day 7 Placement (Simulated Annealing) Assignment #1 due Friday.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 13: March 17, 2008 Dual Objective Dynamic Programming.
Backtracking.
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
ECE 506 Reconfigurable Computing Lecture 7 FPGA Placement.
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 13: February 4, 2005 Interconnect 1: Requirements.
Placement by Simulated Annealing. Simulated Annealing  Simulates annealing process for placement  Initial placement −Random positions  Perturb by block.
Simulated Annealing.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 17: November 11, 2005 Placement (Simulated Annealing…)
The Basics and Pseudo Code
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 12: February 13, 2002 Scheduling Heuristics and Approximation.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Massachusetts Institute of Technology 1 L14 – Physical Design Spring 2007 Ajay Joshi.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 9: February 14, 2011 Placement (Intro, Constructive)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 6: January 23, 2002 Partitioning (Intro, KLFM)
Thursday, May 9 Heuristic Search: methods for solving difficult optimization problems Handouts: Lecture Notes See the introduction to the paper.
Applications of Dynamic Programming and Heuristics to the Traveling Salesman Problem ERIC SALMON & JOSEPH SEWELL.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 14: February 10, 2003 Interconnect 4: Switching.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 9: February 9, 2004 Partitioning (Intro, KLFM)
Optimization Problems
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 CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 13: February 6, 2003 Interconnect 3: Richness.
Ramakrishna Lecture#2 CAD for VLSI Ramakrishna
An Introduction to Simulated Annealing Kevin Cannons November 24, 2005.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 16, 2011 Placement II (Simulated Annealing)
An Exact Algorithm for Difficult Detailed Routing Problems Kolja Sulimma Wolfgang Kunz J. W.-Goethe Universität Frankfurt.
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.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: February 25, 2015 Placement (Intro, Constructive)
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 18: November 14, 2005 Dual Objective Dynamic Programming.
1 Chapter 5 Branch-and-bound Framework and Its Applications.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 2: September 28, 2005 Covering.
CS137 Electronic Design Automation Day 9: February 25, 2004 Placement II André DeHon, Michael Wrighton.
CALTECH CS137 Winter DeHon 1 CS137: Electronic Design Automation Day 8: January 27, 2006 Cellular Placement.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 21: November 28, 2005 Routing 1.
Optimization Problems
CS137: Electronic Design Automation
Local Search Algorithms
CS137: Electronic Design Automation
CS137: Electronic Design Automation
Optimization Problems
ESE535: Electronic Design Automation
More on Search: A* and Optimization
Xin-She Yang, Nature-Inspired Optimization Algorithms, Elsevier, 2014
More on HW 2 (due Jan 26) Again, it must be in Python 2.7.
Local Search Algorithms
Area Coverage Problem Optimization by (local) Search
CS137: Electronic Design Automation
Reconfigurable Computing (EN2911X, Fall07)
Presentation transcript:

CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 10: February 6, 2002 Placement (Simulated Annealing…)

CALTECH CS137 Winter DeHon Today Placement Improving Quality –Avoiding local minima Techniques: –Simulated Annealing –Exhaustive (Branch-and-bound)

CALTECH CS137 Winter DeHon Simulated Annealing Physically motivated approach Physical world has similar problems –objects/atoms seeking minimum cost arrangement –at high temperature (energy) can move around –at low temperature, no free energy to move –cool quickly, freeze in defects (weak structure) –cool slowly, allow to find minimum cost

CALTECH CS137 Winter DeHon Key Benefit Avoid Local Minima –Allowed to take locally not improving moves in order to avoid being stuck

CALTECH CS137 Winter DeHon Simulated Annealing At high temperature can move around –not trapped to only make “improving” moves –free energy from temperature allows exploration of non-minimum states –avoid being trapped in local minima As temperature lowers –less energy to take big, non-minimizing moves –more local / greedy moves

CALTECH CS137 Winter DeHon Design Optimization Components: “Energy” (Cost) function to minimize –represent entire state, drives system forward Moves –local rearrangement/transformation of solution Cooling schedule –initial temperature –temperature steps (sequence) –time at each temperature

CALTECH CS137 Winter DeHon Basic Algorithm Sketch Pick an initial solution Set temperature (T) to initial value while (T> Tmin) –for time at T pick a move at random compute  cost if less than zero, accept else if RND<e -  cost/T, accept –update T

CALTECH CS137 Winter DeHon Details Initial Temperature –T0=  avg/ln(P accept ) Cooling schedule –fixed ratio: T= T (e.g. =0.85) –temperature dependent Time at each temperature –fixed number of moves? –Fixed number of rejected moves? –Fixed fraction of rejected moves?

CALTECH CS137 Winter DeHon Cost Function Can be very general Should drive entire solution in right direction –reward each good move Should be cheap to compute delta costs –e.g. FM

CALTECH CS137 Winter DeHon Cost Functions Total Wire Length Channel widths –probably wants to be more than just width Cut width

CALTECH CS137 Winter DeHon Bad Cost Functions Update cost –rerun maze route on every move –rerun timing analysis –recalculate critical path delay Drive toward solution: –size < threshold ? –Critical path delay

CALTECH CS137 Winter DeHon Initial Solution Spectral Placement Random Constructive Placement

CALTECH CS137 Winter DeHon Moves Swap two cells swap regions –…rows, columns, subtrees rotate cell (when feasible) flip (mirror) cell permute cell inputs (equivalent inputs)

CALTECH CS137 Winter DeHon Variant Allow non-legal solutions –capture badness in cost function –E.g. -- allow cells to overlap Just make sure cost function makes very expensive as cool – settle out to legal solutions

CALTECH CS137 Winter DeHon Variant: “Rejectionless” Order moves by cost –compare FM Pick random number first Use random to define range of move costs will currently accept Pick randomly within this range (never pick a costly move which will reject)

CALTECH CS137 Winter DeHon Theory If stay long enough at each cooling stage –will achieve tight error bound If cool long enough –will find optimum

CALTECH CS137 Winter DeHon Practice Good results –ultimately, what most commercial tools use... Slow convergence Tricky to pick schedules to accelerate convergence

CALTECH CS137 Winter DeHon Big Hammer Costly, but general Works for most all problems –(part, placement, route, retime, schedule…) Can have hybrid/mixed cost functions –as long as weight to single potential With care, can attack multiple levels –place and route Ignores structure of problem –resignation to finding/understanding structure

CALTECH CS137 Winter DeHon Optimal/Exhaustive

CALTECH CS137 Winter DeHon If you run simulated annealing long enough…. –It should converge to optimum If you have enough monkeys typing at keyboards keyboards long enough –They’ll eventually produce the works of Shakespeare….

CALTECH CS137 Winter DeHon Brute Force? If you are really going to give up on structure and explore the entire space –…there are more efficient ways to do it …and maybe they’re not terrible –For small/modest problems –As our computers get faster

CALTECH CS137 Winter DeHon Optimum Placement Simplest case: –Gate/array (FPGA) w/ fixed cell locations N locations M cells Try all permutations of N choose M N!/M! cases

CALTECH CS137 Winter DeHon Improving Prune off symmetry cases –Rotate 90, 180, 270 –Mirror X, Y, XY Reject provably bad starts –(return to in a minute)

CALTECH CS137 Winter DeHon Exhaustive Placement More general: –Modules have variable size –Modules can be rotated/flipped… To explore all cases: –For each module For each orientation

CALTECH CS137 Winter DeHon Branch-and-Bound Flavor now –More next week Consider dense 1D placement –Search space of all placements –Tree branch is choice of logical cell for physical cell position –Keep track of best solution so far as reach leaves –If partial solution worse than best solution, prune branch

CALTECH CS137 Winter DeHon Pruning: 1D example Reducing channel width –Have solution with width=10 –When find a partial solution with width>=10 Can abort that branch Reducing Delay –Have solution with delay=20 –When find a partial solution with delay>=20 Can abort branch

CALTECH CS137 Winter DeHon Viable Only on small problems –But “small” growing with machine speed Use for end-case in constructive –Flatten bottom of hierarchy –Maybe even in iteration/overlap relaxation

CALTECH CS137 Winter DeHon Caldwell et. al. Results [TRCAD v19n11p ]

CALTECH CS137 Winter DeHon Runtime [TRCAD v19n11p ]

CALTECH CS137 Winter DeHon Faster? Accounting and gain complexity –Make it linear time –But do make each update somewhat complex –Exhaustive case less bookkeeping Not an atypical result…

CALTECH CS137 Winter DeHon Summary Simulated Annealing –use randomness to explore space –accept “bad” moves to avoid local minima –decrease tolerance over time General purpose solution –costly in runtime Small (sub)problems –May solve exhaustively –Can prune to accelerate…

CALTECH CS137 Winter DeHon Big Ideas: Use randomness to explore large (non- convex) space –Simulated Annealing Use dominance to quickly skip over obviously bad solutions –Branch and Bound