23 Partitioning Algorithms
23 Partitioning Algorithms
1
Contents
• Partitioning algorithms
• Classification of partitioning algorithms
• Terminology
2
Partitioning algorithms
• Partitioning algorithm takes a set of components and a netlist as input.
3
Classification of partitioning algorithms
• Partitioning algorithms can be classified in three ways:
4
Classification of partitioning algorithms
• Based on the availability of initial partitioning:
– Constructive algorithms:
5
Classification of partitioning algorithms
– Iterative algorithms:
6
Classification of partitioning algorithms
• Based on the nature of algorithms
– Deterministic algorithms:
7
Classification of partitioning algorithms
– Probabilistic algorithms:
8
Classification of partitioning algorithms
• Based on the process used for partitioning:
– Group Migration algorithms:
• Start with some randomly generated initial partitions.
• Then move components between partitions to improve the
partitioning.
• Often trapped at a local optimum and can
not proceed further.
9
Classification of partitioning algorithms
10
Classification of partitioning algorithms
• Initially, they begin with a random solution.
• Over time, the proportion of detrimental moves decreases.
• These detrimental moves serve as a defense against getting
stuck in local minima.
– Other partitioning algorithms:
• Performance-driven algorithms.
• Metric allocation
11
Classification of partitioning algorithms
Partitioning
algorithms
12
Kernighan-Lin (KL) Algorithm
• Let a graph G(V, E) have |V| = 2n nodes, where
13
Kernighan-Lin (KL) Algorithm
Graph G,
|V| = 2n = 10, ∴ n = 5 Group - A
1 2 3 4 5
6 7 8 9 10
Group - B
14
Terminology
High costs (D > 0)
Cost D(v) of moving a node v
indicate that the node
D(v) = |Ec(v)| – |Enc(v)| , should move, while low
where costs (D < 0) indicate that
Ec(v) is the set of v’s incident edges that are cut by the cut line, and
Enc(v) is the set of v’s incident edges that are not cut by the cut line. the node should stay
within the same partition.
1 2 3 4 5
Node 1:
D(1) = 2-1=1
6 7 8 9 10 Node 9:
D(9) = 3-1=2
15
Terminology
Gain of swapping a pair of nodes a and b
16
Terminology
The gain g indicates how
Gain of swapping a pair of nodes a and b
useful the swap between
where
• D(a), D(b) are the respective costs of nodes a, b The larger g, the more the
• c(a,b) is the connection weight between a and b: total cut cost will be reduced.
If an edge exists between a and b, then c(a,b) = edge weight,
otherwise, c(a,b) = 0.
17
1 2 3 4 5 g (2,8) = D(2) + D(8) - 2* c(2,8)
Node 2:
=2+1–2=1
D(2) = 3-1=2
6 7 8 9 10 Node 8:
D(8) = 2-1=1
18
1 2 3 4 5 g (2,8) = D(2) + D(8) - 2* c(2,8)
Node 2:
=2+1–2=1
D(2) = 3-1=2
6 7 8 9 10 Node 8:
D(8) = 2-1=1
1 2 3 4 5
6 7 8 9 10
19
1 2 3 4 5 g (1,9) = D(1) + D(9) - 2* c(1,9)
Node 1:
=2+1–0=3
D(1) = 2-1=1
6 7 8 9 10 Node 9:
D(9) = 3-1=2
1 2 3 4 5
6 7 8 9 10
20
Terminology
• Maximum positive gain Gm of a pass
21
Terminology
• Gm is computed as the sum of Δgk values over the first m swaps of
the pass, with m chosen such that Gm is maximized.
𝑚
𝐺𝑚 = Δ𝑔ₖ
𝑘=0
22
Thank You
23