Add --no-placer-timeout flag to override timeout during refinement
This commit is contained in:
parent
2712cbf6e4
commit
d5299f144f
@ -189,6 +189,7 @@ po::options_description CommandHandler::getGeneralOptions()
|
||||
general.add_options()("placer-heap-critexp", po::value<int>(),
|
||||
"placer heap criticality exponent (int, default: 2)");
|
||||
general.add_options()("placer-heap-timingweight", po::value<int>(), "placer heap timing weight (int, default: 10)");
|
||||
general.add_options()("no-placer-timeout", "allow the placer to attempt placement without timeout");
|
||||
|
||||
#if !defined(__wasm)
|
||||
general.add_options()("parallel-refine", "use new experimental parallelised engine for placement refinement");
|
||||
@ -328,6 +329,9 @@ void CommandHandler::setupContext(Context *ctx)
|
||||
if (vm.count("placer-heap-timingweight"))
|
||||
ctx->settings[ctx->id("placerHeap/timingWeight")] = std::to_string(vm["placer-heap-timingweight"].as<int>());
|
||||
|
||||
if (vm.count("no-placer-timeout"))
|
||||
ctx->settings[ctx->id("placerHeap/noTimeout")] = true;
|
||||
|
||||
if (vm.count("parallel-refine"))
|
||||
ctx->settings[ctx->id("placerHeap/parallelRefine")] = true;
|
||||
|
||||
|
@ -828,6 +828,11 @@ class HeAPPlacer
|
||||
// Strict placement legalisation, performed after the initial HeAP spreading
|
||||
void legalise_placement_strict(bool require_validity = false)
|
||||
{
|
||||
int placement_timeout = cfg.no_placement_timeout ? 0 :
|
||||
// Set a conservative timeout. This is a rather large number and could probably be
|
||||
// shaved down, but for now it will keep the process from running indefinite.
|
||||
std::max(10000, (int(ctx->cells.size()) * int(ctx->cells.size()) / 8) + 1);
|
||||
|
||||
auto startt = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Unbind all cells placed in this solution
|
||||
@ -879,11 +884,7 @@ class HeAPPlacer
|
||||
}
|
||||
|
||||
while (!placed) {
|
||||
// Set a conservative timeout. This is a rather large number and could probably be
|
||||
// shaved down, but for now it will keep the process from running indefinite.
|
||||
int timeout_limit = (int(ctx->cells.size()) * int(ctx->cells.size()) / 8) + 1;
|
||||
|
||||
if (total_iters_for_cell > std::max(10000, timeout_limit))
|
||||
if (placement_timeout > 0 && total_iters_for_cell > placement_timeout)
|
||||
log_error("Unable to find legal placement for cell '%s' after %d attempts, check constraints and utilisation.\n",
|
||||
ctx->nameOf(ci), total_iters_for_cell);
|
||||
|
||||
@ -1818,6 +1819,7 @@ PlacerHeapCfg::PlacerHeapCfg(Context *ctx)
|
||||
timing_driven = ctx->setting<bool>("timing_driven");
|
||||
solverTolerance = 1e-5;
|
||||
placeAllAtOnce = false;
|
||||
no_placement_timeout = ctx->setting<bool>("placerHeap/noTimeout", false);
|
||||
|
||||
hpwl_scale_x = 1;
|
||||
hpwl_scale_y = 1;
|
||||
|
@ -42,6 +42,7 @@ struct PlacerHeapCfg
|
||||
float solverTolerance;
|
||||
bool placeAllAtOnce;
|
||||
bool parallelRefine;
|
||||
bool no_placement_timeout;
|
||||
|
||||
int hpwl_scale_x, hpwl_scale_y;
|
||||
int spread_scale_x, spread_scale_y;
|
||||
|
Loading…
Reference in New Issue
Block a user