mpl: fix partitioner fails on cluster dominated by a macro#10581
mpl: fix partitioner fails on cluster dominated by a macro#10581joaomai wants to merge 7 commits into
Conversation
This error seems to occur when you have a macro dominated block with just a few standard cells. Added a test case that I validated failed with HEAD and passes with my change. B:513351985 Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com> clang-format Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
Signed-off-by: João Mai <jmai@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to handle clusters dominated by a single large macro in the ClusteringEngine. When a macro's area exceeds half of the parent cluster's area, it is manually split into its own HardMacroCluster to prevent partitioning issues with TritonPart's weighted min-cut algorithm. New tests are added to verify this behavior. The review feedback points out a critical logic bug where the function fails to return if the remaining cluster is no longer large, leading to unnecessary partitioning. Additionally, improvements are suggested for safety (checking if the macro list is empty before finding the max element), type safety (avoiding a reference to a pointer in a temporary vector), and a typo correction.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: João Mai <jmai@precisioninno.com>
Summary
Updates the
breakLargeFlatClustermethod to take into consideration clusters dominated by a macro (over 50% of the cluster area corresponds to a single macro), which makes the partitioning problem too difficult or impossible down the line.Type of Change
Impact
Tool doesn't fail for clusters dominated by a single macro.
Verification
./etc/Build.sh).