Skip to content

gpl: fix incremental mode#9610

Open
gudeh wants to merge 19 commits intoThe-OpenROAD-Project:masterfrom
gudeh:gpl-fix-incremental
Open

gpl: fix incremental mode#9610
gudeh wants to merge 19 commits intoThe-OpenROAD-Project:masterfrom
gudeh:gpl-fix-incremental

Conversation

@gudeh
Copy link
Contributor

@gudeh gudeh commented Mar 3, 2026

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
Copy link
Contributor Author

gudeh commented Mar 3, 2026

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

Copy link
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 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
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
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
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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

2 similar comments
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

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

@gudeh
Copy link
Contributor Author

gudeh commented Mar 4, 2026

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
Copy link
Contributor

github-actions bot commented Mar 9, 2026

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

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.

1 participant