23
An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering Hongyu Chen, Chung-Kuan Cheng, Hongyu Chen, Chung-Kuan Cheng, Andrew B. Kahng, Bo Yao, Zhengyong Andrew B. Kahng, Bo Yao, Zhengyong Zhu Zhu University of California, San Diego University of California, San Diego Nan-Chi Chou, John F. MacDonald, Nan-Chi Chou, John F. MacDonald, Peter Suaris Peter Suaris Mentor Graphics Corporation Mentor Graphics Corporation

An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

  • Upload
    tannar

  • View
    47

  • Download
    2

Embed Size (px)

DESCRIPTION

An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering. Hongyu Chen, Chung-Kuan Cheng, Andrew B. Kahng, Bo Yao, Zhengyong Zhu University of California, San Diego Nan-Chi Chou, John F. MacDonald, Peter Suaris Mentor Graphics Corporation. Outline. - PowerPoint PPT Presentation

Citation preview

Page 1: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Hongyu Chen, Chung-Kuan Cheng, Hongyu Chen, Chung-Kuan Cheng, Andrew B. Kahng, Bo Yao, Zhengyong ZhuAndrew B. Kahng, Bo Yao, Zhengyong ZhuUniversity of California, San DiegoUniversity of California, San Diego

Nan-Chi Chou, John F. MacDonald, Peter Nan-Chi Chou, John F. MacDonald, Peter SuarisSuarisMentor Graphics CorporationMentor Graphics Corporation

Page 2: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Outline Analytical placement backgroundAnalytical placement background Algebraic multigrid solverAlgebraic multigrid solver Layout based clusteringLayout based clustering Experimental resultsExperimental results ConclusionsConclusions

Page 3: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Analytical Placement Successfully introduced and applied for 20 Successfully introduced and applied for 20

yearsyears Minimize quadratic wire lengthMinimize quadratic wire length Basic formulation is a quadratic programming Basic formulation is a quadratic programming

(QP)(QP)

Optimal solution is given by the linear Optimal solution is given by the linear equation systemsequation systems

CX+dCX+dxx=0=0CY+dCY+dyy=0=0

YdCYYXdCXXYX Ty

TTx

T 21

