Skip to content

Commit de6c4c5

Browse files
committed
[vpr][base] add routing_predictor_min_history option
1 parent 2e67201 commit de6c4c5

6 files changed

Lines changed: 20 additions & 0 deletions

File tree

doc/src/vpr/command_line_usage.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,6 +2039,14 @@ The following options are only valid when the router is in timing-driven mode (t
20392039

20402040
**Default:** ``safe``
20412041

2042+
.. option:: --routing_predictor_min_history <int>
2043+
2044+
Number of routing iterations of overuse history the routing failure predictor must accumulate before it starts estimating the iteration at which a successful route will be found.
2045+
2046+
.. seealso:: :option:`--routing_failure_predictor`
2047+
2048+
**Default:** ``8``
2049+
20422050
.. option:: --routing_budgets_algorithm { disable | minimax | yoyo | scale_delay }
20432051

20442052
.. warning:: Experimental

vpr/src/base/read_options.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3283,6 +3283,14 @@ argparse::ArgumentParser create_arg_parser(const std::string& prog_name, t_optio
32833283
.choices({"safe", "aggressive", "off"})
32843284
.show_in(argparse::ShowIn::HELP_ONLY);
32853285

3286+
route_timing_grp.add_argument(args.routing_predictor_min_history, "--routing_predictor_min_history")
3287+
.help(
3288+
"Number of routing iterations of overuse history the routing failure predictor"
3289+
" must accumulate before it starts estimating the iteration a successful route"
3290+
" will be found.")
3291+
.default_value("8")
3292+
.show_in(argparse::ShowIn::HELP_ONLY);
3293+
32863294
route_timing_grp.add_argument<e_routing_budgets_algorithm, RouteBudgetsAlgorithm>(args.routing_budgets_algorithm, "--routing_budgets_algorithm")
32873295
.help(
32883296
"Controls how the routing budgets are created and applied.\n"

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ struct t_options {
271271
argparse::ArgValue<float> router_init_wirelength_abort_threshold;
272272
argparse::ArgValue<e_incr_reroute_delay_ripup> incr_reroute_delay_ripup;
273273
argparse::ArgValue<e_routing_failure_predictor> routing_failure_predictor;
274+
argparse::ArgValue<int> routing_predictor_min_history;
274275
argparse::ArgValue<e_routing_budgets_algorithm> routing_budgets_algorithm;
275276
argparse::ArgValue<bool> save_routing_per_iteration;
276277
argparse::ArgValue<float> congested_routing_iteration_threshold_frac;

vpr/src/base/setup_vpr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ static void setup_router_opts(const t_options& Options, t_router_opts* RouterOpt
520520
RouterOpts->doRouting = e_stage_action::DO;
521521
}
522522
RouterOpts->routing_failure_predictor = Options.routing_failure_predictor;
523+
RouterOpts->routing_predictor_min_history = Options.routing_predictor_min_history;
523524
RouterOpts->routing_budgets_algorithm = Options.routing_budgets_algorithm;
524525
RouterOpts->save_routing_per_iteration = Options.save_routing_per_iteration;
525526
RouterOpts->congested_routing_iteration_threshold_frac = Options.congested_routing_iteration_threshold_frac;

vpr/src/base/show_setup.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ static void show_router_opts(const t_router_opts& router_opts) {
475475
VTR_LOG("router_opts.routing_failure_predictor = AGGRESSIVE\n");
476476
else if (router_opts.routing_failure_predictor == OFF)
477477
VTR_LOG("router_opts.routing_failure_predictor = OFF\n");
478+
VTR_LOG("router_opts.routing_predictor_min_history: %d\n", router_opts.routing_predictor_min_history);
478479

479480
if (router_opts.routing_budgets_algorithm == DISABLE) {
480481
VTR_LOG("router_opts.routing_budgets_algorithm = DISABLE\n");

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ struct t_router_opts {
13651365
/// the configuration to be used by the routing failure predictor,
13661366
/// how aggressive the threshold used to judge and abort routings deemed unroutable
13671367
e_routing_failure_predictor routing_failure_predictor;
1368+
int routing_predictor_min_history;
13681369
e_routing_budgets_algorithm routing_budgets_algorithm;
13691370
bool save_routing_per_iteration;
13701371
float congested_routing_iteration_threshold_frac;

0 commit comments

Comments
 (0)