-
Notifications
You must be signed in to change notification settings - Fork 566
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
Integrate rsz repair design with gpl #6165
Integrate rsz repair design with gpl #6165
Conversation
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: gudeh <augusto.berndt@precisioninno.com>
Signed-off-by: gudeh <augusto.berndt@precisioninno.com>
Signed-off-by: gudeh <augusto.berndt@precisioninno.com>
Signed-off-by: gudeh <augusto.berndt@precisioninno.com>
…ches Signed-off-by: gudeh <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
now we need to skip both journalBegin() and journalRestore() 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>
…erter for log values 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>
…ility 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>
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
There were too many comments to post at once. Showing the first 25 out of 51. Check the log or trigger a new build to see more.
src/gpl/src/nesterovBase.cpp
Outdated
@@ -248,6 +259,22 @@ bool GCell::isStdInstance() const | |||
return !instance()->isMacro(); | |||
} | |||
|
|||
void GCell::print(utl::Logger* logger) const | |||
{ | |||
if (insts_.size() > 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: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty]
if (insts_.size() > 0) | |
if (!insts_.empty()) |
Additional context
/usr/include/c++/11/bits/stl_vector.h:1006: method 'vector'::empty() defined here
empty() const _GLIBCXX_NOEXCEPT
^
src/gpl/src/nesterovBase.cpp
Outdated
@@ -248,6 +259,22 @@ | |||
return !instance()->isMacro(); | |||
} | |||
|
|||
void GCell::print(utl::Logger* logger) const | |||
{ | |||
if (insts_.size() > 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: statement should be inside braces [google-readability-braces-around-statements]
if (insts_.size() > 0) | |
if (insts_.size() > 0) { |
src/gpl/src/nesterovBase.cpp:265:
- else
+ } else
src/gpl/src/nesterovBase.cpp
Outdated
else | ||
logger->report("print gcell insts_ empty! (filler cell)"); |
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: statement should be inside braces [google-readability-braces-around-statements]
else | |
logger->report("print gcell insts_ empty! (filler cell)"); | |
else { | |
logger->report("print gcell insts_ empty! (filler cell)"); | |
} |
src/gpl/src/nesterovBase.cpp
Outdated
|
||
void GPin::print(utl::Logger* log) const | ||
{ | ||
if (pin()->dbITerm() != nullptr) |
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: statement should be inside braces [google-readability-braces-around-statements]
if (pin()->dbITerm() != nullptr) | |
if (pin()->dbITerm() != nullptr) { |
src/gpl/src/nesterovBase.cpp:478:
- else
+ } else
src/gpl/src/nesterovBase.cpp
Outdated
else | ||
log->report("pin()->dbIterm() is nullptr!"); |
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: statement should be inside braces [google-readability-braces-around-statements]
else | |
log->report("pin()->dbIterm() is nullptr!"); | |
else { | |
log->report("pin()->dbIterm() is nullptr!"); | |
} |
src/gpl/src/nesterovBase.cpp
Outdated
nextSLPDensityGrads_.push_back(FloatPoint()); | ||
nextSLPSumGrads_.push_back(FloatPoint()); | ||
prevSLPCoordi_.push_back(FloatPoint()); | ||
prevSLPWireLengthGrads_.push_back(FloatPoint()); |
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: use emplace_back instead of push_back [modernize-use-emplace]
prevSLPWireLengthGrads_.push_back(FloatPoint()); | |
prevSLPWireLengthGrads_.emplace_back(); |
src/gpl/src/nesterovBase.cpp
Outdated
nextSLPSumGrads_.push_back(FloatPoint()); | ||
prevSLPCoordi_.push_back(FloatPoint()); | ||
prevSLPWireLengthGrads_.push_back(FloatPoint()); | ||
prevSLPDensityGrads_.push_back(FloatPoint()); |
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: use emplace_back instead of push_back [modernize-use-emplace]
prevSLPDensityGrads_.push_back(FloatPoint()); | |
prevSLPDensityGrads_.emplace_back(); |
src/gpl/src/nesterovBase.cpp
Outdated
prevSLPCoordi_.push_back(FloatPoint()); | ||
prevSLPWireLengthGrads_.push_back(FloatPoint()); | ||
prevSLPDensityGrads_.push_back(FloatPoint()); | ||
prevSLPSumGrads_.push_back(FloatPoint()); |
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: use emplace_back instead of push_back [modernize-use-emplace]
prevSLPSumGrads_.push_back(FloatPoint()); | |
prevSLPSumGrads_.emplace_back(); |
src/gpl/src/nesterovBase.cpp
Outdated
prevSLPWireLengthGrads_.push_back(FloatPoint()); | ||
prevSLPDensityGrads_.push_back(FloatPoint()); | ||
prevSLPSumGrads_.push_back(FloatPoint()); | ||
curCoordi_.push_back(FloatPoint()); |
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: use emplace_back instead of push_back [modernize-use-emplace]
curCoordi_.push_back(FloatPoint()); | |
curCoordi_.emplace_back(); |
src/gpl/src/nesterovBase.cpp
Outdated
prevSLPDensityGrads_.push_back(FloatPoint()); | ||
prevSLPSumGrads_.push_back(FloatPoint()); | ||
curCoordi_.push_back(FloatPoint()); | ||
nextCoordi_.push_back(FloatPoint()); |
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: use emplace_back instead of push_back [modernize-use-emplace]
nextCoordi_.push_back(FloatPoint()); | |
nextCoordi_.emplace_back(); |
I ran a secure-CI for this PR, on public designs I am only getting the following error on DRT.
I see nothing obviously wrong on the net: Other than this critical error I see only some metrics failing. I am waiting for results on private designs. |
That error comes from drt |
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
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/nesterovBase.h
Outdated
@@ -1168,4 +1262,14 @@ class GCellHandle | |||
size_t index_; | |||
}; | |||
|
|||
inline bool isValidSigType(odb::dbSigType db_type) |
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: the parameter 'db_type' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
inline bool isValidSigType(odb::dbSigType db_type) | |
inline bool isValidSigType(const odb::dbSigType& db_type) |
src/gpl/src/nesterovBase.h
Outdated
inline bool isValidSigType(odb::dbSigType db_type) | ||
{ | ||
if (db_type == odb::dbSigType::SIGNAL | ||
|| db_type == odb::dbSigType::CLOCK) // || db_type == |
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: statement should be inside braces [google-readability-braces-around-statements]
|| db_type == odb::dbSigType::CLOCK) // || db_type == | |
|| db_type == odb::dbSigType::CLOCK) { // || db_type == |
src/gpl/src/nesterovBase.h:1270:
- else
+ } else
src/gpl/src/nesterovBase.h
Outdated
else | ||
return false; |
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: do not use 'else' after 'return' [readability-else-after-return]
else | |
return false; | |
return false; |
src/gpl/src/nesterovBase.h
Outdated
|| db_type == odb::dbSigType::CLOCK) // || db_type == | ||
// odb::dbSigType::ANALOG) | ||
return true; | ||
else |
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: statement should be inside braces [google-readability-braces-around-statements]
else
^
this fix will not be applied because it overlaps with another fix
src/gpl/src/nesterovPlace.cpp
Outdated
average_overflow_, | ||
npVars_.keepResizeBelowOverflow); | ||
|
||
if (!virtual_td_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.
warning: statement should be inside braces [google-readability-braces-around-statements]
if (!virtual_td_iter) | |
if (!virtual_td_iter) { |
src/gpl/src/nesterovPlace.cpp:457:
- else
+ } else
src/gpl/src/nesterovPlace.h
Outdated
virtual void inDbITermDestroy(odb::dbITerm*); | ||
|
||
virtual void inDbNetCreate(odb::dbNet*) override; | ||
virtual void inDbNetDestroy(odb::dbNet*) override; |
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: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override]
virtual void inDbNetDestroy(odb::dbNet*) override; | |
void inDbNetDestroy(odb::dbNet*) override; |
src/gpl/src/nesterovPlace.h
Outdated
virtual void inDbNetCreate(odb::dbNet*) override; | ||
virtual void inDbNetDestroy(odb::dbNet*) override; | ||
|
||
virtual void inDbInstSwapMasterAfter(odb::dbInst*); |
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: 'inDbInstSwapMasterAfter' overrides a member function but is not marked 'override' [clang-diagnostic-inconsistent-missing-override]
virtual void inDbInstSwapMasterAfter(odb::dbInst*);
^
Additional context
src/odb/include/odb/dbBlockCallBackObj.h:82: overridden virtual function is here
virtual void inDbInstSwapMasterAfter(dbInst*) {}
^
src/gpl/src/nesterovPlace.h
Outdated
virtual void inDbNetCreate(odb::dbNet*) override; | ||
virtual void inDbNetDestroy(odb::dbNet*) override; | ||
|
||
virtual void inDbInstSwapMasterAfter(odb::dbInst*); |
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: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]
virtual void inDbInstSwapMasterAfter(odb::dbInst*); | |
void inDbInstSwapMasterAfter(odb::dbInst*) override; |
src/gpl/src/nesterovPlace.h
Outdated
virtual void inDbNetDestroy(odb::dbNet*) override; | ||
|
||
virtual void inDbInstSwapMasterAfter(odb::dbInst*); | ||
virtual void inDbPostMoveInst(odb::dbInst*) override; |
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: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override]
virtual void inDbPostMoveInst(odb::dbInst*) override; | |
void inDbPostMoveInst(odb::dbInst*) override; |
src/gpl/src/routeBase.h
Outdated
@@ -201,6 +201,10 @@ class RouteBase | |||
int inflationIterCnt() const; | |||
|
|||
void revertGCellSizeToMinRc(); | |||
void pushBackMinRcCellSize(int dx, int dy) | |||
{ | |||
minRcCellSize_.push_back(std::make_pair(dx, dy)); |
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: use emplace_back instead of push_back [modernize-use-emplace]
minRcCellSize_.push_back(std::make_pair(dx, dy)); | |
minRcCellSize_.emplace_back(dx, dy); |
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.
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/nesterovBase.h
Outdated
} else { | ||
return false; | ||
} |
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: do not use 'else' after 'return' [readability-else-after-return]
} else { | |
return false; | |
} | |
} return false; | |
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
clang-tidy review says "All clean, LGTM! 👍" |
The latest secure-CI run after a merge with master did not present the DRT issue previously happening. Run ID 32 in this secure-CI is the one that presented the DRT issue, with asap7/jpeg. |
Great we just need to wait for the private to finish |
src/gpl/src/nesterovBase.h
Outdated
if (db_type == odb::dbSigType::SIGNAL || db_type == odb::dbSigType::CLOCK) { | ||
return true; | ||
} | ||
return false; |
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.
if (db_type == odb::dbSigType::SIGNAL || db_type == odb::dbSigType::CLOCK) { | |
return true; | |
} | |
return false; | |
return (db_type == odb::dbSigType::SIGNAL || db_type == odb::dbSigType::CLOCK); |
Signed-off-by: Augusto Berndt <gudehh@gmail.com>
clang-tidy review says "All clean, LGTM! 👍" |
@QuantamHD FYI |
Here there is some images showing placement density before the change (top) and after the change (bottom): https://drive.google.com/drive/folders/1vmZFFemVsjTfid3QStEZ5TrWDtVBwnlY?usp=drive_link Here I did some experiments trying different non-virtual iterations (1, 2 and 3): https://drive.google.com/drive/folders/1U4u6opRNsjoS8MwOxLdjzQMA5LNFUdb2?usp=drive_link |
Beautiful! |
Indeed, it looks like it's working super well. Nice job! |
This PR introduces callback implementations for GPL, enabling us to retain the modifications made by RSZ during repair design iterations, including buffer insertion and resizing.
Currently, we perform six virtual repair design iterations in GPL. In these iterations, we execute changes but revert them at the end of each iteration. What remains in GPL are weights that prioritize cells with the worst slack. During the new non-virtual iteration, we keep all new buffers and resizing modifications made by repair design, allowing GPL to recognize these external changes.
A new TCL variable has been added to control when to switch from virtual to non-virtual iterations. Experiments indicate a slight preference for a sequence of three virtual iterations followed by three non-virtual iterations.
Timing-driven iterations are performed based on overflow values: [79, 64, 49, 29, 21, 15]. With the new TCL variable
-keep_resize_below_overflow
set to 0.3, we retain RSZ changes only when the overflow is below this threshold, resulting in three non-virtual iterations.