Skip to content

gpl: reset tile references when rebuilding the routing grid - #11917

Merged
LucasYuki merged 1 commit into
The-OpenROAD-Project:masterfrom
naveenvenk17:nv-gpl-tilegrid-reset-signed
Oct 23, 2026
Merged

LucasYuki merged 1 commit into
The-OpenROAD-Project:masterfrom
naveenvenk17:nv-gpl-tilegrid-reset-signed

Conversation

@naveenvenk17

Copy link
Copy Markdown
Contributor

I found this while checking the default-off results for #11899.

TileGrid::initTiles() resizes the tile storage but keeps appending to its pointer list. Repeating initialization leaves duplicate pointers; changing the grid size can also leave references to old storage. The duplicates distort RUDY's weighted congestion metric because its percentile sample sizes are rounded up.

Clear the list and reserve space before rebuilding it.

Tested on the GCP Linux VM, with test-result caching disabled:

  • All three new cases fail on the unchanged production control and pass with the fix. They cover repeated initialization, growth/shrinkage, pointer uniqueness, and actual nonuniform weighted-congestion calculations.
  • 100 shuffled repetitions passed: 300 case executions.
  • All seven repository formatting/lint/duplicate-ID checks passed.
  • The full CPU GPL suite executed 110 targets: 109 passed. The remaining mt_invariance01 failure is an existing hardware INFO-line/golden-log mismatch. Its raw log, diff and DEF are byte-identical to the pure-upstream control, and the DEF matches the unchanged golden. Four GPU targets were skipped.

No golden files or metric limits were changed. This separates the grid bug from the opt-in inflation work in #11899.

Signed-off-by: Naveen Venkat <81929600+naveenvenk17@users.noreply.github.com>
@naveenvenk17
naveenvenk17 requested a review from a team as a code owner October 21, 2026 23:29

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

Copy link
Copy Markdown
Contributor

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 ensures that the tiles_ vector is cleared and reserved during TileGrid::initTiles initialization to prevent stale pointers. It also introduces a comprehensive set of unit tests in route_base_test.cpp to verify grid reinitialization, resizing, and weighted congestion calculations. I have no feedback to provide.

@naveenvenk17

Copy link
Copy Markdown
Contributor Author

I also ran all three new cases under ASan on the VM at bd6324e9. They passed with test-result caching disabled. Leak detection was off, as in the repo's ASan configuration.

@LucasYuki
LucasYuki merged commit cf47351 into The-OpenROAD-Project:master Oct 23, 2026
21 checks passed
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