21),( min

Page 4: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Matrix Solver Is the Key Need additional force to make cell distribution evenNeed additional force to make cell distribution even

(Eisenmann & Johannes, DAC 1998)(Eisenmann & Johannes, DAC 1998) eex x is based on cell density, need iterations to updateis based on cell density, need iterations to update Key observationKey observation

Linear equations with the same system matrix Linear equations with the same system matrix CC is is to be solved for many timesto be solved for many times

A fast matrix solver is the key technology for A fast matrix solver is the key technology for analytical placement analytical placement

0 xdCX xe

Page 5: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Ever Increasing Problem Dimensions ITRS roadmap ITRS roadmap

– 1 billion transistors integration in year 20071 billion transistors integration in year 2007– Millions of unknowns for the linear equationMillions of unknowns for the linear equation

2001 2003 2005 2007102

103

104

Num

ber o

f tra

nsist

ors i

n a

typi

cal M

PU/A

SIC

desig

n (M

illion

s)

Year(source: ITRS Roadmap 2002 update)

Page 6: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Hierarchy Is the Way to Go PlacementPlacement

– T.Chan, J. Cong, et al, T.Chan, J. Cong, et al, Multilevel Optimization for Multilevel Optimization for Large-scale Circuit PlacementLarge-scale Circuit Placement, ICCAD 2000, ICCAD 2000

– X.Hong, et al, X.Hong, et al, CASHCASH, ASP-DAC 2000, ASP-DAC 2000– Hsun Cheng Lee, et al, Hsun Cheng Lee, et al, Multilevel Floorplanning for Multilevel Floorplanning for

Large-Scale Building Block DesignLarge-Scale Building Block Design, DAC 2003, DAC 2003 Graph partitioning/clusteringGraph partitioning/clustering

– G. Karypis and V. Kumar, G. Karypis and V. Kumar, hMETIShMETIS, 1998, 1998– C.J.Alpert, et al, C.J.Alpert, et al, Multilevel Circuit PartitioningMultilevel Circuit Partitioning, ,

19981998 Multigrid Multigrid

– W.L.Briggs, V.E.Henson, S.F.McCormic, W.L.Briggs, V.E.Henson, S.F.McCormic, A Multigrid A Multigrid TutorialTutorial, 2000, 2000

– K.StK.Stüben, üben, A Review of Algebraic MultigridA Review of Algebraic Multigrid, 1999, 1999

Page 7: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

AMG – a Good Candidate AAlgebraic lgebraic MMultiultiGGrid – a new branch of the rid – a new branch of the

multigrid methodmultigrid method The method is scalable The method is scalable

– O(n) time complexity theoretically.O(n) time complexity theoretically.– SOR and PCG are O(nlogn).SOR and PCG are O(nlogn).

Guaranteed convergence and optimalityGuaranteed convergence and optimality Overcome the restriction of classic multigrid, Overcome the restriction of classic multigrid,

can be applied to linear systems without can be applied to linear systems without regular structure.regular structure.

A hierarchy of linear systems are derived A hierarchy of linear systems are derived directly from the original equation. directly from the original equation.

Page 8: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

AMG Idea (1): A Hierarchy of Problems Defined by a clustering schemeDefined by a clustering scheme

123456

(0) A(0) • X(0)=b(0)

21

43(1) A(1) • X(1)=b(1)

21(2) A(2)• X(2)=b(2)

Original Problem

Page 9: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

AMG Idea (2) : Solution Mapping Between Levels Coarse level node position is the average of Coarse level node position is the average of

fine level components fine level components

21 43(1)

21(2)

10100101

12)()(I

)()()()(

)( kkkk

k RXIX

11

Interpolation Interpolation : : )()()(

)()( 111 kkk

kk NXIX Restriction : Restriction :

Tkk

kk II )( )(

)()(

)( 11

210021)2(N

Page 10: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

AMG Idea (3): V-cycle Iterations Description of the algorithm in 2 levelsDescription of the algorithm in 2 levels

A(1)X(1)= b(1) A(1)X(1)= b(1)

(0)

(1)

A(0)X(0)= b(0)

Iterate => )(1newx

)(1oldxStart with

Interpolation: )(1newx )(0

oldx Restriction:

)(0newx )(1

oldx

Iterate => )(0newx

Extend to multi-levelsExtend to multi-levels

Update R(0), b(1)

Page 11: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Derive Linear Systems for All Levels Galakin operationGalakin operation

A is symmetric positive definiteA is symmetric positive definite Easy operation with interpolation and Easy operation with interpolation and

restriction operators, only addition performedrestriction operators, only addition performed It introduces overhead to the solution processIt introduces overhead to the solution process

)( )()()()()(

)(

)()(

)()()(

)(

kkkkk

k

KK

kkk

k

RAbIb

IAIA

11

111

Page 12: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Why Iterate at Coarse Levels ? Smaller problem => less CPU timeSmaller problem => less CPU time Coarse level iterate is more efficient in Coarse level iterate is more efficient in

reducing errorsreducing errors– Iterations on each level are efficient only in Iterations on each level are efficient only in

reducing high frequency errors to that levelreducing high frequency errors to that level– Restriction operation will transform low Restriction operation will transform low

frequency errors into high frequency ones, frequency errors into high frequency ones, which can be efficiently reduced at coarse levelwhich can be efficiently reduced at coarse level

Idea of multigridIdea of multigrid: : – Iterations to reduce high frequency error in Iterations to reduce high frequency error in

each level, leave the low frequency error for each level, leave the low frequency error for the coarser level.the coarser level.

Page 13: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Aggregate-type of AMG Our approach turns out to be aggregate-type Our approach turns out to be aggregate-type

of AMGof AMG– Interpolation: one fine level node depends only Interpolation: one fine level node depends only

on one coarse level node.on one coarse level node. ProsPros

– Can be used with any clustering schemeCan be used with any clustering scheme– Simple derivation of the problems and simple Simple derivation of the problems and simple

solution mapping, less overheadsolution mapping, less overhead ConsCons

– Piecewise linear interpolation, less effective.Piecewise linear interpolation, less effective.

Page 14: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Layout Based Clustering Motivation: identify which cells stay close Motivation: identify which cells stay close

together in the placement.together in the placement. The clustering is needed for the AMG process.The clustering is needed for the AMG process. Layout based clusteringLayout based clustering

– Edge coarseningEdge coarsening– Edge weight is according to the distance infoEdge weight is according to the distance info– Collapse the edge with shortest distance firstCollapse the edge with shortest distance first

AlternativesAlternatives– hMETIS hMETIS – RandomRandom

Page 15: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Distance Information of An Edge Distance information is calculated based on Distance information is calculated based on

trials of placementtrials of placement ““Blown-up” placementBlown-up” placement

Starting pointAll cells at the same position

Iterations on solving

equations

Snapshot of the placement when

the standard deviation of cell coordinates is

max

Page 16: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Deriving the Distance of An Edge Distance between cell Distance between cell ii and and j, dj, dijij

dij = dij(ll)+ dij

(lr)+ dij(ul)+ dij

(ur)

(1) (2)

(3) (4)

Page 17: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Experimental Settings Two experiments Two experiments

– Convergence comparison with SOR and PCG solversConvergence comparison with SOR and PCG solvers SOR ( SOR ( = 1.95 ) = 1.95 ) PCG ( Incomplete Cholesky factorization precondition)PCG ( Incomplete Cholesky factorization precondition)

– Comparison with different clustering algorithmsComparison with different clustering algorithms Layout based clusteringLayout based clustering hMETIS clusteringhMETIS clustering Random clusteringRandom clustering

Solve the system Ax=b onceSolve the system Ax=b once Check relative error, Check relative error, eerr=||X-X*||=||X-X*||∞ ∞ / ||X*||/ ||X*||∞∞

Test cases from ISPD 2002. #cells 12k to 200k Test cases from ISPD 2002. #cells 12k to 200k

Page 18: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

0 5 10 15 200

100

200

300

400

500

600

Comparison of the Solvers CPU time to converge to 10CPU time to converge to 10-2 -2 relative errorrelative error

Case Number

CPU

Tim

e (s

ec)

AMGPCGSOR

Page 19: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Example Convergence Histories AMG solver converges fast at the beginningAMG solver converges fast at the beginning

er

CPU Time (sec)

0 100 200 300 40010-8

10-6

10-4

10-2

100

AMGPCGSOR

Page 20: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Comparison of the Clustering Methods (1) CPU time to reach 10CPU time to reach 10-3-3 relative error relative error

0 5 10 15 200

50

100

150

200

250

300 Layout HMetis Random

Case Number

CPU

Tim

e (s

ec)

Page 21: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

0 5 10 15 200

100

200

300

400

500LayoutHMetisRandom

Comparison of the Clustering Methods (2) Clustering time comparison Clustering time comparison

CPU

Tim

e (s

ec)

Case Number

Page 22: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Conclusions A hierarchical solver is important for large A hierarchical solver is important for large

scale analytical placement problemscale analytical placement problem Algebraic multigrid method converges very Algebraic multigrid method converges very

fast at the beginning stage of iterations. It is a fast at the beginning stage of iterations. It is a promising technology for solving linear promising technology for solving linear equations in analytical placementequations in analytical placement

Layout based clustering scheme is useful for Layout based clustering scheme is useful for AMG solverAMG solver

Page 23: An Algebraic Multigrid Solver for Analytical Placement With Layout Based Clustering

Thank you !