Introduction
Macro placement fixes the positions of a chip's large hard blocks before the standard cells are placed, and the half-perimeter wirelength (HPWL) of the nets that join the macros is the usual first proxy for its quality. The wire-mask greedy placer places macros one at a time, each at the legal grid cell that adds the least HPWL, with ties broken toward a guiding coordinate. Because the result is overlap-free by construction, macro placement can be treated as black-box optimisation over the guiding layout, with the placer's HPWL as the objective; random search, Bayesian optimisation and evolutionary search have all been plugged into this decoder [1], the Bayesian variant through local Bayesian optimisation [2].
The question this task asks is narrower: with the greedy placer and its call budget fixed, which search policy reaches the lowest HPWL, on chips it was not tuned for? Several properties make it hard.
The map from guide to placement is discontinuous. A guide only breaks exact wire-mask ties, so most of a guiding layout's coordinates have no effect, and a small change to the ones that matter can change every later greedy step. Search in raw guide coordinates therefore has little smoothness to exploit. The methods that followed instead search over concrete placements: rip up a subset of macros, keep the rest, and let the greedy step re-place the subset inside an evolutionary loop [3]. Which macros, how many, and how parents are chosen are what separate them.
The order matters as much as the guide. The greedy step is sequential, and the order in which it places macros, fixed from netlist statistics or re-evaluated from the partial placement at every step, changes the result as much as the guide does. Searching over ordering strategies is itself a recent line of work [4]. Each order costs a placer call to try, so the budget has to be split between choosing an order and using it.
Nothing transfers by default. The policy sees only a chip's macro count, grid and per-macro footprints and features, never its name or netlist. In our development runs on public chips, the best order and the most productive kind of rip-up both changed from chip to chip, so a policy has to adapt from what its own calls return.
Method
Our method, which we call ROLNS (raced-order anchored large-neighbourhood search), spends a small
part of the budget learning which placement orders suit this chip and the rest repairing good
placements locally, keeping the order choice open throughout. It is written entirely inside the
one editable function, search(ctx); the starter it replaces spent the whole budget on independent
random guiding layouts.
A library of placement orders
The policy carries eleven candidate orders. Six are the operator's built-in strategies, static and
dynamic, among them a field-potential order. The other five are priority expressions, re-evaluated at every
step, over features of the partial placement and of each macro (conn, touched,
open, degree, area, and n_placed, the number of macros already placed). They combine a
connectivity term, an entropy-like ratio and net-closure terms.
Two of them change character during construction: one picks the first macro by
, with the median macro area (floored at 1), and then
switches to a degree-weighted entropy term; the other interpolates linearly from connectivity
to that term (both keep a small term throughout) as the fraction of placed macros grows.
orders = [
'field_potential', 'entropy', 'dynamic_connectivity', 'node_id',
'egplace_importance', 'gradient_force',
{'name': 'priority', 'weights': {'conn': -0.2, 'touched': -1.0, 'degree': -0.1}},
{'name': 'priority', 'expr': '-conn * conn / (open + 1) - touched - 0.1 * degree'},
{'name': 'priority', 'expr': '-conn * (1 + touched) / (open + 1) - 0.1 * degree'},
{'name': 'priority', 'expr': 'where(n_placed == 0, -sqrt(degree * area / %r), -degree * conn / (open + 1) - 0.1 * degree)' % am},
{'name': 'priority', 'expr': '-((1 - n_placed / %d) * conn + (n_placed / %d) * degree * conn / (open + 1) + 0.1 * degree)' % (n, n)},
]Racing orders on shared guides
Orders are compared on the same random guiding layouts, so that differences between them are not confounded with the luck of the guide. For orders in a candidate set and guides , with the HPWL the placer returned, we score
where the minimum runs over the feasible results at guide and an infeasible or missing result contributes . Normalising per guide makes the score a relative one, so a guide that is hard for every order does not dominate it, and the cap stops one disastrous order from swamping the mean.
def score(records, chosen, count):
vals = np.full((len(chosen), count), np.inf)
for a, oi in enumerate(chosen):
vals[a, :len(records[oi])] = records[oi]
out = np.zeros(len(chosen))
for j in range(count):
finite = vals[:, j][np.isfinite(vals[:, j]) & (vals[:, j] < 9e11)]
base = float(finite.min()) if len(finite) else 1.0
for a in range(len(chosen)):
h = vals[a, j]
out[a] += np.log(min(10.0, h / base)) if h < 9e11 else np.log(10.0)
return out / countThe race is successive. Every order places the first two guides; the three with the lowest place the remaining ; the three are then re-ranked on all guides. grows with the budget: for a budget of calls. Every placement made during the race is also offered to the elite archive. Below a budget of 30 the policy skips all of this and spends what it has on random layouts under the field-potential order.
The repair portfolio is the field-potential order plus the raced orders other than it, so it has three arms if field potential won a place in the race and four if it did not. Field potential is kept unconditionally because, in our development runs, an order that ranked poorly when building placements from scratch could still be the best one for repairing them.
The rescue is the one place where the policy spends extra calls before repair. It fires only when two conditions hold together: the worst of the three raced orders has , so the race did not produce a flat landscape, and the best elite placement is above times the median of all feasible race results, so the best initial placement barely stands out. In that case each non-field arm of the portfolio places two more fresh random layouts.
guides_n = 4 + 2 * int(ctx.budget >= 400) + 2 * int(ctx.budget >= 800)
xs = [ctx.random_encoding() for _ in range(guides_n)]
records = [[] for _ in orders]
for oi, order in enumerate(orders):
ps = ctx.decode_batch(xs[:2], order=order)
records[oi] = [p.hpwl for p in ps]
for p in ps:
add(p)
chosen = list(np.argsort(score(records, list(range(len(orders))), 2))[:3])
for oi in chosen:
ps = ctx.decode_batch(xs[2:], order=orders[oi])
records[oi] += [p.hpwl for p in ps]
for p in ps:
add(p)
chosen = list(np.array(chosen)[np.argsort(score(records, chosen, guides_n))])
repair = [i for i in chosen if orders[i] != 'field_potential']
active = ['field_potential'] + [orders[i] for i in repair]
all_h = np.array([h for rec in records for h in rec if h < 9e11])
uncertain = score(records, chosen, guides_n)[-1] > 0.07
if all_h.size and uncertain and pop[0].hpwl > 0.83 * np.median(all_h):
for order in active[1:]:
ps = ctx.decode_batch([ctx.random_encoding(), ctx.random_encoding()], order=order)
for p in ps:
add(p)Anchored, multi-scale repair with an order bandit
The rest of the budget is a large-neighbourhood search over concrete placements. The elite archive holds the twelve best distinct feasible placements; exact duplicates are rejected. Each repair step:
- picks a parent by a size-4 tournament over the archive (the best of up to four members drawn without replacement);
- draws a rip-up fraction with , so that small and large neighbourhoods are equally likely on a log scale, and rips up macros;
- chooses those macros uniformly with probability one half, and otherwise with probability proportional to , where is the per-macro wirelength statistic the placer reports for the parent;
- re-places them with the order chosen by the bandit and no new guide, so that, as we read the interface, ties are broken toward the parent's own cells rather than toward random coordinates.
The anchoring in step 4 is the main departure from the evolutionary baselines, which re-place ripped macros from fresh random coordinates. Because a guide only breaks ties, anchoring makes a repair a genuine local move around the parent: a macro that is already where the greedy step would put it tends to stay there.
The order for each repair is chosen by a UCB rule over the arms of the portfolio. With the mean reward of arm , one more than the number of times it has been used, and the number of repairs so far,
The first repairs visit every arm once. After that, whenever the arm is forced to , a deterministic exploration floor of one repair in twelve; at all other steps the arm with the highest UCB is used. The reward is the parent-relative HPWL change, clipped so that one catastrophic or lucky repair cannot dominate the mean. The child enters the archive only if it is feasible, new, and among the twelve best.
while ctx.remaining:
cand = rng.choice(len(pop), size=min(4, len(pop)), replace=False)
par = min((pop[i] for i in cand), key=lambda p: p.hpwl)
rho = float(np.exp(rng.uniform(np.log(0.03), np.log(0.7))))
k = max(1, min(n, int(round(rho * n))))
if rng.random() < 0.5:
rip = rng.choice(n, k, replace=False)
else:
w = par.wirelen + 1e-6 * max(1.0, par.wirelen.max())
rip = rng.choice(n, k, replace=False, p=w / w.sum())
ucb = values + 0.02 * np.sqrt(np.log(total + 2.0) / counts)
if total < m:
a = total
elif total % 12 == 11:
a = (total // 12) % m
else:
a = int(np.argmax(ucb))
child = ctx.replace(par.cells, rip, None, order=active[a])
rel = np.clip((par.hpwl - child.hpwl) / par.hpwl, -0.2, 0.2)
values[a] += (rel - values[a]) / counts[a]
counts[a] += 1
total += 1
add(child)Nothing in the policy reads a chip's identity. The only quantities it branches on are the budget, the macro count, the median macro area and what its own calls return.
Results
| Method | ① | ② | ③ | ④ | ⑤ | ⑥ | ⑦ | ⑧ | ⑨ |
|---|---|---|---|---|---|---|---|---|---|
| Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | Macro HPWL ↓ | |
| Kimi K3.1 Pro | 569,280 | 200,517 | 5.31e6 | 3.02e6 | 4.64e6 | 3.37e6 | 42,528 | 77,166 | 99,672 |
| WireMask random search | 614,522 | 220,196 | 6.10e6 | 6.00e6 | 6.26e6 | 6.24e6 | 51,524 | 96,815 | 126,203 |
| Single random layout | 810,681 | 244,656 | 9.06e6 | 1.27e7 | 7.94e6 | 1.13e7 | 80,967 | 146,379 | 164,544 |
| WireMask-BO | 590,355 | 212,319 | 5.88e6 | 5.26e6 | 5.99e6 | 5.96e6 | 48,661 | 81,979 | 110,355 |
| WireMask-EA | 590,121 | 214,313 | 5.77e6 | 5.13e6 | 6.03e6 | 6.05e6 | 51,038 | 86,536 | 119,281 |
| EGPlace | 575,936 | 202,773 | 5.73e6 | 3.54e6 | 5.23e6 | 5.96e6 | 48,389 | 94,738 | 108,960 |
| C2FPlace | 571,901 | 202,509 | 5.39e6 | 3.22e6 | 4.82e6 | 6.20e6 | 46,092 | 84,324 | 111,211 |
| OrderPlace | 589,316 | 199,545 | 5.77e6 | 3.21e6 | 5.17e6 | 4.21e6 | 44,195 | 77,340 | 99,915 |
- ① ISPD adaptec1 · 2,000 placer calls
- ② ISPD bigblue1 · 2,000 placer calls
- ③ ISPD adaptec3 · 2,000 placer calls
- ④ ISPD adaptec2 · 2,000 placer calls
- ⑤ ISPD adaptec4 · 2,000 placer calls
- ⑥ ISPD bigblue3 · 2,000 placer calls
- ⑦ ICCAD 2015 superblue18 · 2,000 placer calls
- ⑧ ICCAD 2015 superblue4 · 2,000 placer calls
- ⑨ ICCAD 2015 superblue16 · 2,000 placer calls
ROLNS returns the lowest HPWL in the table on every setting except bigblue1. The strongest baseline is C2FPlace on adaptec1, adaptec3 and adaptec4 and OrderPlace on the others; outside bigblue1, ROLNS is below both. On bigblue1 OrderPlace is lower, 199,545 against our 200,517, although we remain below C2FPlace there (202,509).
The margins differ widely. On bigblue3 our 3,371,496 is far below the best baseline, OrderPlace [4] at 4,211,414. On adaptec2, adaptec4 and superblue18 the gap is also clear: 3,017,564 against 3,208,418 (OrderPlace [4]), 4,641,158 against 4,823,902 (C2FPlace [3]), and 42,528 against 44,195 (OrderPlace [4]). On adaptec3 it is smaller, 5,305,566 against 5,386,122 (C2FPlace [3]). On adaptec1, superblue4 and superblue16 the lead is small: 569,280 against 571,901 for C2FPlace [3], and only just below OrderPlace on the other two, 77,166 against 77,340 and 99,672 against 99,915. Against the random-search starter the improvement is clear on every setting and largest on adaptec2 and bigblue3; on bigblue3, for example, the starter reaches 6,238,420.
The two baselines that come closest each carry one of our ingredients: C2FPlace repairs concrete placements by rip-up and re-place, and OrderPlace searches over placement orders. ROLNS does both at once, with the repairs anchored to the parent; the results do not say which of these accounts for the margin on any one setting.
How we got here
ROLNS was assembled by keeping what survived controlled comparisons and discarding a long list of ideas that did not. All figures below are our development measurements, made with our own harness around the same fixed placer on public chips.
- Anchoring came from first principles, and paid off first. Reading the placer, we noted that a guide only breaks ties, so the random guides the evolutionary baselines use for re-placement throw away the parent's tie-breaking information. A first policy with anchored re-placement, a log-uniform rip-up fraction, an even mix of uniform and wirelength-biased subsets and a single fixed order already beat every baseline we had measured on the public chips we tried first. At larger budgets it lost to C2FPlace on two chips, which added to the case our order probes had already made for adapting the order.
- Exact best responses and an inferred dependency graph were precise but not useful enough. With every other macro kept, re-placing a single macro is that macro's exact best response, and any change in another macro's wirelength must come through a shared net. We used this to infer macro dependencies without the netlist: after a bug in our own summary statistic was fixed, the inferred dependencies had no false positives, but they were sparse. Pure best-response descent and plateau walks were weaker than anchored repair, and graph-guided rip-up helped some chips and hurt others, including in a refined version later in the run.
- Racing beat committing, and a bandit beat racing every repair. Our probes showed that no order was best on every chip, so we raced orders on shared guides and then chose among the survivors online. Spending one call per neighbourhood with a bandit was better on most chips than racing three orders on the same rip-up. Its main failure was that the construction race could exclude field potential even where it was the better repair order, which is why field potential is always in the portfolio. The idea of choosing destroy and repair operators online comes from work on controlling adaptive large-neighbourhood search online [5]; we used a lightweight UCB rule rather than a learned controller because calls are expensive.
- A stronger order library gave a large gain. Following the order-search line of work [4], we probed phase-adaptive and net-closure priority forms on common guides and replaced older custom orders with the four best. At our smaller development budget the new library's geometric-mean HPWL ratio to the previous policy was 0.9561.
- The bandit collapsed, and the floor is our repair for it. Instrumenting the bandit showed one arm receiving almost every repair call on every chip we inspected. The deterministic floor of one forced repair in twelve improved six of the seven chips at the smaller development budget (the seventh was marginally worse) and was slightly worse overall at larger ones. The version we adopted added the floor, two more orders in the library and the full raced portfolio together; across 30 matched runs at the smaller budget it improved geometric-mean HPWL by about 1.2% over the previous version, and that gain belongs to the three changes jointly.
- Adapting anything other than the order did not help. Learning the rip-up scale by a bandit, first alone and later jointly with the order and with separate exploration floors, was worse (geometric-mean ratio 1.02354 for the joint version); a bandit over uniform versus wirelength-biased subsets was slightly worse (1.00232); an annealed walker that accepts worse repairs, and a bandit choosing between it and the elite tournament, helped at the larger budget but caused a large regression on one chip. Donor-guided re-placement, matched-neighbourhood calibration of the bandit, asymmetric rewards, random guides, a larger archive, per-order native parents, best-of-four batched repairs, additional static orders and continuously weighted priority candidates were all tried and rejected.
- Larger portfolios and confidence gates traded one chip against another. Racing four orders fixed one chip and hurt another; a gate that kept the fourth order only when its normalised score was within 0.1 of the third worked on the cases it was designed for and regressed elsewhere, as did eliminating the weakest arm partway through.
- A context-dependent bandit was adopted and then rolled back. The best order in our probes depended on rip-up size, so we tried rewards conditioned on scale, then shrunk toward the global estimate, then used only for large repairs and large budgets. The last version passed our checks and was promoted, until long-budget runs showed it drifting late, with regressions of 5.5% and 13.3% on one chip. We restored the global bandit, which kept improving to the end of the longest runs we made.
- The rescue is a narrowed version of a rejected idea. Adding construction probes for every chip rescued one weak run and regressed several other chips. The weak run was identifiable from what the policy observes, a best initial placement close to the median combined with a dispersed race, so we made the extra probes conditional on both. Across 58 matched runs this changed seven, four for the better and three for the worse, and moved geometric-mean HPWL by a ratio of 0.99793. Late in the run we lowered the separation threshold from 0.87 to 0.83, motivated by two weak runs on one chip that fell between the two values; it improved them, cost between 0.2% and 1.9% on three other runs at the smaller budget, and was adopted after checks at three development budgets.
Limitations
- bigblue1 is not won. OrderPlace is lower there, and on superblue4 and superblue16 our lead over it is so small that we cannot claim a difference from the means alone.
- The rescue is tuned on very little. Both its thresholds were set by looking at a handful of weak runs, and the move from 0.87 to 0.83 was motivated by runs on a single public chip. It is the part of the method most exposed to overfitting our development chips, even though it never reads a chip's identity.
- The construction race is a noisy proxy for repair value. We found repeatedly that the order that builds the best placement from scratch is not always the one that repairs best, and the portfolio is still chosen by the construction race, with only field potential protected. Orders that would have repaired well can be left out.
- The bandit is stationary and its floor is a patch. Rewards change as the search moves to better placements, the mean reward ignores that, and the forced exploration floor is a fixed schedule rather than something derived. Our attempt to make the choice context-dependent drifted late and was withdrawn.
- Many constants are hand-set. The rip-up range, the subset mix, the archive size, the tournament size, the UCB constant, the reward clip and the race sizes were set on public development chips and not derived.
- Small designs remain a weak regime. On a small derived public design with far fewer macros than the others, our policy lost to C2FPlace in development, and none of the changes we tried for it (coverage-based schedules, random guides, a larger archive, asymmetric rewards, specialist arms) closed the gap.
References
- Yunqi Shi, Ke Xue, Lei Song et al. (2023). Macro Placement by Wire-Mask-Guided Black-Box Optimization. NeurIPS.
- David Eriksson, Michael Pearce, Jacob R Gardner et al. (2019). Scalable Global Optimization via Local Bayesian Optimization. NeurIPS.
- Biao Liu, Zhiping Jin, Kaixuan Sun et al. (2026). Coarse-to-Fine Macro Placement via Evolutionary Search and Critical Macro Tuning.
- Shibing Mo, Jing Liu, Jianchu Xu et al. (2026). Order Matters: Unveiling the Hidden Impact of Macro Placement Sequences via Proxy-Guided LLM Evolution. ICML.
- Robbert Reijnen, Yingqian Zhang, Hoong Chuin Lau et al. (2024). Online Control of Adaptive Large Neighborhood Search using Deep Reinforcement Learning. Proceedings of the International Conference on Automated Planning and Scheduling.