Skip to content

Commit 395b21d

Browse files
[Logging][Warnings] Suppressed Overly Verbose Warnings
There were many occurences of warning messages that were either overly verbose or unecessary. In the RR graph reading code, there were several warnings that were generated when nodes could not be found for a cost index. This warning is good to keep around I think; however we do not need to print the warning for each cost index. In check netlist, we were printing a warning when the netlist does not contain any global nets to non-global pins, which is a strange thing to warn about. In the annealer, we have been warning whenever the initial temperature was being calculated. This warning was saying that some of the swaps attempted was rejected; but I do not think this needs to be warned about. In the router, there were two warnings which are not of any use to a user, but for developers they may be useful. I have raised the verbosity level of these warnings. This required that I update the router code to pass around the route_verbosity variable.
1 parent baaac60 commit 395b21d

31 files changed

+183
-99
lines changed

libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,13 +578,14 @@ static void load_rr_indexed_data_T_values(const RRGraphView& rr_graph,
578578
}
579579
}
580580

581+
unsigned num_occurences_of_no_instances_with_cost_index = 0;
581582
for (size_t cost_index = CHANX_COST_INDEX_START;
582583
cost_index < rr_indexed_data.size(); cost_index++) {
583584
if (num_nodes_of_index[RRIndexedDataId(cost_index)] == 0) { /* Segments don't exist. */
584-
VTR_LOG_WARN("Found no instances of RR node with cost index %d\n", cost_index);
585585
rr_indexed_data[RRIndexedDataId(cost_index)].T_linear = 0.0;
586586
rr_indexed_data[RRIndexedDataId(cost_index)].T_quadratic = 0.0;
587587
rr_indexed_data[RRIndexedDataId(cost_index)].C_load = 0.0;
588+
num_occurences_of_no_instances_with_cost_index++;
588589
} else {
589590
auto C_total_histogram = build_histogram(C_total[RRIndexedDataId(cost_index)], 10);
590591
auto R_total_histogram = build_histogram(R_total[RRIndexedDataId(cost_index)], 10);
@@ -625,6 +626,10 @@ static void load_rr_indexed_data_T_values(const RRGraphView& rr_graph,
625626
}
626627
}
627628
}
629+
if (num_occurences_of_no_instances_with_cost_index > 0) {
630+
VTR_LOG_WARN("Found %u cost indices where no instances of RR nodes could be found\n",
631+
num_occurences_of_no_instances_with_cost_index);
632+
}
628633
}
629634

