[AP] Add Nesterov Placer Option - #3641
Conversation
AlexandreSinger
left a comment
There was a problem hiding this comment.
Looks very interesting @WilliamZhang20 !
There are a few things I want to see in order to bring this in.
The most important thing is documentation. I am really not following the algorithm as it is written. I can see and understand the log-sum-exp model used to estimate the smooth-wirelength object, but the way you are modeling density is not clear to me. The overall optimization algorithm is also not very clear to me. I am familiar with Nesterov's method, but the exit condition for the overall algorithm is not very well defined. Most importantly, I would like to see clear documentation on the algorithm that you are using for modeling density. Modelling density in heterogenous FPGAs (which is the common target of VTR) is the most difficult part of AP. This needs to be documented so it can continue to be built on in the future.
The next important thing I need to see is if this algorithm is working and is scaling on more-modern heterogenous FPGAs and benchmarks. The results you mentioned in your comment are from 4 very small circuits from MCNC (which is a benchmark we do not use for quality of results since they are too simple). I am interested to see how the results look on the VTR benchmarks: https://docs.verilogtorouting.org/en/latest/vtr/benchmarks/#vtr-benchmarks
A task list for the VTR benchmarks can be found here: https://github.com/verilog-to-routing/vtr-verilog-to-routing/blob/dcaa711dcc615ae999ef37003637d4b3f4148616/vtr_flow/tasks/regression_tests/vtr_reg_nightly_test3/vtr_reg_qor_chain/config/config.txt
I would like to see the wirelength, CPD, and runtime for these circuits and how they compare to the default flow on your machine. This will give us a better understanding of the algorithm.
Feel free to reach out if you have any questions.
|
@vaughnbetz FYI |
|
Thanks @WilliamZhang20 . To build on what Alex said, I'd want to see more extensive QoR data before merging into master. In addition to the VTR designs, you should run on the Titan designs so you are checking on more than one architecture, and because the Titan designs are larger. Another important suite is Koios, but results on two large suites would be enough to get a good sense of where the algorithm stands and to tune it for now. You can find the steps to run Titan and check QoR at https://docs.verilogtorouting.org/en/latest/README.developers/#example-titan-benchmarks-qor-measurement . Reading the whole QoR section (just before that) would be a good idea too, to get a sense of the data we watch closely. |
|
Latest algorithmic changes include:
QoR results as of July 3, 2026 (TLDR: WL slightly better on all benchmarks; CPD and runtime are the same or slightly worse) |
|
Thanks @WilliamZhang20 . Are crit_path_delay and total_wirelength both post routing? |
|
All of Alex's comments have been resolved. Some algorithmic adjustments have resulted in better-than-baseline QoR and runtime geometric mean across all benchmarks tested. However, some outliers are likely an obstacle to further improvement without extending the scope, Overall Table (ratios wrt B2B): - updated 7/10/2026
Omitted Benchmark Circuits:
Post Full-Legalization Ratios: (out of date, from 7/9/2026) Raw Data: (out of date, from 7/9/2026) |
|
Thanks William. Can you also add the runtime ratios to the summary (e.g. total flow, ap, total pack + place).VaughnOn Jul 9, 2026, at 10:24 AM, William Zhang ***@***.***> wrote:WilliamZhang20 left a comment (verilog-to-routing/vtr-verilog-to-routing#3641)
All of Alex's comments have been resolved. Some algorithmic adjustments have resulted in better than baseline QoR and runtime geometric mean across all benchmarks tested.
However, some outliers are likely an obstacle to further improvement without extending the scope, LU_Network being one of the worst (apparently due to I/O Chains). However, for those outliers and other examples, the WL and CPD are actually better than B2B after full legalization, but the gains get eroded by packing and/or detailed placement.
Overall Table:
Benchmark suite
Circuits
Routed WL
Critical-path delay
VTR
8
0.992
1.029
Koios
24
0.979
0.963
Titan
21
0.993
1.018
Titanium
16
0.985
0.990
All
69
0.986
0.993
Post Full-Legalization Ratios:
titan_cpd_erosion.xlsx
Raw Data:
ap_headtohead_vtr.xlsx
ap_headtohead_titanium.xlsx
ap_headtohead_titan.xlsx
ap_headtohead_koios.xlsx
ap_headtohead_ALL.xlsx
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
@WilliamZhang20 Why were those circuits ommited? Many of those are some of the larger circuits. You ommited 6 of the around 30 koios benchmarks. Ommiting sparcT1_chip2 seems a bit random to drop out? Also in you major summary, I am interested to see the post-GP WL and CPD estimates for the different benchmarks. I want to know if the gains are coming from the global placer or if they are coming from the interaction with the full-legalizer and detailed placer. Edit: Can you also report the device width. This is just a curiosity on my part. If you are not fixing the device widths, you may get different device widths; making the two algorithms less comparable. The device width is calculated from the packing (full legalization solution), so it can change based on the global placement. |
|
Added runtime ratios to the previous comment above. A table showing where the gains come from is below via ratios wrt. B2B. For CPD (the weak point), I see that gains come from full legalization and are weakened after detailed placement & routing. Wirelength (HPWL est. through post_dp, routed WL at final)
Critical-path delay (estimated through post_dp, routed at final)
|
|
Thanks. Looks like it might be a 5% faster AP stage with roughly the same QoR. |
|
@AlexandreSinger @vaughnbetz Thank you. What would be the conditions for merging this PR? I believe that modifying later stages to account for the downstream degradation of QoR would be done in a separate PR. |
Description
Adds a Nesterov-style nonlinear analytical global placer for AP, selectable with:
(alongside the existing
simplglobal placer). The placer optimizes a smooth nonlinear objective over movable AP block coordinates:where$W_\gamma$ is a smooth weighted-average wirelength approximation and $D$ is a continuous, primitive-vector-aware electrostatic bin-density penalty. The optimizer:
It supports timing-aware smooth wirelength weighting:
where$\alpha =$ $\mathrm{crit}(n)$ is the pre-cluster setup criticality of the atom net. For designs with long direct I/O-chain nets, it additionally applies a light chain-cohesion term to keep pad/obuf/OCT/termination chains coherent through the AP-to-APPack handoff; this term is gated off automatically for designs without such chains.
--ap_timing_tradeoffandRelated Issue
Issue #3634
Motivation and Context
This provides a nonlinear first-order alternative to the existing QP/B2B analytical solvers, reusing the existing AP netlist, density manager, and legalization infrastructure. It explores a placer structure closer to modern smooth-wirelength + electrostatic-density formulations while remaining a drop-in
--ap_global_placeroption.How Has This Been Tested?
Full paired head-to-head vs the default
simpl+lp-b2bAP flow over 69 circuits (VTR, Koios, Titan, Titanium suites, fixed channel widths). Geomean nonlinear-nesterov / b2b (< 1 = nesterov better):Nesterov is at or ahead of b2b on all three axes at the geomean; the residual per-circuit CPD outliers are dominated by a single virtual-I/O-clock timing artifact (LU_Network), where core-logic timing is already at parity.
Types of changes
Checklist: