-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpl: revert if diverge #6561
gpl: revert if diverge #6561
Conversation
Signed-off-by: Augusto Berndt <[email protected]>
adjust some routability messages Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
There was a problem hiding this 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
src/gpl/src/nesterovPlace.cpp
Outdated
diverge_snapshot_iter_, | ||
diverge_snapshot_average_overflow_unscaled_, | ||
min_hpwl_); | ||
curA = diverge_snapshotA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: Value stored to 'curA' is never read [clang-analyzer-deadcode.DeadStores]
curA = diverge_snapshotA;
^
Additional context
src/gpl/src/nesterovPlace.cpp:572: Value stored to 'curA' is never read
curA = diverge_snapshotA;
^
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
@gudeh Is this a solution or a way to cope with the algorithm diverging unexpectedly/undesirably? |
This PR only adds the new non-default option, it has no change in functionality. In another ORFS PR I activated the new functionality only for nangate45/BP_BE. We have no metrics changing and both PR could be merged separately |
src/gpl/src/nesterovPlace.cpp
Outdated
// log_->report("[NesterovSolve] Snapshot for divergence saved at iter = | ||
// {}", iter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code.
src/gpl/src/replace.tcl
Outdated
utl::warn "GPL" 153 \ | ||
"Allow revert to saved snapshot if a divergence is detected." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a warning? If the user set this flag, it is not something unexpected. This can be a utl::info, but I'm not sure if it is necessary at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other existing messages in gpl/src/replace.tcl tend to be warnings also.
I think this message is useful to make sure the non-default behavior is activated. Maybe let's leave it as ult::info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with utl::info.
src/gpl/src/replace.cpp
Outdated
@@ -198,7 +199,7 @@ void Replace::doIncrementalPlace(int threads) | |||
int iter = doNesterovPlace(threads); | |||
setNesterovPlaceMaxIter(previous_max_iter); | |||
|
|||
// Finish the overflow resolution from the rough placement | |||
// Finish' the overflow resolution from the rough placement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo?
Signed-off-by: Augusto Berndt <[email protected]>
There was a problem hiding this 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
src/gpl/src/nesterovPlace.cpp
Outdated
diverge_snapshot_iter_, | ||
diverge_snapshot_average_overflow_unscaled_, | ||
min_hpwl_); | ||
curA = diverge_snapshotA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: Value stored to 'curA' is never read [clang-analyzer-deadcode.DeadStores]
curA = diverge_snapshotA;
^
Additional context
src/gpl/src/nesterovPlace.cpp:570: Value stored to 'curA' is never read
curA = diverge_snapshotA;
^
Signed-off-by: Augusto Berndt <[email protected]>
There was a problem hiding this 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
src/gpl/src/nesterovPlace.cpp
Outdated
bool isDivergeTriedRevert = false; | ||
|
||
// divergence snapshot info | ||
float diverge_snapshotA = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'diverge_snapshotA' set but not used [clang-diagnostic-unused-but-set-variable]
float diverge_snapshotA = 0;
^
src/gpl/src/nesterovPlace.cpp
Outdated
if (is_min_hpwl_) { | ||
diverge_snapshotWlCoefX = wireLengthCoefX_; | ||
diverge_snapshotWlCoefY = wireLengthCoefY_; | ||
diverge_snapshotA = curA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: Value stored to 'diverge_snapshotA' is never read [clang-analyzer-deadcode.DeadStores]
diverge_snapshotA = curA;
^
Additional context
src/gpl/src/nesterovPlace.cpp:419: Value stored to 'diverge_snapshotA' is never read
diverge_snapshotA = curA;
^
Signed-off-by: Augusto Berndt <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I'll wait for @maliberty's comments on the changes before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine aside from flipping the default
src/gpl/src/replace.cpp
Outdated
@@ -198,7 +199,7 @@ void Replace::doIncrementalPlace(int threads) | |||
int iter = doNesterovPlace(threads); | |||
setNesterovPlaceMaxIter(previous_max_iter); | |||
|
|||
// Finish the overflow resolution from the rough placement | |||
// Finish' the overflow resolution from the rough placement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray character
src/gpl/src/nesterovPlace.cpp
Outdated
// log_->report("[NesterovSolve] Snapshot for divergence saved at iter = | ||
// {}", iter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rm
src/gpl/README.md
Outdated
@@ -97,6 +97,7 @@ global_placement | |||
[-timing_driven_net_weight_max] | |||
[-timing_driven_nets_percentage] | |||
[-keep_resize_below_overflow] | |||
[-allow_revert_if_diverge] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are going to flip this to on by default with a disable.
…e is detected Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
Signed-off-by: Augusto Berndt <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
This PR introduces a new TCL command that allows GPL to finish with an incomplete solution if divergence is detected. The solution is considered incomplete because it does not meet the 0.10 target for total overflow.
With the new option enabled gpl will snapshot the placement state (using a similar methodology as routability-mode already does), the snapshot is saved considering the smallest HPWL and when the total overflow is below 0.25. In the event of divergence, GPL will revert to the snapshot and complete the process with this solution instead of failing and throwing an error.
This approach has been tested successfully on Megaboom and nangate45/bp_be designs in cases of divergence.