Penn ESE525 Spring 2015 -- DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2014 Partitioning 2 (spectral, network flow)

Slides:



Advertisements
Similar presentations
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.
Advertisements

Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 11: March 4, 2008 Placement (Intro, Constructive)
Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 10: February 27, 2008 Partitioning 2 (spectral, network flow, replication)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 20: April 13, 2009 Placement II (Simulated Annealing)
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.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 21: April 15, 2009 Routing 1.
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)
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 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 ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
EDA (CS286.5b) Day 18 Retiming. Today Retiming –cycle time (clock period) –C-slow –initial states –register minimization.
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)
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 9: February 16, 2015 Scheduling Variants and Approaches.
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)
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)
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.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 13: February 20, 2002 Routing 1.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 13: March 3, 2015 Routing 1.
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 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 10: February 16, 2011 Placement II (Simulated Annealing)
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.
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 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)
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
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE534: Computer Organization
ESE534: Computer Organization
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
3.3 Network-Centric Community Detection
ESE535: Electronic Design Automation
CS184a: Computer Architecture (Structures and Organization)
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
ESE535: Electronic Design Automation
Presentation transcript:

Penn ESE525 Spring DeHon 1 ESE535: Electronic Design Automation Day 6: February 4, 2014 Partitioning 2 (spectral, network flow)

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 (time permit) Behavioral (C, MATLAB, …) RTL Gate Netlist Layout Masks Arch. Select Schedule FSM assign Two-level, Multilevel opt. Covering Retiming Placement Routing

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?

Preclass: Initial Placement Metrics: –Wirelength –Squared wirelength –Channel width –Critical path length Penn ESE525 Spring DeHon 6

7 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 = –cost sum is X T BX B = D-C D=diagonal matrix, d i,i =  (over j) c i,j

Penn ESE525 Spring DeHon 8 Preclass Netlist Squared wire lengths: (X A -X G ) 2 +( X B -X G ) 2 +( X B -X H ) 2 +( X C -X H ) 2 +( X G -X O ) 2 +( X H - X O ) 2

Penn ESE525 Spring DeHon 9 C Matrix ABCGHO A1 B11 C1 G111 H111 O11

Penn ESE525 Spring DeHon 10 D Matrix ABCGHO A11 B211 C11 G1131 H1131 O112

Penn ESE525 Spring DeHon 11 B=D-C Matrix ABCGHO A1 B2 C1 G 3 H 3 O 2

Penn ESE525 Spring DeHon 12 BX ABCGHO A1 B2 C1 G 3 H 3 O 2 XAXA XBXB XCXC XGXG XHXH XOXO X A - X G 2X B - X G - X H X C - X H 3X G - X A - X B - X O 3X H - X B - X C - X O 2X O - X G - X H =

Penn ESE525 Spring DeHon 13 X T (BX) X A - X G 2X B - X G - X H X C - X H 3X G - X A - X B - X O 3X H - X B - X C - X O 2X O - X G - X H XAXA XBXB XCXC XGXG XHXH XOXO

Penn ESE525 Spring DeHon 14 X T (BX) X A 2- X A X G +2X B 2- X B X G - X B X H +X C 2- X C X H +3X G 2- X A X G - X B X G - X G X O +3X H 2- X B X H - X C X H - X H X O +2X O 2- X G X O - X H X O

Penn ESE525 Spring DeHon 15 X T (BX) X A 2 - X A X G +2X B 2- X B X G - X B X H +X C 2- X C X H +3X G 2- X A X G - X B X G - X G X O +3X H 2- X B X H - X C X H - X H X O +2X O 2- X G X O - X H X O (X A - X G ) 2 +2X B 2- X B X G - X B X H +X C 2- X C X H +2X G 2- X B X G - X G X O +3X H 2- X B X H - X C X H - X H X O +2X O 2- X G X O - X H X O

Penn ESE525 Spring DeHon 16 X T (BX) (X A - X G ) 2 + (X B - X G ) 2 +X B 2- X B X H +X C 2- X C X H +X G 2 - X G X O +3X H 2- X B X H - X C X H - X H X O +2X O 2- X G X O - X H X O (X A - X G ) 2 +2X B 2- X B X G - X B X H +X C 2- X C X H +2X G 2 - X B X G - X G X O +3X H 2- X B X H - X C X H - X H X O +2X O 2- X G X O - X H X O

