Skip to content

rsz: Add the setup repair profiler - #11796

Merged
maliberty merged 3 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-rsz-setup-profiler
Oct 17, 2026
Merged

maliberty merged 3 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-rsz-setup-profiler

Conversation

@jhkim-pii

@jhkim-pii jhkim-pii commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Part 3 of 12 of the PARALLEL_EVAL setup repair stack. It builds on #11795 and also shows the commits of parts 1 to 2; its own change is the last commit.

Summary

  • Add a setup repair profiler that records where repair_timing -setup spends its time and how WNS and TNS move. Mode 0, the default, writes nothing and costs nothing.

Changes

  • repair_timing -setup gains -profile_mode and -profile_dir; each call writes one run_N directory.
  • Mode 1 writes stats.csv (time per stage), timing.csv (WNS/TNS samples) and metadata.csv; mode 2 adds events.csv with the candidates, moves, ECO journals and database edits.
  • The profiler only observes: MoveCommitter reports each apply and journal, Resizer and Rebuffer time their parasitics and timing updates, and the LEGACY, LAST_GASP and CRIT_VT_SWAP policies mark their stages, passes and stop reasons.
  • The progress table moves into ProgressReporter with the same output.
flowchart LR
  RT["repair_timing -setup<br/>-profile_mode N"] --> O["Optimizer"]
  O --> PH["LEGACY, LAST_GASP,<br/>CRIT_VT_SWAP"]
  PH -- "stages, passes,<br/>stop reasons" --> PR["RepairSetupProfiler"]
  MC["MoveCommitter"] -- "moves, journals" --> PR
  RZ["Resizer, Rebuffer"] -- "RC and STA update times" --> PR
  PR --> F["run_N/<br/>stats.csv, timing.csv,<br/>metadata.csv, events.csv"]
Loading

Stack

  1. test: Add LEGACY repair setup path regressions #11794 test: Add LEGACY repair setup path regressions
  2. rsz: Remove MT1, MEASURED_VT_SWAP, LEGACY_MT and the RSZ_* knobs #11795 rsz: Remove MT1, MEASURED_VT_SWAP, LEGACY_MT and the RSZ_* knobs
  3. rsz: Add the setup repair profiler #11796 rsz: Add the setup repair profiler (this PR)
  4. rsz: Model side paths in the Mt delay estimator #11797 rsz: Model side paths in the Mt delay estimator
  5. rsz: Add the RebufferMt buffer-tree move #11798 rsz: Add the RebufferMt buffer-tree move
  6. rsz: Add the experimental PARALLEL_EVAL setup repair policy #11799 rsz: Add the experimental PARALLEL_EVAL setup repair policy
  7. rsz: Add SplitLoadMt to PARALLEL_EVAL #11800 rsz: Add SplitLoadMt to PARALLEL_EVAL
  8. rsz: Add SwapPinsMt to the PARALLEL_EVAL WNS tail #11801 rsz: Add SwapPinsMt to the PARALLEL_EVAL WNS tail
  9. rsz: Add UnbufferMt to the PARALLEL_EVAL WNS tail #11802 rsz: Add UnbufferMt to the PARALLEL_EVAL WNS tail
  10. rsz: Add SizeDownFanoutMt to the PARALLEL_EVAL WNS tail #11803 rsz: Add SizeDownFanoutMt to the PARALLEL_EVAL WNS tail
  11. rsz: Add the per-move analysis and the rebuffer accuracy report #11804 rsz: Add the per-move analysis and the rebuffer accuracy report
  12. doc: Update the rsz setup repair architecture #11805 doc: Update the rsz setup repair architecture

What: 16 timing-path cases on asap7, gf180mcu, Nangate45, sky130hd and
sky130hs, each run with -phases LEGACY.

Why: the golden logs show that the later changes of the setup repair
stack leave LEGACY unchanged.

How: DEF, SDC and Tcl per case with golden logs; no code change.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: remove the experimental MT1, MEASURED_VT_SWAP and LEGACY_MT
policies with the MeasuredVtSwap move, turn the RSZ_* environment knobs
into fields of a new OptimizationPolicyConfig, and rename the
report_delay_estimator_accuracy estimators to legacy and stage_window.

Why: PARALLEL_EVAL replaces the MT policies and the delay estimator
accuracy report replaces the measured VT swap; a run should not depend
on its shell. The estimator names legacy_mt and mt named the removed
policies, and stage_window says which model runs.

How: the policies, their phase tokens, tests and architecture notes go,
with the target prewarm hook that only LEGACY_MT used; the knobs,
including the STA slew bias of the delay estimator, are config fields;
-estimator accepts legacy and stage_window only. LEGACY results do not
change, nor do any results when no RSZ_* variable is set.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
What: repair_timing -setup gains -profile_mode and -profile_dir. Mode 1
records time per stage and WNS/TNS samples, mode 2 adds the moves,
journals and database edits; each call writes one run_N directory.

Why: to see where setup repair spends its time and how timing moves,
without changing the repair.

How: RepairSetupProfiler observes hooks in MoveCommitter, Resizer,
Rebuffer and the LEGACY, LAST_GASP and CRIT_VT_SWAP policies; the
progress table moves into ProgressReporter. Mode 0 changes nothing.

Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
@jhkim-pii jhkim-pii self-assigned this Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

The number of changes in this pull request is too large for Gemini Code Assist to generate a review.

@jhkim-pii

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T05:50:54.418330Z b3702e0 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3702e0e1b

ℹ️ 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".

Comment thread src/rsz/src/RepairSetupProfiler.hh
Comment thread src/rsz/src/policy/SetupCritVtSwapPolicy.cc
Comment thread src/rsz/test/BUILD
Comment thread src/rsz/src/RepairSetupProfiler.hh
@maliberty
maliberty merged commit d69ff3e into The-OpenROAD-Project:master Oct 17, 2026
21 checks passed
@maliberty
maliberty deleted the secure-rsz-setup-profiler branch October 17, 2026 06:31
@maliberty

Copy link
Copy Markdown
Member

Codex looks minor but maybe worth a follow up later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants