Skip to content

gpl: fix incremental mode - #9610

Merged
eder-matheus merged 23 commits into
The-OpenROAD-Project:masterfrom
gudeh:gpl-fix-incremental
Mar 11, 2026
Merged

eder-matheus merged 23 commits into
The-OpenROAD-Project:masterfrom
gudeh:gpl-fix-incremental

Conversation

@gudeh

@gudeh gudeh commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

This PR fixes multiple issues occurring in gpl incremental mode.

Changes include:

  • Initial placement:
    • Properly consider locked instances during initial placement.
  • Nesterov:
    • If instance is locked, do not use small perturbation in nesterov instance initiation.
    • Do not allow locked instances to move during nesterov runs.
    • Properly refresh isConverged_ variable (previously we would never run the second nesterov run if we reach rough target overflow of 20% before the fixed 300 iterations).
  • Special options for incremental mode:
    • Use uniform density instead of 0.7 default for incremental mode nesterov runs.
    • Increase init density penalty to 1 for second nesterov run (avoid restarting placement).
  • Debug mode:
    • Generate one gif for each nesterov run separately.

This PR addresses issue #9542

gudeh added 10 commits February 28, 2026 12:48
refresh isConverged for second incremental stage
anticipate setting instances as locked,
fix considering locked instances at initial placement

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
… all unlocked)

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@gudeh

gudeh commented Mar 3, 2026

Copy link
Copy Markdown
Contributor Author

This changes should be no-op for master (since during stage 3-4 we rsz is not performing any modification on replace_arith_modules before when gpl incremental mode is called).

I triggered a secure-CI at: https://jenkins.openroad.tools/blue/organizations/jenkins/OpenROAD-flow-scripts-Private/detail/secure-gpl-fix-incremental/4/pipeline

@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 introduces several fixes and improvements for the incremental global placement mode. The changes to handle locked instances within the Nesterov placer and the enhancements to debug visualization appear correct and well-implemented. However, I've identified a potential issue in the initial placement logic that may not correctly fix locked instances to their positions. Additionally, there's a minor point of improvement in the heuristics for the final placement stage.

Comment on lines +287 to +292
if (inst->isLocked()) {
listX.emplace_back(idx, idx, 1.0f);
listY.emplace_back(idx, idx, 1.0f);
fixedInstForceVecX_(idx) = inst->cx();
fixedInstForceVecY_(idx) = inst->cy();
}

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.

high

While adding a diagonal term to the matrix for locked instances is a step towards fixing their positions, this implementation is incomplete and may not work as intended. The subsequent loop that processes nets will add significant forces from connected movable instances, effectively pulling the 'locked' instances away from their fixed positions. With large net weights, a locked instance's position will be dominated by its neighbors rather than its specified fixed location.

To correctly fix the instances, they should be treated as fixed terminals throughout the matrix construction. This means the net processing loop should not add any matrix terms for connections involving locked instances; instead, they should contribute to the right-hand side (force vector) for any movable instances they are connected to.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The secure-CI run with ID 5 should address this. I am waiting for it to finish to make sure it is no-op, as expected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

secure-CI proves no-op
image

Comment thread src/gpl/src/replace.cpp Resolved
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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

2 similar comments
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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

gudeh added 4 commits March 3, 2026 17:00
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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

1 similar comment
@github-actions

github-actions Bot commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

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

@gudeh

gudeh commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor Author

I noticed gpl incremental in stage 3-4 is potentially resetting the whole placement and undoing RD and TD work! I created a separated PR for skipping incremental when we don't find any unlocked instances at: #9650

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

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

@maliberty

Copy link
Copy Markdown
Member

merge conflict

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@eder-matheus
eder-matheus merged commit 02fc8ab into The-OpenROAD-Project:master Mar 11, 2026
12 checks passed
@gudeh
gudeh deleted the gpl-fix-incremental branch March 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants