Skip to content

Commit

Permalink
drt: Simplify code and fix distributed group messages.
Browse files Browse the repository at this point in the history
Code needs a increment of 1 to work properly so linearize
batch size into a loop in ditributed code.

Signed-off-by: Christian Costa <[email protected]>
  • Loading branch information
titan73 committed Nov 1, 2024
1 parent 718e43f commit 62b6324
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions src/drt/src/pa/FlexPA_prep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1605,16 +1605,12 @@ void FlexPA::prepPatternInstRows(std::vector<std::vector<frInst*>> inst_rows)
for (const auto& res : update.getGroupResults()) {
all_updates.addGroupResult(res);
}
cnt += batch.size();
if (VERBOSE > 0) {
if (cnt < 100000) {
if (cnt % 10000 == 0) {
for (i = 0; i < batch.size(); i++) {
cnt++;
if (VERBOSE > 0) {
if (cnt % (cnt > 100000 ? 100000 : 10000) == 0) {
logger_->info(DRT, 110, " Complete {} groups.", cnt);
}
} else {
if (cnt % 100000 == 0) {
logger_->info(DRT, 111, " Complete {} groups.", cnt);
}
}
}
}
Expand Down Expand Up @@ -1653,14 +1649,8 @@ void FlexPA::prepPatternInstRows(std::vector<std::vector<frInst*>> inst_rows)
rowIdx++;
cnt++;
if (VERBOSE > 0) {
if (cnt < 100000) {
if (cnt % 10000 == 0) {
logger_->info(DRT, 82, " Complete {} groups.", cnt);
}
} else {
if (cnt % 100000 == 0) {
logger_->info(DRT, 83, " Complete {} groups.", cnt);
}
if (cnt % (cnt > 100000 ? 100000 : 10000) == 0) {
logger_->info(DRT, 82, " Complete {} groups.", cnt);
}
}
}
Expand Down Expand Up @@ -1719,16 +1709,8 @@ void FlexPA::prepPattern()
{
cnt++;
if (VERBOSE > 0) {
if (cnt < 1000) {
if (cnt % 100 == 0) {
logger_->info(
DRT, 79, " Complete {} unique inst patterns.", cnt);
}
} else {
if (cnt % 1000 == 0) {
logger_->info(
DRT, 80, " Complete {} unique inst patterns.", cnt);
}
if (cnt % (cnt > 1000 ? 1000 : 100) == 0) {
logger_->info(DRT, 79, " Complete {} unique inst patterns.", cnt);
}
}
}
Expand Down

0 comments on commit 62b6324

Please sign in to comment.