Penn ESE525 Spring DeHon 17 Can See Will Converage To.. Squared wire lengths: (X A -X G ) 2 +( X B -X G ) 2 +(X B -X H ) 2 +(X C -X H ) 2 +( X G -X O ) 2 +( X H -X O ) 2 (X A - X G ) 2 + (X B - X G ) 2 +X B 2- X B X H +X C 2- X C X H +X G 2 - X G X O +3X H 2- X B X H - X C X H - X H X O +2X O 2- X G X O - X H X O

Penn ESE525 Spring DeHon 18 Trying to Minimize Squared wire lengths: (X A -X G ) 2 +( X B -X G ) 2 +(X B -X H ) 2 +(X C -X H ) 2 +( X G -X O ) 2 +( X H -X O ) 2 Which we know is also X T BX Make all X i ’s same? …but, we probably need to be in unique positions.

Penn ESE525 Spring DeHon 19 Spectral Ordering Add 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 –What does this tell us about X,  –X  Eigenvector of B –cost is Eigenvalue

Penn ESE525 Spring DeHon 20 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 21 Eigenvector for B ABCGHO A1 B2 C1 G 3 H 3 O 2 XAXA XBXB XCXC XGXG XHXH XOXO E E-14 = For this B Matrix Eigenvector is:

Penn ESE525 Spring DeHon 22 Spectral Ordering X (x i ’s) continuous use to order nodes –We need 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 XAXA XBXB XCXC XGXG XHXH XOXO E E-14 = Eigenvector is:

Penn ESE525 Spring DeHon 23 Eigenvector for B XAXA XBXB XCXC XGXG XHXH XOXO E E-14 = Eigenvector is: Order?

Penn ESE525 Spring DeHon 24 Order from Eigenvector AGOBHCAGOBHC XAXA XBXB XCXC XGXG XHXH XOXO E E-14 = Eigenvector is: Quality of this solution? all metrics Anyone get a solution with a better metric?

Penn ESE525 Spring DeHon 25 Spectral Ordering Option Can encourage “closeness” –Making some c i,j larger –Must allow some to be not close Could use c i,j for power opt –c i,j =P switch ABCGHO A1 B2 C1 G 3 H 3 O 2

Penn ESE525 Spring DeHon 26 Spectral Ordering Option With iteration, can reweigh connections to change cost model being optimized –linear –(distance) 1.X ABCGHO A1 B2 C1 G 3 H 3 O 2

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

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

Penn ESE525 Spring DeHon 29 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 –Easy to explore once have spectral ordering Compute at each cut point in O(N) time

Penn ESE525 Spring DeHon 30 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 B GH

Penn ESE525 Spring DeHon 31 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 – e.g. 1/(nodes-1) –Threshold out high fanout nodes If connect too many things give no information B GH GH B ½ ½ ½

Spectral Fanout Cut Approximation Penn ESE525 Spring DeHon 32 B GI H B GI H Weight edges: 1/(4-1)=1/3 B GI H B GI H

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

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

Penn ESE525 Spring DeHon 35 Spectral Note Unlike KLFM, attacks global connectivity characteristics Good for finding “natural” clusters –hence use as clustering heuristic for multilevel algorithms After doing spectral –Can often improve incrementally using KLFM pass –Remember spectral optimizing squared wirelength, not directly cut width

If Time Permits Penn ESE525 Spring DeHon 36

Penn ESE525 Spring DeHon 37 Max Flow MinCut

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

Penn ESE525 Spring DeHon 39 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 40 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 41 Directionality For logic net: cutting a net is the same regardless of which way the signal flows

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

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

Penn ESE525 Spring DeHon 44 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 45 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 46 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 there is a perfect/ideal bisection –If pick randomly, probability different halves: 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 47 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 48 Big Ideas Divide-and-Conquer Techniques –flow based –numerical/linear-programming based –Transformation constructs Exploit problems we can solve optimally –Mincut –Linear ordering

Penn ESE525 Spring DeHon 49 Admin Assign 3 due on Thursday Reading for Monday online Assignment 4 exercise out –Should be small part –Most effort on partitioning project