rsz: Add presizing mode for global sizing (Not for merge)#10669
rsz: Add presizing mode for global sizing (Not for merge)#10669jhkim-pii wants to merge 6 commits into
Conversation
Import the global sizing flow from PR The-OpenROAD-Project#10599 as a single local commit. Add the LR subproblem implementation, global sizing policy, Tcl entry points, and regression coverage needed to drive the global sizing optimization mode. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Presize editable logic cells before global sizing when requested by the global sizing presize mode. Cache swappable-cell selections by source Liberty cell, include presize changes in the resizer journal rollback point, and add regression coverage for the presize flow. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Refresh the global sizing Verilog golden to match the corrected PR The-OpenROAD-Project#10599 behavior on the current OpenROAD base. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
…ate/OpenROAD into secure-gs-lvt-presize Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a Lagrangian-Relaxation-driven global sizing and Vt assignment optimization phase (GLOBAL_SIZING) to the resizer, including the LRSubproblem and GlobalSizingPolicy classes, as well as concurrent-safe overloads in Resizer. The code review feedback highlights a potential null pointer dereference in applyPresize when an instance lacks a valid liberty cell, redundant calls to worstSlack and journalBegin in the optimization loop, and a recommendation to explicitly check for missing input ports using findLibertyPort rather than relying on zero capacitance.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddfb98c6ff
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const float wns_eps = 1e-12f; | ||
| LRParams iter_params = lr_params_; | ||
|
|
||
| float best_wns = wns_pre; |
There was a problem hiding this comment.
Checkpoint presize before early exit
When RSZ_GLOBAL_SIZING_PRESIZE_MODE is enabled and presizing alone raises WNS to setup_slack_margin, the loop exits at the first top-of-loop check before any journalEnd() checkpoint is taken; the unconditional journalRestore() at the end then rolls the presize changes back because best_wns is still seeded from the pre-presize WNS. This makes presize mode silently leave the netlist unchanged in the fast-success case, so checkpoint after applyPresize() or seed best_wns from the post-presize WNS before the early-exit check.
Useful? React with 👍 / 👎.
Add direct includes for size_t and LibertyCellSeq in GlobalSizingPolicy.cc so include-cleaner does not rely on transitive headers. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Record the presize replacement count in the global sizing policy and checkpoint the presize ECO before the LR loop can terminate early. This prevents the final journal restore from rolling back a successful presize-only pass while keeping subsequent LR sweeps journaled independently. Update the global sizing presize golden output to reflect the preserved lower-area checkpoint selected by the corrected journal flow. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
This PR is not for merge, but for sharing a code implementation.
Summary
Add presizing feature for global sizing.
UI
Add a new envar
RSZ_GLOBAL_SIZING_PRESIZE_MODEfor test.RSZ_GLOBAL_SIZING_PRESIZE_MODE = 0: Disable presizingRSZ_GLOBAL_SIZING_PRESIZE_MODE = 1: Presizing instances with min-size & highest-Vt cellsRSZ_GLOBAL_SIZING_PRESIZE_MODE = 2: Presizing instances with max-size & lowest-Vt cellsRelated