Repository navigation
gpl: modify default initial position of instances to use ODB - #9353
Conversation
some users try to run gpl twice and expect it to initiate instances with the positions available at odb, also include a new TCL parameter to force use core/region center location (similar to previous default)" 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>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
more emphasis to main objects being initialized and starting of execution of intial placement versus nesterov Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a sensible change to the initial placement logic in GPL, making the use of existing ODB positions the default behavior. This is more intuitive and provides users with greater control. The new -force_center_initial_place flag is a good addition for maintaining the previous behavior when desired. The code changes are clean, and the refactoring of function names and log messages for major steps significantly improves readability and consistency. I have one suggestion to improve consistency in coordinate calculations.
| inst->setCenterLocation(region_x_max - (region_x_max - region_x_min) / 2, | ||
| region_y_max - (region_y_max - region_y_min) / 2); |
There was a problem hiding this comment.
The calculation for the region's center is a bit unusual and inconsistent with how odb::Rect::xCenter() calculates it, which is used in the else if branch below. Using (min + max) / 2 is more standard, readable, and consistent. This would prevent subtle off-by-one differences in placement for regions with odd-numbered dimensions.
| inst->setCenterLocation(region_x_max - (region_x_max - region_x_min) / 2, | |
| region_y_max - (region_y_max - region_y_min) / 2); | |
| inst->setCenterLocation((region_x_min + region_x_max) / 2, | |
| (region_y_min + region_y_max) / 2); |
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Thanks to @dbekatli for a detailed exploration of GPL behavior and exposing this limitation! |
|
Various tests fail under bazel. What was the detailed explanation? |
|
If we wish to maintain the previous behavior we have to use the new TCL parameter In other words, tests failed because we used the initial position from ODB instead of starting positions all on center which was the previous default. |
|
Ah! I just noticed I should have updated tests from other tools. I will update the tests. I also made some small changes on log messages. |
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@maliberty I expect tests to be green after they finish this time. There is also an ORFS PR that should follow: The-OpenROAD-Project/OpenROAD-flow-scripts#3838 (comment) |
…ances to odb location Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
I see this on the error for bazel: |
|
That is more informational, the real problem is |
This PR modifies the default behavior of the initial position of instances in GPL.
Now if an instance has an existing odb position, does not have a region and
-force_center_initial_placeis not used, GPL will initiate with the position from the odb. Otherwise it will initiate the instance on the core center or region center.Previously GPL would only initiate instances from the positions given by the odb if
skip_iooption was used, which is non intuitive.Notice that the initial position of instances is independent of the initial placement run, which uses the conjugate gradient methodology, and is followed by the main nesterov run.
We can think of GPL run in three steps:
Where step 1. has three options that can be set by:
-force_center_initial_place.And step 2. can be skipped with
-skip_initial_place.Now the user has more ability to control GPL behavior depending on his desires. Now he can use
-skip_initial_place, plus modifying the position of instances as given by the previous run in the flow (for example, a previous GPL run itself), and have the main nesterov run (step 3) to initiate as he wishes.