Loading…
Building a Macro Placer for the HRT Global Placement Challenge

Building a Macro Placer for the HRT Global Placement Challenge

hardware global placement asic openroad placement algo algorithms machine learning marco placer

The HRT global placement challenge (partcleda/macro-place-challenge-2026) scores submissions on a proxy cost of WL + 0.5*Density + 0.5*Congestion across the 17 IBM ICCAD04 benchmarks, with zero macro overlaps as a hard constraint. This is a walkthrough of how the placer actually works, and the reasoning behind each piece, going in the order the design came together

Getting to a valid placement first

Before touching optimization at all, the first working piece was a legalizer, since a placement that scores well but overlaps is worthless under the rules. The legalizer sorts macros by area, largest first, on the idea that big macros are harder to place later once the canvas fills up. For each macro it checks whether the initial position collides with anything already placed, using a separation test on half-width and half-height sums plus a small gap. If it collides, it searches outward in expanding rings from the original position and takes the nearest legal spot by squared displacement. A cleanup pass runs afterward to catch and resolve any pairs that still overlap by nudging them apart along whichever axis has less overlap

This alone gave a legal submission and, more importantly, a working evaluation loop end to end: load benchmark, place, score. Everything after this was about improving the score without breaking legality

Adding cheap variance before adding real optimization

Rather than jumping straight into a heavier optimizer, the next step was running the legalizer from a few different initializations, one unperturbed and two with Gaussian noise added to the initial positions at different scales, and keeping whichever result scored best. This is a low-cost way to sample some of the variance that comes purely from where macros start, before spending effort on an actual placement algorithm. It also set the pattern that carried through the rest of the pipeline: generate a candidate, score it exactly against the real proxy metric, keep the best one and discard the rest

The legalizer itself also needed tuning at this point. The initial ring-search parameters were conservative, and on the denser benchmarks legalization alone was consuming a large share of the time budget before any optimization even started

First real optimizer: electrostatic density placement

With legalization solid, the next step was an actual global placement stage that runs before legalization rather than relying on it entirely. The first version followed the ePlace/RePlAce approach directly: a smooth wirelength gradient pulling macros together, combined with an electrostatic density term that treats macro area as a charge distribution, solves a Poisson equation over the canvas via FFT, and uses the resulting field gradient to push macros out of overdense regions

This had a real correctness problem. The density grid and its gradient have to line up exactly, and a subtle indexing or sign mismatch between the two doesn’t crash anything, it just produces a placement that looks fine visually but scores worse than plain legalization. That kind of bug only shows up by comparing proxy scores directly, not by inspecting the output, which made it slow to track down. On top of that, every optimization step required rebuilding a density grid and running a forward and inverse FFT, which was expensive per iteration given how many iterations were needed to converge

Switching to a lighter wirelength model

Given the time budget per benchmark, roughly 1.2 seconds per macro plus a fixed overhead, capped at 20 minutes, the electrostatic approach was too slow to iterate on productively. It was replaced with a log-sum-exp approximation of wirelength, which is differentiable everywhere (true half-perimeter wirelength has kinks at the bounding box edges) and converges to true HPWL as the smoothing parameter shrinks. Its gradient works out to a softmax over each net’s pin positions, so it can be computed directly per net without automatic differentiation

The tradeoff here was dropping the density term from the gradient step entirely and letting the legalizer handle overlaps after the fact. Pure wirelength descent has no force pushing macros apart, so it tends to pull them into overlapping clusters, which the legalizer then has to untangle. This is a real quality cost relative to a properly working density-aware optimizer, but it made each iteration far cheaper, and with Nesterov momentum and a decaying learning rate it converged to a reasonable starting layout quickly enough to leave time for refinement stages afterward

A disqualified submission

One submission got disqualified outright for producing overlaps in the final output. The cause was structural: the optimization and legalization steps were treated as separate phases without a shared guarantee that every move in between stayed legal. Refinement logic added later in the pipeline could move a macro without going through the same overlap check the legalizer used, so a move made in one stage could quietly break legality by the time the next stage ran

The fix was to make every later refinement stage check for overlap before accepting any move, not just at the start and end of the whole pipeline, and to re-legalize after any operation that touches many macros at once, such as a large neighborhood search step or a canvas rescale. After this, every candidate move anywhere in the pipeline is either rejected outright for introducing an overlap, or accepted and immediately known to still be legal

With legality guaranteed at every step, the remaining work was about improving the score through local search, since the global gradient step alone was not enough to get a competitive result

Two pieces did most of the work here. The first is a simulated annealing pass over a sparse graph built from the netlist, where each net is expanded into a bounded number of weighted pairs rather than fully connecting every pin to every other pin in the net, to keep the graph small. Each move is one of three kinds, picked at random: a small random jitter, a pull toward the weighted centroid of a macro’s connected neighbors, or a swap with a connected macro. Every move is checked for overlap before it is allowed, and otherwise accepted or rejected using a Metropolis criterion against local wirelength cost plus a term that discourages drifting too far from the starting position, since large drifts tend to help wirelength while hurting density and congestion. Temperature decays over the run from a large fraction of the canvas diagonal down to a small one

The second is coordinate descent against the exact proxy metric rather than any smooth approximation of it. One macro is moved at a time to one of several candidate points, either toward its net neighbors or spread outward to relieve congestion, and the move is kept only if it actually improves the real proxy score, evaluated directly. This runs in passes with a shrinking search radius, coarse first then fine, stopping early once consecutive passes stop producing meaningful gains

On top of that, a large neighborhood search picks a small connected patch of macros, re-places just that patch by blending toward its wirelength neighbors and toward the canvas center, re-legalizes only within the patch, and accepts the whole patch move only if it improves the global proxy score. This lets the search escape local optima that single-macro moves cannot, without risking the legality of the rest of the layout

The final pipeline

Put together, each benchmark runs through legalization, the simulated annealing pass, coordinate descent, large neighborhood search, and a final pass that re-optimizes soft macro positions against the best hard macro placement found, kept only if it does not hurt the score. The whole sequence runs for two to three independent starts with different initial perturbations, keeping the best result across all of them, and time is allocated to each stage as a fraction of whatever budget remains rather than a fixed iteration count, so it adapts automatically across benchmark sizes

Result

The final submission scored a proxy cost of 1.3241 with 0 overlaps [Rank 50]

Where the tradeoffs actually sit

The clearest tradeoff in the whole design is replacing the electrostatic density model with a wirelength-only gradient plus a legalizer. That decision was made for iteration speed under a hard time cap across 17 benchmarks, not because the simpler model was expected to be better. Whether a correctly tuned electrostatic version would have scored higher on the actual proxy metric was never directly compared once the switch was made, so that specific question stays open