Skip to content

Commit 8fbfca3

Browse files
authored
Merge pull request #8832 from gudeh/gpl-incremental-messages
gpl: new incremental messages
2 parents 9b6b900 + ea6bbab commit 8fbfca3

File tree

6 files changed

+46
-15
lines changed

6 files changed

+46
-15
lines changed

src/gpl/src/initialPlace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void InitialPlace::doBicgstabPlace(int threads)
9393

9494
if (std::isnan(error.x) || std::isnan(error.y)) {
9595
log_->warn(utl::GPL,
96-
154,
96+
325,
9797
"Conjugate gradient initial placement solver failed at "
9898
"iteration {}. ",
9999
iter);

src/gpl/src/replace.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,32 +133,37 @@ void Replace::doIncrementalPlace(int threads)
133133
}
134134

135135
// Lock down already placed objects
136-
int locked_cnt = 0;
136+
int placed_cnt = 0;
137137
int unplaced_cnt = 0;
138138
auto block = db_->getChip()->getBlock();
139139
for (auto inst : block->getInsts()) {
140140
auto status = inst->getPlacementStatus();
141141
if (status == odb::dbPlacementStatus::PLACED) {
142142
pbc_->dbToPb(inst)->lock();
143-
++locked_cnt;
143+
++placed_cnt;
144144
} else if (!status.isPlaced()) {
145145
++unplaced_cnt;
146146
}
147147
}
148148

149+
log_->info(GPL, 154, "Identified {} placed instances", placed_cnt);
150+
log_->info(GPL, 155, "Identified {} not placed instances", unplaced_cnt);
151+
149152
if (unplaced_cnt == 0) {
150153
// Everything was already placed so we do the old incremental mode
151154
// which just skips initial placement and runs nesterov.
155+
log_->info(GPL,
156+
156,
157+
"Identified all instances as placed. Unlocking all instances "
158+
"and running nesterov from scratch.");
152159
for (auto& pb : pbVec_) {
153160
pb->unlockAll();
154161
}
155-
// pbc_->unlockAll();
162+
156163
doNesterovPlace(threads);
157164
return;
158165
}
159166

160-
log_->info(GPL, 132, "Locked {} instances", locked_cnt);
161-
162167
// Roughly place the unplaced objects (allow more overflow).
163168
// Limit iterations to prevent objects drifting too far or
164169
// non-convergence.
@@ -174,7 +179,7 @@ void Replace::doIncrementalPlace(int threads)
174179
setNesterovPlaceMaxIter(previous_max_iter);
175180

176181
// Finish the overflow resolution from the rough placement
177-
log_->info(GPL, 133, "Unlocked instances");
182+
log_->info(GPL, 133, "Unlocking all instances");
178183
for (auto& pb : pbVec_) {
179184
pb->unlockAll();
180185
}
@@ -422,6 +427,7 @@ void Replace::setInitialPlaceNetWeightScale(float scale)
422427

