Penn ESE525 Spring 2008 -- DeHon 1 ESE535: Electronic Design Automation Day 10: February 27, 2008 Partitioning 2 (spectral, network flow, replication)

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Online Social Networks and Media. Graph partitioning The general problem – Input: a graph G=(V,E) edge (u,v) denotes similarity between u and v weighted.
10/11/2001Random walks and spectral segmentation1 CSE 291 Fall 2001 Marina Meila and Jianbo Shi: Learning Segmentation by Random Walks/A Random Walks View.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
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 9: February 20, 2008 Partitioning (Intro, KLFM)
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 15: March 12, 2007 Interconnect 3: Richness.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 23, 2008 Covering.
EDA (CS286.5b) Day 5 Partitioning: Intro + KLFM. Today Partitioning –why important –practical attack –variations and issues.
EDA (CS286.5b) Day 6 Partitioning: Spectral + MinCut.
CS294-6 Reconfigurable Computing Day 13 October 6, 1998 Interconnect Partitioning.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 7: February 11, 2008 Static Timing Analysis and Multi-Level Speedup.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 19: April 9, 2008 Routing 1.
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.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 16: March 23, 2009 Covering.
CS294-6 Reconfigurable Computing Day 15 October 13, 1998 LUT Mapping.
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.
Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 18, 2009 Partitioning 2 (spectral, network flow)
EDA (CS286.5b) Day 19 Covering and Retiming. “Final” Like Assignment #1 –longer –more breadth –focus since assignment #2 –…but ideas are cummulative –open.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 3: January 27, 2008 Clustering (LUT Mapping, Delay) Please work preclass example.
Penn ESE Spring DeHon 1 ESE (ESE534): Computer Organization Day 16: March 14, 2007 Interconnect 4: Switching.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 17: March 30, 2009 Clustering (LUT Mapping, Delay)
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 ESE (ESE534): Computer Organization Day 14: February 28, 2007 Interconnect 2: Wiring Requirements and Implications.
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.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University COT 5410 – Spring 2004.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 4: January 28, 2015 Partitioning (Intro, KLFM)
CSE 242A Integrated Circuit Layout Automation Lecture: Partitioning Winter 2009 Chung-Kuan Cheng.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 2: January 26, 2015 Covering Work preclass exercise.
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 6: January 23, 2002 Partitioning (Intro, KLFM)
Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2014 Partitioning 2 (spectral, network flow)
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.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 23: April 20, 2015 Static Timing Analysis and Multi-Level Speedup.
Penn ESE534 Spring DeHon 1 ESE534: Computer Organization Day 18: April 2, 2014 Interconnect 4: Switching.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 3: January 12, 2004 Clustering (LUT Mapping, Delay)
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 9: February 9, 2004 Partitioning (Intro, KLFM)
CALTECH CS137 Spring DeHon 1 CS137: Electronic Design Automation Day 5: April 12, 2004 Covering and Retiming.
Domain decomposition in parallel computing Ashok Srinivasan Florida State University.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 10: February 11, 2002 Partitioning 2 (spectral, network flow, replication)
Caltech CS184 Winter DeHon 1 CS184a: Computer Architecture (Structure and Organization) Day 13: February 6, 2003 Interconnect 3: Richness.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: January 30, 2013 Partitioning (Intro, KLFM)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 4, 2011 Static Timing Analysis and Multi-Level Speedup.
Approximation Algorithms Duality My T. UF.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2015 Clustering (LUT Mapping, Delay)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: February 25, 2015 Placement (Intro, Constructive)
Normalized Cuts and Image Segmentation Patrick Denis COSC 6121 York University Jianbo Shi and Jitendra Malik.
CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 2: September 28, 2005 Covering.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 25: April 17, 2013 Covering and Retiming.
CS137: Electronic Design Automation
CS137: Electronic Design Automation
CS137: Electronic Design Automation
CS137: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE534: Computer Organization
ESE534: Computer Organization
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
3.3 Network-Centric Community Detection
CS184a: Computer Architecture (Structures and Organization)
ESE535: Electronic Design Automation
CS137: Electronic Design Automation
CS137: Electronic Design Automation
Presentation transcript:

Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 27, 2008 Partitioning 2 (spectral, network flow, replication)

Penn ESE525 Spring DeHon 2 Today Alternate views of partitioning Two things we can solve optimally –(but don’t exactly solve our original problem) Techniques –Linear Placement w/ squared wire lengths –Network flow MinCut

Penn ESE525 Spring DeHon 3 Optimization Target Place cells In linear arrangement Wire length between connected cells: –distance=X i - X j –cost is sum of distance squared Pick X i ’s to minimize cost

