Skip to content

[GPL] Add randomized initial placement perturbation in GPL#10642

Draft
calewis wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
calewis:gpl-placement-perturbation
Draft

[GPL] Add randomized initial placement perturbation in GPL#10642
calewis wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
calewis:gpl-placement-perturbation

Conversation

@calewis

@calewis calewis commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implemented a randomized initial placement perturbation feature in the OpenROAD Global Placer (GPL). This feature shifts standard cells by discrete increments of site widths (X direction) and row heights (Y direction), bounded to a maximum of 0.5 microns in both directions.

This replacement of the legacy srand(42) and rand() non-grid-aligned cell perturbation is controlled by a seed configured via the new -random_seed flag (default is 1)

Impact

  • Replaces the srand(42) based random cell coordinate perturbation loops in global placement with a new implementation.
  • Adds the -random_seed option to the global_placement Tcl command to customize the random seed (default is 1).
  • Perturbs standard cell initial coordinates by up to 0.5 microns in both X and Y directions, yielding slightly different but deterministic placements.
  • Updates all affected global placement regression golden files (.ok and .defok files) to align with the new default seed 1 layout expectations.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

@calewis calewis requested review from a team as code owners June 11, 2026 16:37
@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.

@calewis calewis force-pushed the gpl-placement-perturbation branch from fbc9177 to 0eddb5e Compare June 11, 2026 19:21
@github-actions github-actions Bot added size/M and removed size/S labels Jun 11, 2026
Comment thread src/gpl/src/nesterovBase.cpp Outdated
Comment on lines +1963 to +1964
// microns. We guarantee at least 1 site/row step of shift if perturbation is
// enabled.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is that guarantee needed? Global placement doesn't legal the result.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's not needed, you want to simplify to something else?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@calewis calewis marked this pull request as draft June 16, 2026 23:28
@calewis calewis force-pushed the gpl-placement-perturbation branch 3 times, most recently from 4bad4a2 to 1eba57f Compare June 17, 2026 23:17
Signed-off-by: Drew Lewis <cannada@google.com>

TAG=agy
CONV=0fed8794-10c3-4c6f-bdf2-3dedf6c02c30
@calewis calewis force-pushed the gpl-placement-perturbation branch from 1eba57f to 3e05f7b Compare June 18, 2026 20:41
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