423428
void Replace::setNesterovPlaceMaxIter(int iter)
424429
{
430+
log_->info(GPL, 158, "Setting nesterov max iterations to {}", iter);
425431
nesterovPlaceMaxIter_ = iter;
426432
if (np_) {
427433
np_->setMaxIters(iter);
@@ -436,6 +442,7 @@ void Replace::setBinGridCnt(int binGridCntX, int binGridCntY)
436442

437443
void Replace::setTargetOverflow(float overflow)
438444
{
445+
log_->info(GPL, 157, "Setting target overflow to {}", overflow);
439446
overflow_ = overflow;
440447
if (np_) {
441448
np_->setTargetOverflow(overflow);

src/gpl/test/incremental01.ok

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
[INFO GPL-0019] Utilization: 59.732 %
2525
[INFO GPL-0020] Standard cells area: 569.772 um^2
2626
[INFO GPL-0021] Large instances area: 0.000 um^2
27+
[INFO GPL-0154] Identified 294 placed instances
28+
[INFO GPL-0155] Identified 0 not placed instances
29+
[INFO GPL-0156] Identified all instances as placed. Unlocking all instances and running nesterov from scratch.
2730
[INFO GPL-0033] Initializing Nesterov region: Top-level
2831
[INFO GPL-0023] Placement target density: 0.7000
2932
[INFO GPL-0024] Movable insts average area: 1.938 um^2

src/gpl/test/incremental02.ok

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
[INFO GPL-0019] Utilization: 4.976 %
2626
[INFO GPL-0020] Standard cells area: 44590.378 um^2
2727
[INFO GPL-0021] Large instances area: 0.000 um^2
28-
[INFO GPL-0132] Locked 16461 instances
28+
[INFO GPL-0154] Identified 16461 placed instances
29+
[INFO GPL-0155] Identified 4636 not placed instances
30+
[INFO GPL-0157] Setting target overflow to 0.2
2931
[INFO GPL-0005] Execute conjugate gradient initial placement.
3032
[InitialPlace] Iter: 1 conjugate gradient residual: 0.00069966 HPWL: 2618966940
3133
[InitialPlace] Iter: 2 conjugate gradient residual: 0.00074756 HPWL: 1353170173
@@ -56,6 +58,7 @@
5658
[INFO GPL-0028] Bin count (X, Y): 256 , 256
5759
[INFO GPL-0029] Bin size (W * H): 3.905 * 3.505 um
5860
[INFO GPL-0030] Number of bins: 65536
61+
[INFO GPL-0158] Setting nesterov max iterations to 300
5962
[INFO GPL-0007] Execute nesterov global placement.
6063
[INFO GPL-0031] HPWL: Half-Perimeter Wirelength
6164
Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
@@ -92,7 +95,9 @@ Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
9295
290 | 0.2826 | 6.492887e+05 | +0.53% | 5.87e-09 |
9396
[WARNING GPL-1010] GPL reached the maximum number of iterations for nesterov 300. Placement may have failed to converge.
9497
[INFO GPL-1014] Final placement area: 44590.38 (+0.00%)
95-
[INFO GPL-0133] Unlocked instances
98+
[INFO GPL-0158] Setting nesterov max iterations to 5000
99+
[INFO GPL-0133] Unlocking all instances
100+
[INFO GPL-0157] Setting target overflow to 0.1
96101
[INFO GPL-0007] Execute nesterov global placement.
97102
310 | 0.4877 | 5.749228e+05 | -11.45% | 1.12e-08 |
98103
320 | 0.4422 | 5.772637e+05 | +0.41% | 1.49e-08 |

src/gpl/test/simple08.ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ To avoid this warning in the future, remove this statement from the LEF file wit
88
[INFO ODB-0131] Created 32 components and 116 component-terminals.
99
[INFO ODB-0132] Created 2 special nets and 114 connections.
1010
[INFO ODB-0133] Created 2 nets and 2 connections.
11+
[INFO GPL-0157] Setting target overflow to 0.2
1112
[INFO GPL-0005] Execute conjugate gradient initial placement.
1213
[INFO GPL-0002] DBU: 1000
1314
[INFO GPL-0003] SiteSize: ( 0.460 2.720 ) um

src/odb/test/replace_hier_mod1.ok

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ Repair timing output passed/skipped equivalence test
136136
[INFO GPL-0019] Utilization: 0.125 %
137137
[INFO GPL-0020] Standard cells area: 59.850 um^2
138138
[INFO GPL-0021] Large instances area: 0.000 um^2
139-
[INFO GPL-0132] Locked 19 instances
139+
[INFO GPL-0154] Identified 19 placed instances
140+
[INFO GPL-0155] Identified 2 not placed instances
141+
[INFO GPL-0157] Setting target overflow to 0.2
140142
[INFO GPL-0005] Execute conjugate gradient initial placement.
141143
[InitialPlace] Iter: 1 conjugate gradient residual: 0.00000006 HPWL: 2671580
142144
[InitialPlace] Iter: 2 conjugate gradient residual: 0.00000006 HPWL: 280697
@@ -152,6 +154,7 @@ Repair timing output passed/skipped equivalence test
152154
[INFO GPL-0028] Bin count (X, Y): 16 , 256
153155
[INFO GPL-0029] Bin size (W * H): 2.494 * 4.687 um
154156
[INFO GPL-0030] Number of bins: 4096
157+
[INFO GPL-0158] Setting nesterov max iterations to 300
155158
[INFO GPL-0007] Execute nesterov global placement.
156159
[INFO GPL-0031] HPWL: Half-Perimeter Wirelength
157160
Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
@@ -189,7 +192,9 @@ Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
189192
[INFO GPL-1008] - For 80% usage of free space: 0.0016
190193
[INFO GPL-1009] - For 50% usage of free space: 0.0025
191194
[INFO GPL-1014] Final placement area: 59.85 (+0.00%)
192-
[INFO GPL-0133] Unlocked instances
195+
[INFO GPL-0158] Setting nesterov max iterations to 5000
196+
[INFO GPL-0133] Unlocking all instances
197+
[INFO GPL-0157] Setting target overflow to 0.1
193198
[INFO GPL-0007] Execute nesterov global placement.
194199
[INFO GPL-1014] Final placement area: 59.85 (+0.00%)
195200
Placement Analysis
@@ -291,7 +296,9 @@ Repair timing output passed/skipped equivalence test
291296
[INFO GPL-0019] Utilization: 0.126 %
292297
[INFO GPL-0020] Standard cells area: 60.382 um^2
293298
[INFO GPL-0021] Large instances area: 0.000 um^2
294-
[INFO GPL-0132] Locked 19 instances
299+
[INFO GPL-0154] Identified 19 placed instances
300+
[INFO GPL-0155] Identified 2 not placed instances
301+
[INFO GPL-0157] Setting target overflow to 0.2
295302
[INFO GPL-0005] Execute conjugate gradient initial placement.
296303
[InitialPlace] Iter: 1 conjugate gradient residual: 0.00000006 HPWL: 2635900
297304
[InitialPlace] Iter: 2 conjugate gradient residual: 0.00000008 HPWL: 255081
@@ -307,6 +314,7 @@ Repair timing output passed/skipped equivalence test
307314
[INFO GPL-0028] Bin count (X, Y): 16 , 256
308315
[INFO GPL-0029] Bin size (W * H): 2.494 * 4.687 um
309316
[INFO GPL-0030] Number of bins: 4096
317+
[INFO GPL-0158] Setting nesterov max iterations to 300
310318
[INFO GPL-0007] Execute nesterov global placement.
311319
[INFO GPL-0031] HPWL: Half-Perimeter Wirelength
312320
Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
@@ -323,7 +331,9 @@ Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
323331
[INFO GPL-1008] - For 80% usage of free space: 0.0016
324332
[INFO GPL-1009] - For 50% usage of free space: 0.0025
325333
[INFO GPL-1014] Final placement area: 60.38 (+0.00%)
326-
[INFO GPL-0133] Unlocked instances
334+
[INFO GPL-0158] Setting nesterov max iterations to 5000
335+
[INFO GPL-0133] Unlocking all instances
336+
[INFO GPL-0157] Setting target overflow to 0.1
327337
[INFO GPL-0007] Execute nesterov global placement.
328338
[INFO GPL-1014] Final placement area: 60.38 (+0.00%)
329339
Placement Analysis
@@ -425,7 +435,9 @@ Repair timing output passed/skipped equivalence test
425435
[INFO GPL-0019] Utilization: 0.125 %
426436
[INFO GPL-0020] Standard cells area: 59.850 um^2
427437
[INFO GPL-0021] Large instances area: 0.000 um^2
428-
[INFO GPL-0132] Locked 19 instances
438+
[INFO GPL-0154] Identified 19 placed instances
439+
[INFO GPL-0155] Identified 2 not placed instances
440+
[INFO GPL-0157] Setting target overflow to 0.2
429441
[INFO GPL-0005] Execute conjugate gradient initial placement.
430442
[InitialPlace] Iter: 1 conjugate gradient residual: 0.00000004 HPWL: 2635880
431443
[InitialPlace] Iter: 2 conjugate gradient residual: 0.00000012 HPWL: 239523
@@ -441,6 +453,7 @@ Repair timing output passed/skipped equivalence test
441453
[INFO GPL-0028] Bin count (X, Y): 16 , 256
442454
[INFO GPL-0029] Bin size (W * H): 2.494 * 4.687 um
443455
[INFO GPL-0030] Number of bins: 4096
456+
[INFO GPL-0158] Setting nesterov max iterations to 300
444457
[INFO GPL-0007] Execute nesterov global placement.
445458
[INFO GPL-0031] HPWL: Half-Perimeter Wirelength
446459
Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
@@ -457,7 +470,9 @@ Iteration | Overflow | HPWL (um) | HPWL(%) | Penalty | Group
457470
[INFO GPL-1008] - For 80% usage of free space: 0.0016
458471
[INFO GPL-1009] - For 50% usage of free space: 0.0025
459472
[INFO GPL-1014] Final placement area: 59.85 (+0.00%)
460-
[INFO GPL-0133] Unlocked instances
473+
[INFO GPL-0158] Setting nesterov max iterations to 5000
474+
[INFO GPL-0133] Unlocking all instances
475+
[INFO GPL-0157] Setting target overflow to 0.1
461476
[INFO GPL-0007] Execute nesterov global placement.
462477
[INFO GPL-1014] Final placement area: 59.85 (+0.00%)
463478
Placement Analysis

0 commit comments

Comments
 (0)