Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b920735
gpl: extend maximum gpl iterations allowed by the amount of iteration…
gudeh Jul 9, 2025
d6441c5
gpl: rename variable, nesterov is a method within gpl
gudeh Jul 9, 2025
5df01bd
gpl: update tests after log change
gudeh Jul 9, 2025
4e75bff
gpl: introduce max routability reverts (50)
gudeh Jul 9, 2025
e986c8d
gpl: update test after log change
gudeh Jul 9, 2025
ee0a350
gpl: include report for final weighted routing congestion
gudeh Jul 9, 2025
f2e294e
gpl:only print routin congestion if routability mode is true
gudeh Jul 10, 2025
876f080
test: update test after gpl log change
gudeh Jul 10, 2025
0e00c8f
test: update after gpl change
gudeh Jul 10, 2025
2e39ac1
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 10, 2025
5c964a3
test: update test after gpl log change
gudeh Jul 10, 2025
094ed25
gpl: revert tests to master version
gudeh Jul 11, 2025
98a18de
gpl: fix conflicts with concurring open versus recently merged PR
gudeh Jul 11, 2025
cdee8c9
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 14, 2025
80d01ba
gpl: update large tests
gudeh Jul 14, 2025
6c5992d
test: update after gpl log change
gudeh Jul 14, 2025
18c9a0c
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 14, 2025
ecca184
gpl: checkout nesterovPlace.cpp to master before reworking file due t…
gudeh Jul 22, 2025
6797a15
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 22, 2025
e4b5726
gpl: rework extension of max iters based on routability,
gudeh Jul 22, 2025
e370b4e
gpl: update tests
gudeh Jul 22, 2025
1e41ec8
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 22, 2025
6a3be4a
test: checckout file to master version for merging without conflicts
gudeh Jul 23, 2025
7f3ca22
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 23, 2025
5d34609
test: update bazel test after gpl change,
gudeh Jul 23, 2025
546d2fb
gpl: do not print area change if routability or timing driven modes a…
gudeh Jul 23, 2025
6e78487
gpl: update tests after minor log change
gudeh Jul 23, 2025
547d79f
rsz: update tests after gpl log change
gudeh Jul 23, 2025
904712c
gpl: update large tests after log change
gudeh Jul 23, 2025
58889b2
test: update after gpl log change
gudeh Jul 23, 2025
f6846c8
gpl: improve main loop readability
gudeh Jul 24, 2025
50bc7f2
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 24, 2025
a9f87e0
Merge remote-tracking branch 'private/master' into gpl-extend-max-ite…
gudeh Jul 29, 2025
506bece
gpl: clang-format
gudeh Jul 29, 2025
fa9fbf0
gpl: fix merge with master
gudeh Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cts/test/hier_insertion_delay.ok
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
[INFO ODB-0227] LEF file: array_tile_ins_delay.lef, created 1 library cells
[INFO IFP-0001] Added 857 rows of 210 site FreePDK45_38x28_10R_NP_162NW_34O.
[INFO GPL-0005] Execute conjugate gradient initial placement.
[INFO GPL-0002] DBU: 2000
[INFO GPL-0003] SiteSize: ( 0.190 1.400 ) um
[INFO GPL-0004] CoreBBox: ( 0.000 0.000 ) ( 39.900 1199.800 ) um
Expand Down
1 change: 1 addition & 0 deletions src/cts/test/simple_test_hier.ok
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
[INFO IFP-0001] Added 857 rows of 210 site FreePDK45_38x28_10R_NP_162NW_34O.
[INFO GPL-0005] Execute conjugate gradient initial placement.
[INFO GPL-0002] DBU: 2000
[INFO GPL-0003] SiteSize: ( 0.190 1.400 ) um
[INFO GPL-0004] CoreBBox: ( 0.000 0.000 ) ( 39.900 1199.800 ) um
Expand Down
55 changes: 43 additions & 12 deletions src/gpl/src/nesterovBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2680,17 +2680,17 @@ void NesterovBase::updateNextIter(const int iter)
/ npVars_->referenceHpwl);

float percentageChange = 0.0;
if (iter == 0 || (iter + 1) % 10 == 0) {
if (iter == 0 || (iter) % 10 == 0) {
if (prevReportedHpwl_ != 0) {
percentageChange = (static_cast<double>(hpwl - prevReportedHpwl_)
/ static_cast<double>(prevReportedHpwl_))
* 100.0;
}
prevReportedHpwl_ = hpwl;

std::string group;
std::string group_name;
if (pb_->group()) {
group = fmt::format(" ({})", pb_->group()->getName());
group_name = fmt::format(" ({})", pb_->group()->getName());
}

if ((iter == 0 || reprint_iter_header_) && !pb_->group()) {
Expand All @@ -2715,12 +2715,12 @@ void NesterovBase::updateNextIter(const int iter)
}

log_->report("{:9d} | {:8.4f} | {:13.6e} | {:+7.2f}% | {:9.2e} | {:>5}",
iter + 1,
iter,
sumOverflowUnscaled_,
static_cast<double>(hpwl),
percentageChange,
densityPenalty_,
group);
group_name);
}

debugPrint(log_, GPL, "updateNextIter", 1, "PreviousHPWL: {}", prevHpwl_);
Expand Down Expand Up @@ -2835,22 +2835,53 @@ void NesterovBase::saveSnapshot()
snapshotStepLength_ = stepLength_;
}

bool NesterovBase::checkConvergence()
bool NesterovBase::checkConvergence(int gpl_iter_count,
int routability_gpl_iter_count,
RouteBase* rb)
{
assert(omp_get_thread_num() == 0);
if (isConverged_) {
return true;
}
if (sumOverflowUnscaled_ <= npVars_->targetOverflow) {
if (pb_->group()) {
const bool is_power_domain = pb_->group();
const std::string group_name
= is_power_domain ? pb_->group()->getName() : "";
const int final_iter = gpl_iter_count;

log_->report("{:9d} | {:8.4f} | {:13.6e} | {:>8} | {:9.2e} | {:>5}",
final_iter,
sumOverflowUnscaled_,
static_cast<double>(nbc_->getHpwl()),
"", // No % delta
densityPenalty_,
group_name);
log_->report(
"---------------------------------------------------------------");

if (is_power_domain) {
log_->info(GPL,
1000,
"PowerDomain {} finished with Overflow: {:.6f}",
pb_->group()->getName(),
sumOverflowUnscaled_);
1016,
"Power domain '{}' placement finished at iteration {}",
group_name,
final_iter);
} else {
log_->info(
GPL, 1001, "Finished with Overflow: {:.6f}", sumOverflowUnscaled_);
GPL, 1001, "Global placement finished at iteration {}", final_iter);
if (npVars_->routability_driven_mode) {
log_->info(GPL,
1003,
"Routability mode iteration count: {}",
routability_gpl_iter_count);
}
}

if (npVars_->routability_driven_mode) {
rb->getRudyResult();
log_->info(GPL,
1005,
"Routability final weighted congestion: {:.4f}",
rb->getRudyRC(false));
}

dbBlock* block = pb_->db()->getChip()->getBlock();
Expand Down
4 changes: 3 additions & 1 deletion src/gpl/src/nesterovBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,9 @@ class NesterovBase
void setTrueReprintIterHeader() { reprint_iter_header_ = true; }
float getPhiCoef(float scaledDiffHpwl) const;

bool checkConvergence();
bool checkConvergence(int gpl_iter_count,
int routability_gpl_iter_count,
RouteBase* rb);
bool checkDivergence();
void saveSnapshot();
bool revertToSnapshot();
Expand Down
Loading