630635
/*

utils/route_diag/src/main.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ static void do_one_route(const Netlist<>& net_list,
9595
router_opts.write_router_lookahead,
9696
router_opts.read_router_lookahead,
9797
segment_inf,
98-
is_flat);
98+
is_flat,
99+
router_opts.route_verbosity);
99100

100101
SerialConnectionRouter<FourAryHeap> router(
101102
device_ctx.grid,
@@ -105,7 +106,8 @@ static void do_one_route(const Netlist<>& net_list,
105106
device_ctx.rr_rc_data,
106107
device_ctx.rr_graph.rr_switch(),
107108
g_vpr_ctx.mutable_routing().rr_node_route_inf,
108-
is_flat);
109+
is_flat,
110+
router_opts.route_verbosity);
109111
enable_router_debug(router_opts, ParentNetId(), sink_node, 1, &router);
110112
bool found_path;
111113
RTExploredNode cheapest;
@@ -160,7 +162,8 @@ static void profile_source(const Netlist<>& net_list,
160162
router_opts.write_router_lookahead,
161163
router_opts.read_router_lookahead,
162164
segment_inf,
163-
is_flat);
165+
is_flat,
166+
router_opts.route_verbosity);
164167
RouterDelayProfiler profiler(net_list, router_lookahead.get(), is_flat);
165168

166169
int start_x = 0;

vpr/src/base/check_netlist.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ void check_netlist(int verbosity) {
6262
}
6363
}
6464
free_hash_table(net_hash_table);
65-
VTR_LOG_WARN("Netlist contains %d global net to non-global architecture pin connections\n", global_to_non_global_connection_count);
65+
if (global_to_non_global_connection_count > 0) {
66+
VTR_LOG_WARN("Netlist contains %d global net to non-global architecture pin connections\n", global_to_non_global_connection_count);
67+
}
6668

6769
auto& device_ctx = g_vpr_ctx.device();
6870
IntraLbPbPinLookup intra_lb_pb_pin_lookup(device_ctx.logical_block_types);

vpr/src/base/vpr_api.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,8 @@ void vpr_place(const Netlist<>& net_list,
865865
vpr_setup.RouterOpts.write_router_lookahead,
866866
vpr_setup.RouterOpts.read_router_lookahead,
867867
vpr_setup.Segments,
868-
is_flat);
868+
is_flat,
869+
vpr_setup.RouterOpts.route_verbosity);
869870
}
870871

871872
// Read in the flat placement if a flat placement file is provided and it
@@ -1082,7 +1083,8 @@ RouteStatus vpr_route_fixed_W(const Netlist<>& net_list,
10821083
vpr_setup.RouterOpts.write_router_lookahead,
10831084
vpr_setup.RouterOpts.read_router_lookahead,
10841085
vpr_setup.Segments,
1085-
is_flat);
1086+
is_flat,
1087+
vpr_setup.RouterOpts.route_verbosity);
10861088

10871089
vtr::ScopedStartFinishTimer timer("Routing");
10881090

vpr/src/place/annealer.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,6 @@ float PlacementAnnealer::estimate_starting_temperature_() {
338338
// Get the standard deviation.
339339
double std_dev = get_std_dev(num_accepted, sum_of_squares, av);
340340

341-
// Print warning if not all swaps are accepted.
342-
if (num_accepted != move_lim) {
343-
VTR_LOG_WARN("Starting t: %d of %d configurations accepted.\n",
344-
num_accepted, move_lim);
345-
}
346-
347341
// Improved initial placement uses a fast SA for NoC routers and centroid placement
348342
// for other blocks. The temperature is reduced to prevent SA from destroying the initial placement
349343
float init_temp = std_dev / 64;

vpr/src/place/delay_model/PlacementDelayModelCreator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ PlacementDelayModelCreator::create_delay_model(const t_placer_opts& placer_opts,
4343
router_opts.write_router_lookahead,
4444
router_opts.read_router_lookahead,
4545
segment_inf,
46-
is_flat);
46+
is_flat,
47+
router_opts.route_verbosity);
4748

4849
RouterDelayProfiler route_profiler(net_list, router_lookahead, is_flat);
4950

vpr/src/place/delay_model/compute_delta_delays_utils.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ static void generic_compute_matrix_dijkstra_expansion(RouterDelayProfiler& /*rou
614614
int delta_y = abs(sink_y - source_y);
615615
if (!found_matrix[delta_x][delta_y]) {
616616
add_delay_to_matrix(matrix, delta_x, delta_y, IMPOSSIBLE_DELTA);
617+
#ifdef VERBOSE
617618
VTR_LOG_WARN("Unable to route between blocks at (%d,%d,%d) and (%d,%d,%d) to characterize delay (setting to %g)\n",
618619
source_x,
619620
source_y,
@@ -622,6 +623,7 @@ static void generic_compute_matrix_dijkstra_expansion(RouterDelayProfiler& /*rou
622623
sink_y,
623624
to_layer_num,
624625
IMPOSSIBLE_DELTA);
626+
#endif
625627
}
626628
}
627629
}
@@ -677,10 +679,12 @@ static float route_connection_delay(RouterDelayProfiler& route_profiler,
677679
if (successfully_routed) break;
678680
}
679681

682+
#ifdef VERBOSE
680683
if (!successfully_routed) {
681684
VTR_LOG_WARN("Unable to route between blocks at (%d,%d,%d) and (%d,%d,%d) to characterize delay (setting to %g)\n",
682685
source_x, source_y, source_layer, sink_x, sink_y, sink_layer, net_delay_value);
683686
}
687+
#endif
684688

685689
return net_delay_value;
686690
}

vpr/src/route/DecompNetlistRouter.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class DecompNetlistRouter : public NetlistRouter {
3737
route_budgets& budgeting_inf,
3838
const RoutingPredictor& routing_predictor,
3939
const vtr::vector<ParentNetId, std::vector<std::unordered_map<RRNodeId, int>>>& choking_spots,
40-
bool is_flat)
40+
bool is_flat,
41+
int route_verbosity)
4142
: _routers_th(_make_router(router_lookahead, is_flat))
4243
, _net_list(net_list)
4344
, _router_opts(router_opts)
@@ -50,6 +51,7 @@ class DecompNetlistRouter : public NetlistRouter {
5051
, _routing_predictor(routing_predictor)
5152
, _choking_spots(choking_spots)
5253
, _is_flat(is_flat)
54+
, _route_verbosity(route_verbosity)
5355
, _net_known_samples(net_list.nets().size())
5456
, _is_decomp_disabled(net_list.nets().size()) {}
5557
~DecompNetlistRouter() {}
@@ -97,7 +99,8 @@ class DecompNetlistRouter : public NetlistRouter {
9799
device_ctx.rr_rc_data,
98100
device_ctx.rr_graph.rr_switch(),
99101
route_ctx.rr_node_route_inf,
100-
is_flat);
102+
is_flat,
103+
_route_verbosity);
101104
}
102105

103106
/* Context fields. Most of them will be forwarded to route_net (see route_net.tpp) */
@@ -116,6 +119,7 @@ class DecompNetlistRouter : public NetlistRouter {
116119
const RoutingPredictor& _routing_predictor;
117120
const vtr::vector<ParentNetId, std::vector<std::unordered_map<RRNodeId, int>>>& _choking_spots;
118121
bool _is_flat;
122+
int _route_verbosity;
119123

120124
/** Cached routing parameters for current iteration (inputs to \see route_netlist()) */
121125
int _itry;

vpr/src/route/NestedNetlistRouter.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class NestedNetlistRouter : public NetlistRouter {
3939
route_budgets& budgeting_inf,
4040
const RoutingPredictor& routing_predictor,
4141
const vtr::vector<ParentNetId, std::vector<std::unordered_map<RRNodeId, int>>>& choking_spots,
42-
bool is_flat)
42+
bool is_flat,
43+
int route_verbosity)
4344
: _net_list(net_list)
4445
, _router_lookahead(router_lookahead)
4546
, _router_opts(router_opts)
@@ -52,6 +53,7 @@ class NestedNetlistRouter : public NetlistRouter {
5253
, _routing_predictor(routing_predictor)
5354
, _choking_spots(choking_spots)
5455
, _is_flat(is_flat)
56+
, _route_verbosity(route_verbosity)
5557
, _thread_pool(MAX_THREADS) {}
5658
~NestedNetlistRouter() {}
5759

@@ -87,7 +89,8 @@ class NestedNetlistRouter : public NetlistRouter {
8789
device_ctx.rr_rc_data,
8890
device_ctx.rr_graph.rr_switch(),
8991
route_ctx.rr_node_route_inf,
90-
is_flat);
92+
is_flat,
93+
_route_verbosity);
9194
} else {
9295
// Parallel Connection Router
9396
return std::make_unique<ParallelConnectionRouter<HeapType>>(
@@ -99,6 +102,7 @@ class NestedNetlistRouter : public NetlistRouter {
99102
device_ctx.rr_graph.rr_switch(),
100103
route_ctx.rr_node_route_inf,
101104
is_flat,
105+
_route_verbosity,
102106
router_opts.multi_queue_num_threads,
103107
router_opts.multi_queue_num_queues,
104108
router_opts.multi_queue_direct_draining);
@@ -118,6 +122,7 @@ class NestedNetlistRouter : public NetlistRouter {
118122
const RoutingPredictor& _routing_predictor;
119123
const vtr::vector<ParentNetId, std::vector<std::unordered_map<RRNodeId, int>>>& _choking_spots;
120124
bool _is_flat;
125+
int _route_verbosity;
121126

122127
/** Cached routing parameters for current iteration (inputs to \see route_netlist()) */
123128
int _itry;

vpr/src/route/ParallelNetlistRouter.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class ParallelNetlistRouter : public NetlistRouter {
3434
route_budgets& budgeting_inf,
3535
const RoutingPredictor& routing_predictor,
3636
const vtr::vector<ParentNetId, std::vector<std::unordered_map<RRNodeId, int>>>& choking_spots,
37-
bool is_flat)
37+
bool is_flat,
38+
int route_verbosity)
3839
: _routers_th(_make_router(router_lookahead, is_flat))
3940
, _net_list(net_list)
4041
, _router_opts(router_opts)
@@ -46,7 +47,8 @@ class ParallelNetlistRouter : public NetlistRouter {
4647
, _budgeting_inf(budgeting_inf)
4748
, _routing_predictor(routing_predictor)
4849
, _choking_spots(choking_spots)
49-
, _is_flat(is_flat) {}
50+
, _is_flat(is_flat)
51+
, _route_verbosity(route_verbosity) {}
5052
~ParallelNetlistRouter() {}
5153

5254
/** Run a single iteration of netlist routing for this->_net_list. This usually means calling
@@ -74,7 +76,8 @@ class ParallelNetlistRouter : public NetlistRouter {
7476
device_ctx.rr_rc_data,
7577
device_ctx.rr_graph.rr_switch(),
7678
route_ctx.rr_node_route_inf,
77-
is_flat);
79+
is_flat,
80+
_route_verbosity);
7881
}
7982

8083
/* Context fields. Most of them will be forwarded to route_net (see route_net.tpp) */
@@ -93,6 +96,7 @@ class ParallelNetlistRouter : public NetlistRouter {
9396
const RoutingPredictor& _routing_predictor;
9497
const vtr::vector<ParentNetId, std::vector<std::unordered_map<RRNodeId, int>>>& _choking_spots;
9598
bool _is_flat;
99+
int _route_verbosity;
96100

97101
/** Cached routing parameters for current iteration (inputs to \see route_netlist()) */
98102
int _itry;

0 commit comments

Comments
 (0)