Problemcore
Hypergraph partitioning
Also called netlist partitioning, circuit partitioning.
Split the vertices of a hypergraph into k balanced parts so that few hyperedges, the nets of a circuit, span more than one part.
Hypergraph partitioning asks to split the vertices of a hypergraph into parts of bounded weight so that the nets (hyperedges) that span more than one part have the least total weight. In circuit design the vertices are cells and the nets are wires that join any number of pins, so a cut net is a wire that runs between chips, between blocks or across a cut line of a placement. The case where every net has two pins is the graph partitioning problem, so the problem is NP-hard already for bisection. The trap is the objective: a cut net counts once, however its pins are split, which is not what a graph model of the net counts.
In plain words
A circuit has many parts, and each wire joins two or more of them. You must put the parts on two chips of about the same size. Every wire whose parts end up on both chips needs a pin on each chip, and pins are expensive. So you want as few such wires as possible.
What counts is the number of wires that cross, not the number of pairs of parts that are split. A wire that joins ten parts costs one pin pair if it crosses, whether one part or five parts are on the far side. That is what makes this problem different from cutting the edges of an ordinary graph.
Definition
Input. A hypergraph with vertices, nets and pins; vertex weights (cell areas) and net weights ; a number of parts ; and an imbalance . Optionally, a set of fixed vertices with a given part for each.
Output. A partition into disjoint parts that puts each fixed vertex in its given part and satisfies the balance condition
Objective. Let be the number of parts that contain a pin of . The two standard objectives are
Minimize one of them. For they are equal. For the connectivity objective, also called the metric, counts a net once for each extra part it touches, which models the pins that a net needs on each extra chip. A third objective, the sum of external degrees, is .
Bisection. For the balance condition is often given as a window: the weight of part must lie in . Exact bisection is .
What is fixed: the netlist, the weights, , the balance bound and the fixed vertices. What is free: the part of every other vertex. A partition is legal if it meets the balance condition and the fixed assignments. Nothing else, such as the geometry of the parts, enters the problem.
Variants
- Cut-net against clique cut. A graph partitioner applied to the clique net model of the netlist minimizes a different objective. A net split costs there, and no weighting of the clique edges matches the cut-net count for nets with 4 or more pins. The example below shows that the two optima can differ.
- Fixed vertices. Pads, and in placement the terminals added by terminal propagation, are vertices that must stay in a given part. They count in the cut but never move.
- Ratio objectives. The ratio cut divides the cut by and drops the balance condition, so the partitioner can find natural clusters of uneven size.
- No balance. With no balance condition and no fixed vertices, the problem is a minimum cut of the hypergraph, solvable in polynomial time by network flows (see the reduction below).
- k-way. Recursive bisection splits into 2, then 4 parts and so on. Direct -way methods refine all parts at once.
- Multiple constraints. Each vertex has a vector of weights (area, power, pins) and each part must be balanced in every component.
Examples
A bisection that the clique model gets wrong. Take six cells and six nets of weight 1:
Split them into two parts of three cells. There are 10 such bisections. Two of them:
| bisection | how are split | cut nets | clique cut, weight |
|---|---|---|---|
| 2:2, 2:2, 2:2, not cut, 2:2, not cut | 4 | ||
| 3:1, 3:1, 1:3, 1:1, 1:3, not cut | 5 |
Checking all 10 bisections shows that the first is the only one with 4 cut nets, the least possible, and the second is the only one with clique cut 5, the least possible for the clique. A graph partitioner that solves the clique model exactly returns a bisection with 5 cut nets, 25 percent more than the optimum.
Cut-net against connectivity. Split into with the nets , and . The cut-net objective is 2: the first and the third net are cut. The connectivity objective is , because the first net needs pins in two extra parts.
Known algorithms
All practical methods for large netlists are heuristics with no proved approximation ratio.
- Kernighan-Lin. Swaps pairs of cells in passes. Designed for graphs, so on netlists it works on a graph model or with net-based gains. Heuristic.
- Fiduccia-Mattheyses. Moves single cells under the balance condition and keeps the gains in buckets, so a pass takes time. It works on the cut-net objective directly. Heuristic; each pass gives a local optimum for single moves.
- Multilevel hypergraph partitioning. The hMETIS scheme: coarsen by merging cells of the same nets, partition the small hypergraph, and refine with FM on the way back. Heuristic. It is the standard for large netlists. The graph version is multilevel graph partitioning.
- Spectral partitioning. Uses an eigenvector of the Laplacian of a clique or star model. The bounds that come with it are for the graph model, not for the cut-net objective.
- Flow-based methods. Minimum cuts in the flow network below give exact unbalanced cuts and are used to refine a balanced partition.
- Simulated annealing. Random moves with a cooling schedule. Heuristic; slow on large netlists.
- Exact search. Branch and bound or enumeration finds the optimum for small instances only. The test of the multilevel page compares with enumeration of all bisections for up to 14 cells.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Multilevel hypergraph partitioning | O(l (P log P + p (n + P))) worst · average | O(n + l P) extra | randomizednot exactiterative | 1 language |
Bounds
- NP-hardness. Hypergraph bisection is NP-hard, because a graph is a hypergraph whose nets have two pins, and minimum bisection of a graph is NP-complete (Garey, Johnson and Stockmeyer, 1976). This holds with unit weights.
- Inherited limits. Every hardness result for the graph problem holds here too. For and exact balance, no polynomial algorithm has a finite approximation ratio unless P = NP (see graph partitioning problem).
- Polynomial without balance. With no balance condition, a minimum - net cut and a minimum net cut overall are found in polynomial time by maximum flow (Lawler, 1973).
- Spectral and ratio bounds. The lower bounds from eigenvalues hold for the graph model of the netlist under a stated normalization. For the cut-net objective, a cut net counts once, so the clique cut with weight is at least the number of cut nets and at most times it, where is the largest net size. A bound on one gives a bound on the other only up to this factor.
Reductions
- From graph bisection. Keep the vertices, and turn each edge into a net of the same weight. A net with two pins is cut exactly when the edge is cut, so the two problems have the same optimal partitions and values.
- Unbalanced cut to maximum flow (Lawler's network). Build a directed network with a node for each vertex and two nodes and for each net . Add an arc of capacity , and arcs and of infinite capacity for each pin . For vertices and , the minimum capacity of an - cut equals the least weight of a set of nets whose removal separates from . Proof. Given a partition of with , , put and on the source side for nets inside , on the sink side for nets inside , and on the source side with on the sink side for cut nets. No infinite arc goes from the source side to the sink side, and the cut capacity is the weight of the cut nets. Conversely, in a cut of finite capacity with source side , a net with a pin in has , or an infinite arc would cross, and a net with a pin outside has . So every net cut by contributes its arc . By the max-flow min-cut theorem, one maximum flow gives the value. Fixing and trying all gives a global minimum net cut with flows.
- To graph partitioning, with loss. The clique net model or a star model gives a graph, and a graph partitioner can be run on it. The reduction does not preserve the optimum, as the first example shows.
Applications
- Chip and board partitioning. Split a design among FPGAs or chips with few signals between them, under limits on the area and on the pins of each part.
- Placement. Min-cut placement bisects the netlist and the chip area again and again, so that the cut at each level is the number of nets that cross a cut line. The placement problem page gives the context.
- Hierarchical design and floorplanning. Group the cells into blocks with few nets between blocks. Rent's rule describes how the cut grows with the block size in such a hierarchy.
- Sparse matrices and parallel computing. A sparse matrix is a hypergraph whose rows are nets over the columns, or the reverse. The connectivity objective then counts exactly the words of communication in a parallel matrix-vector product, which a graph model can only approximate.
- Logic simulation and emulation. Divide a netlist among processors or emulator boards to balance the work and reduce the messages.
References
- M. R. Garey, D. S. Johnson and L. Stockmeyer, Some simplified NP-complete graph problems, Theoretical Computer Science 1(3), 237 to 267, 1976, the NP-completeness of minimum bisection, which is the case of nets with two pins
- E. L. Lawler, Cutsets and partitions of hypergraphs, Networks 3(3), 275 to 285, 1973, the network flow computation of optimal cutsets of a hypergraph
- Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, second edition, Springer, 2022, Chapter 2, Netlist and System Partitioning (the partitioning problem for netlists, the balance condition, and the Kernighan-Lin, Fiduccia-Mattheyses and multilevel methods)
- George Karypis, Rajat Aggarwal, Vipin Kumar and Shashi Shekhar, Multilevel hypergraph partitioning, applications in VLSI domain, IEEE Transactions on VLSI Systems 7(1), 69 to 79, 1999, the problem statement with the balance constraint and the hyperedge cut objective
- Charles J. Alpert and Andrew B. Kahng, Recent directions in netlist partitioning, a survey, Integration, the VLSI Journal 19(1 to 2), 1 to 81, 1995, the formulations of netlist partitioning (cut-net, sum of external degrees, ratio cut) and the survey of methods
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 280NCB Edit this page History Report an error Markdown