Skip to content

rsz: skip ensureWireParasitic in repair_design hot path#10507

Open
minjukim55 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-rsz-issue1676-v2
Open

rsz: skip ensureWireParasitic in repair_design hot path#10507
minjukim55 wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-rsz-issue1676-v2

Conversation

@minjukim55
Copy link
Copy Markdown
Contributor

Summary

  • Pass a local load_cap from BufferedNet wire RC to `resizeToTargetSlew` as a hint, skipping the expensive `ensureWireParasitic + STA loadCap` query on the `repair_design` buffer-insertion hot path.
  • `repairNetWire` hint reflects only the wire the buffer drives (`buf_dist × wire_cap + ref_cap`), not the full Steiner edge.
  • `repairNetJunc` passes `cap_left`/`cap_right` since the buffer is placed at the junction location.
  • Gate on `parasitics_src_ == kGlobalRouting` so the optimization applies only where the FastRoute incremental setup is the cost. Placement-mode `repair_design` (the bulk of OR's own test suite) keeps the existing path.

Type

  • Performance optimization (no functional change at the API level; existing callers without a hint take the same code path)

Impact

Profiled on a large customer design (497k inst) where `ensureWireParasitic` accounted for 96% of `repair_design` wall time (5,860 calls × ~390ms FastRoute setup each).

Measured on the same design (same cts.odb, same OR commit, 5_1_grt step only re-run):

Metric Baseline Fix Δ
`repair_design` wall 1,570s 312s -79% (5× faster)
Total GRT step (5_1_grt) 3,996s 2,842s -29%
Buffers inserted in RD 6,360 6,360 exact match
Final Setup TNS -343.7 -341.7 better
Final Hold TNS -0.0599 -0.0323 better (-46%)
Final Hold viol count 32 23 better (-9)
Final Setup WS -0.1444 -0.1470 -1.8%

Verification

  • All 7 existing `rsz.repair_design*` and 11 `rsz.repair_wire*` regression tests pass.
  • clang-format applied. Diff: 4 files in `src/rsz/`, +34 / -15.

Related Issues

See private issue The-OpenROAD-Project-private/OpenROAD-flow-scripts#1676.

(Note: supersedes #3433 which had its head branch renamed.)

@minjukim55 minjukim55 requested a review from a team as a code owner May 26, 2026 04:08
@minjukim55 minjukim55 requested a review from povik May 26, 2026 04:08
@minjukim55 minjukim55 self-assigned this May 26, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an optional load_cap_hint parameter to resizeToTargetSlew and makeRepeater to optimize performance by skipping incremental FastRoute calls during global routing. A review comment suggests addressing implicit type conversions and truncation issues when calculating buffer_load_cap in RepairDesign.cc by using explicit casting and direct double arithmetic.

Comment thread src/rsz/src/RepairDesign.cc Outdated
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Welcome to OpenROAD! Thanks for opening your first PR.
Before we review:

Please ensure:

  • CI passes
  • Code is properly formatted
  • Tests are included where applicable
    A maintainer will review shortly!

@minjukim55
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@minjukim55 minjukim55 force-pushed the secure-rsz-issue1676-v2 branch from e5fcad7 to 217bf3b Compare May 26, 2026 05:38
Pass a local load_cap computed from BufferedNet wire RC to
resizeToTargetSlew as a hint. When supplied, the hint skips the
expensive ensureWireParasitic + STA loadCap query that triggers an
incremental FastRoute setup per buffer in the repair_design driver
loop.

For repairNetWire, the hint reflects the wire that the buffer actually
drives (buf_dist x wire_cap + ref_cap), not the full Steiner edge.
repairNetJunc passes cap_left / cap_right since the buffer is placed
at the junction location.

Profiling on a large customer design (497k inst) showed
ensureWireParasitic accounting for 96% of repair_design wall time
(5,860 calls x ~390ms FastRoute setup each).

See private issue The-OpenROAD-Project-private/OpenROAD-flow-scripts#1676.

Signed-off-by: Minju Kim <mkim@precisioninno.com>
@minjukim55 minjukim55 force-pushed the secure-rsz-issue1676-v2 branch from 217bf3b to dbdd58f Compare May 26, 2026 05:42
@minjukim55
Copy link
Copy Markdown
Contributor Author

@minjukim55 minjukim55 requested a review from maliberty May 26, 2026 09:24
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.

1 participant