Penn ESE525 Spring DeHon 4 Why this Target? Minimize sum of squared wire distances Prefer: –Area: minimize channel width –Delay: minimize critical path length

Penn ESE525 Spring DeHon 5 Why this Target? Our preferred targets are discontinuous and discrete Cannot formulate analytically Not clear how to drive toward solution –Does reducing the channel width at a non-bottleneck help or not? –Does reducing a non-critical path help or not?

Penn ESE525 Spring DeHon 6 Spectral Ordering Minimize Squared Wire length -- 1D layout Start with connection array C (c i,j ) “Placement” Vector X for x i placement Problem: –Minimize cost = 0.5*  (all i,j) (x i - x j ) 2 c i,j –cost sum is X T BX B = D-C D=diagonal matrix, d i,i =  (over j) c i,j

Penn ESE525 Spring DeHon 7 Spectral Ordering Constraint: X T X=1 –prevent trivial solution all x i ’s =0 Minimize cost=X T BX w/ constraint –minimize L=X T BX- (X T X-1) –  L/  X=2BX-2 X=0 –(B- I)X=0 –X  Eigenvector of B –cost is Eigenvalue

Penn ESE525 Spring DeHon 8 Spectral Solution Smallest eigenvalue is zero –Corresponds to case where all x i ’s are the same  uninteresting Second smallest eigenvalue (eigenvector) is the solution we want

Penn ESE525 Spring DeHon 9 Spectral Ordering X (x i ’s) continuous use to order nodes –real problem wants to place at discrete locations –this is one case where can solve ILP from LP Solve LP giving continuous x i ’s then move back to closest discrete point

Penn ESE525 Spring DeHon 10 Spectral Ordering Option With iteration, can reweigh connections to change cost model being optimized –linear –(distance) 1.X Can encourage “closeness” –by weighting connection between nodes Making c i,j larger –(have to allow some nodes to not be close)

Penn ESE525 Spring DeHon 11 Spectral Partitioning Can form a basis for partitioning Attempts to cluster together connected components Form cut partition from ordering –E.g. Left half of ordering is one half, right half is the other

Penn ESE525 Spring DeHon 12 Spectral Ordering Midpoint bisect isn’t necessarily best place to cut, consider: K (n/4) K (n/2)

Penn ESE525 Spring DeHon 13 Fanout How do we treat fanout? As described assumes point-to-point nets For partitioning, pay price when cut something once –I.e. the accounting did last time for KLFM Also a discrete optimization problem –Hard to model analytically

Penn ESE525 Spring DeHon 14 Spectral Fanout Typically: –Treat all nodes on a single net as fully connected –Model links between all of them –Weight connections so cutting in half counts as cutting the wire –Threshold out high fanout nodes If connect to too many things give no information

Penn ESE525 Spring DeHon 15 Spectral Partitioning Options Can bisect by choosing midpoint –(not strictly optimizing for minimum bisect) Can relax cut critera –min cut w/in some  of balance Ratio Cut –minimize (cut/|A||B|) idea tradeoff imbalance for smaller cut –more imbalance  smaller |A||B| –so cut must be much smaller to accept Circular bisect/relaxed/ratio cut – wrap into circle and pick two cut points –How many such cuts?

Penn ESE525 Spring DeHon 16 Spectral vs. FM From Hauck/Boriello ‘96

Penn ESE525 Spring DeHon 17 Improving Spectral More Eigenvalues –look at clusters in n-d space But: 2 eigenvectors is not opt. solution to 2D placement –5--70% improvement over EIG1

Penn ESE525 Spring DeHon 18 Spectral Note Unlike KLFM, attacks global connectivity characteristics Good for finding “natural” clusters –hence use as clustering heuristic for multilevel algorithms

Penn ESE525 Spring DeHon 19 Spectral Theory There are conditions under which spectral is optimal [Boppana/FOCS28 (1987)] –B=A+diag(d) –g(G,d)=[sum(B)-n* (B S )]/4 –B S mapping Bx to closest point on S –h(G) = max d g(G,d) h(G) lower bound on cut size

Penn ESE525 Spring DeHon 20 Spectral Theory Boppana paper gives a probabilistic model for graphs –model favors graphs with small cuts –necessary since truly random graph has cut size O(n) –shows high likelihood of bisection being lower bound In practice –known to be very weak for graphs with large cuts

Penn ESE525 Spring DeHon 21 Max Flow MinCut

Penn ESE525 Spring DeHon 22 MinCut Goal Find maximum flow (mincut) between a source and a sink –no balance guarantee

Penn ESE525 Spring DeHon 23 MaxFlow Set all edge flows to zero –F[u,v]=0 While there is a path from s,t –(breadth-first-search) –for each edge in path f[u,v]=f[u,v]+1 –f[v,u]=-f[u,v] –When c[v,u]=f[v,u] remove edge from search O(|E|*cutsize) [Our problem simpler than general case CLR]

Penn ESE525 Spring DeHon 24 Technical Details For min-cut in graphs, –Don’t really care about directionality of cut –Just want to minimize wire crossings Fanout –Want to charge discretely …cut or not cut Pick start and end nodes?

Penn ESE525 Spring DeHon 25 Directionality For logic net: cutting a net is the same regardless of which way the signal flows

Penn ESE525 Spring DeHon 26 Directionality Construct 1    

Penn ESE525 Spring DeHon 27 Fanout Construct 1      

Penn ESE525 Spring DeHon 28 Extend to Balanced Cut Pick a start node and a finish node Compute min-cut start to finish If halves sufficiently balanced, done else –collapse all nodes in smaller half into one node –pick a node adjacent to smaller half –collapse that node into smaller half –repeat from min-cut computation FBB -- Yang/Wong ICCAD’94

Penn ESE525 Spring DeHon 29 Observation Can use residual flow from previous cut when computing next cuts Consequently, work of multiple network flows is only O(|E|*final_cut_cost)

Penn ESE525 Spring DeHon 30 Picking Nodes Optimal: –would look at all s,t pairs Just for first cut is merely N-1 “others” –…N/2 to guarantee something in second half Anything you pick must be in separate halves Assuming thereis perfect/ideal bisection –If pick randomly, probability in different halves is 50% –Few random selections likely to yield s,t in different halves –would also look at all nodes to collapse into smaller –could formulate as branching search

Penn ESE525 Spring DeHon 31 Picking Nodes Randomly pick –(maybe try several starting points) With small number of adjacent nodes, –could afford to branch on all

Penn ESE525 Spring DeHon 32 Approximation Can find 1/3 balanced cuts within O(log(n)) of best cut in polynomial time –algorithm due to Leighton and Rao –exposition in Hochbaum’s Approx. Alg. Bound cut size –Boppana -- lower bound h(G) –Boppana/Spectral cut -- one upper bound –Leighton/Rao -- upper bound

Penn ESE525 Spring DeHon 33 Min Cut Replication Noted last time could use replication to reduce cut size –Observed could use FM to replicate Can solve unbounded replication optimally with mincut [Liu,Kuo,Cheng TRCAD v14n5p623]

Penn ESE525 Spring DeHon 34 Min-Cut Replication Key Idea: –Create two copies of net Connect super src/sink to both reverse links on “to” second copy Provide directional “free” links between them –Take mincut S=reachable from src; T=reachable from sink R=rest  replication set –Allows nodes to be associated with both ends

Penn ESE525 Spring DeHon 35 Min-cut Example s c ab T

Penn ESE525 Spring DeHon 36 Min-cut Example s c ab T s’ c’ a’b’ T’

Penn ESE525 Spring DeHon 37 Min-cut Example s c ab T s’ c’ a’b’ T’ S* T*    

Penn ESE525 Spring DeHon 38 Min-cut Example s c ab T S’ b’ a’b’ T’ S* T*       

Penn ESE525 Spring DeHon 39 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Start Net flow  find path

Penn ESE525 Spring DeHon 40 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Cont. net flow  find path

Penn ESE525 Spring DeHon 41 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        How much on this path?

Penn ESE525 Spring DeHon 42 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Another path?

Penn ESE525 Spring DeHon 43 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Identify cut

Penn ESE525 Spring DeHon 44 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Shows cut

Penn ESE525 Spring DeHon 45 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Identify S (not reach T)

Penn ESE525 Spring DeHon 46 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Identify T

Penn ESE525 Spring DeHon 47 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        Sets: S,T,R?

Penn ESE525 Spring DeHon 48 Min-cut Example s c ab T S’ c’ a’b’ T’ S* T*        S={s,a} T={T} R={b,c}

Penn ESE525 Spring DeHon 49 Min-cut Example S={s,a} T={T} R={b,c} s c ab c b T s c ab T 1 1 3

Penn ESE525 Spring DeHon 50 Replication Note Cut of minimum width is not unique –Similar to phenomenon saw in LUT covering with network flow Want to identify minimum size replication set for given flow Can do by reweighing graph and another min-cut –Idea: weight on replication connections Minimize cut  minimize replication set –See Mak/Wong TRCAD v16n10p1221

Penn ESE525 Spring DeHon 51 Admin Monday reading online Homework 3 due Monday

Penn ESE525 Spring DeHon 52 Big Ideas Divide-and-Conquer Techniques –flow based –numerical/linear-programming based –Transformation constructs Exploit problems we can solve optimally –Mincut –Linear ordering