Skip to content

mpl: check Pusher moves overlaps correctly#10332

Open
openroad-ci wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-pusher-overlap-bugfix
Open

mpl: check Pusher moves overlaps correctly#10332
openroad-ci wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:mpl-pusher-overlap-bugfix

Conversation

@openroad-ci
Copy link
Copy Markdown
Collaborator

Summary

Fixes #10330.
This PR fixes a bug where the Pusher would overlap macros during the push the boundaries if they were diagonally aligned. This was fixed by keeping the cluster_box rectangle updated between pushes instead of updating it per push.

The PR also includes a small performance improvement by:
-Checking if a macro is in a cluster using the cluster ID instead of comparing against the hard macro list of the cluster
-Only moving the hard macros during a push if the cluster_box doesn't overlap with anything

Type of Change

  • Bug fix

Impact

Macros don't overlap now.

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 signed my commits (DCO).

Related Issues

#10330

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 refactors the macro cluster movement logic in hier_rtlmp.cpp to improve efficiency. The implementation now moves the cluster's bounding box and performs overlap checks using the cluster ID before committing the movement to individual hard macros. The overlapsWithHardMacro function signature was also updated to reflect this change. I have no feedback to provide as the review comment regarding the unused variable is incorrect; the variable is still required for the final movement commit.

@joaomai joaomai requested a review from AcKoucher May 4, 2026 19:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

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

Copy link
Copy Markdown
Contributor

@AcKoucher AcKoucher left a comment

Choose a reason for hiding this comment

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

Code wise LGTM.

Is it possible to include a test to prevent regressions? My hope is that it can be done in Cpp.

@github-actions github-actions Bot added size/M and removed size/S labels May 5, 2026
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.

clang-tidy made some suggestions

Comment thread src/mpl/test/cpp/TestPusher.cpp Outdated
Comment thread src/mpl/test/cpp/TestPusher.cpp Outdated
Comment thread src/mpl/test/cpp/TestPusher.cpp
@joaomai
Copy link
Copy Markdown
Contributor

joaomai commented May 5, 2026

CI finishes with the same issues as master (nightly).

@joaomai
Copy link
Copy Markdown
Contributor

joaomai commented May 5, 2026

@AcKoucher
Writing the tests made me realize that there is a bias to which boundary a macro is pushed if a single move doesn't overlap, but doing both moves overlaps with something. Currently, it follows the Boundary enum ordering (B -> L -> T -> R), maybe it would be better to use the closest boundary instead?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

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

@AcKoucher
Copy link
Copy Markdown
Contributor

@AcKoucher
Writing the tests made me realize that there is a bias to which boundary a macro is pushed if a single move doesn't overlap, but doing both moves overlaps with something. Currently, it follows the Boundary enum ordering (B -> L -> T -> R), maybe it would be better to use the closest boundary instead?

Good catch. Sure. That makes sense.

There are failures in the BAZEL build regarding include:

src/mpl/test/cpp/TestPusher.cpp:9:10: error: use of private header from outside its module: '../../src/hier_rtlmp.h' [-Wprivate-header]
     9 | #include "../../src/hier_rtlmp.h"
       |          ^
src/mpl/test/cpp/TestPusher.cpp:10:10: error: use of private header from outside its module: '../../src/object.h' [-Wprivate-header]
   10 | #include "../../src/object.h"
      |          ^

oharboe added a commit to oharboe/OpenROAD that referenced this pull request May 6, 2026
Three new patterns from the dogfood survey:

1. `Failed to run image '<image>'` — the Jenkins docker-workflow
   plugin couldn't `docker run` the build container. Appears in
   three wrappers on PR The-OpenROAD-Project#10340 (`Caught exception: …`,
   `ERROR: A fatal error occurred …`, and a bare
   `java.io.IOException: …`); match the common substring rather
   than any one wrapper. Maps to the existing `container-registry`
   source.

2. `Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId:`
   — Jenkins-side workflow exception, distinct from a step that
   crashed inside user code. New `jenkins-pipeline-error` source.

3. New `pipeline_outcome` parser surfaces the
   `Finished: <UNSTABLE|ABORTED|NOT_BUILT|SUCCESS>` marker from the
   tail of the Jenkins log:
   - UNSTABLE / ABORTED / NOT_BUILT → info finding "pipeline ended X"
     so the contributor knows it wasn't a hard FAILURE.
   - SUCCESS → info finding "GitHub status is likely stale" because
     observing this with a `--pr` that GitHub flagged failed almost
     always means the commit-status got stuck (PR The-OpenROAD-Project#10332 case).
   - FAILURE → no finding (already covered by the parsers that
     captured the actual failing step).

Wired into both `repos.toml` lists and the parser registry.
Tests cover all three new shapes plus the SUCCESS / UNSTABLE /
no-outcome cases. 30/30 Bazel tests pass.

Live dogfood diff vs. P0:
- PR The-OpenROAD-Project#10286 (UNSTABLE) now surfaces the outcome explicitly.
- All other PRs unchanged in outcome.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@github-actions github-actions Bot added size/XL and removed size/M labels May 6, 2026
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.

clang-tidy made some suggestions

Comment thread src/mpl/src/pusher.cpp
Comment thread src/mpl/src/pusher.cpp
Comment thread src/mpl/src/pusher.cpp
Comment thread src/mpl/src/pusher.cpp
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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

@joaomai joaomai requested a review from AcKoucher May 6, 2026 19:02
@openroad-ci openroad-ci force-pushed the mpl-pusher-overlap-bugfix branch from 69e8cab to 1fa1043 Compare May 13, 2026 19:13
@openroad-ci openroad-ci requested a review from a team as a code owner May 13, 2026 19:13
@github-actions github-actions Bot added size/S and removed size/XL labels May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

joaomai added 2 commits May 14, 2026 03:05
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
@openroad-ci openroad-ci force-pushed the mpl-pusher-overlap-bugfix branch from 1fa1043 to 384e394 Compare May 14, 2026 03:09
@github-actions
Copy link
Copy Markdown
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MPL: overlapping macros after they are pushed to boundaries

3 participants