Skip to content

Commit 3a56859

Browse files
committed
Merge branches 'symbiflow-badger', 'add-issue-template', 'disable-check-route-option', 'avoid-criticality-issue' and 'avoid_unordered_set' into master+wip
5 parents 97b94a0 + 4023771 + 776e39c + ff59c22 + 1ed32ca commit 3a56859

12 files changed

+56
-13
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
47

58
---
69

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
47

58
---
69

.github/ISSUE_TEMPLATE/vtr-change.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: VTR change
3+
about: Describe purpose and lifecycle of a local change we made to VTR
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
### Why did we need this? (what does this change enable us to do)
11+
<!--- i.e. what does this change enable us to do? -->
12+
13+
### What did it change?
14+
<!--- i.e. technical description what the change does -->
15+
16+
### Should it be merged upstream - if not, when can we delete it?
17+
18+
### What is needed to get this merged / deleted?
19+
20+
* [ ] is the implementation work to make suitable for merging / deletion completed?
21+
* [ ] Is there an associated test? <!--- i.e. how will we prevent it from regressing? -->
22+
* [ ] is this currently part of the Conda package?
23+
* [ ] is this properly cleaned up in our local repositories? <!--- add subtasks here if needed) -->
24+
25+
### Tracker / branch / PR & other useful links

vpr/src/base/SetupVPR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ static void SetupRouterOpts(const t_options& Options, t_router_opts* RouterOpts)
350350
RouterOpts->max_convergence_count = Options.router_max_convergence_count;
351351
RouterOpts->reconvergence_cpd_threshold = Options.router_reconvergence_cpd_threshold;
352352
RouterOpts->first_iteration_timing_report_file = Options.router_first_iteration_timing_report_file;
353-
354353
RouterOpts->strict_checks = Options.strict_checks;
354+
RouterOpts->disable_check_route = Options.disable_check_route;
355355
}
356356

357357
static void SetupAnnealSched(const t_options& Options,

vpr/src/base/read_options.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,11 @@ argparse::ArgumentParser create_arg_parser(std::string prog_name, t_options& arg
15791579
.default_value("")
15801580
.show_in(argparse::ShowIn::HELP_ONLY);
15811581

1582+
route_timing_grp.add_argument<bool, ParseOnOff>(args.disable_check_route, "--disable_check_route")
1583+
.help("Disables check_route once routing step has finished or when routing file is loaded")
1584+
.default_value("off")
1585+
.show_in(argparse::ShowIn::HELP_ONLY);
1586+
15821587
route_timing_grp.add_argument(args.router_debug_net, "--router_debug_net")
15831588
.help(
15841589
"Controls when router debugging is enabled.\n"

vpr/src/base/read_options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ struct t_options {
125125
argparse::ArgValue<bool> verify_binary_search;
126126
argparse::ArgValue<e_router_algorithm> RouterAlgorithm;
127127
argparse::ArgValue<int> min_incremental_reroute_fanout;
128+
argparse::ArgValue<bool> disable_check_route;
128129

129130
/* Timing-driven router options only */
130131
argparse::ArgValue<float> astar_fac;

vpr/src/base/vpr_api.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,9 @@ RouteStatus vpr_route_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
675675
std::string graphics_msg;
676676
if (route_status.success()) {
677677
//Sanity check the routing
678-
check_route(router_opts.route_type);
678+
if (!router_opts.disable_check_route) {
679+
check_route(router_opts.route_type);
680+
}
679681
get_serial_num();
680682

681683
//Update status

vpr/src/base/vpr_context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ struct DeviceContext : public Context {
147147
std::vector<std::vector<int>> rr_non_config_node_sets;
148148

149149
//Reverse look-up from RR node to non-configurably connected node set (index into rr_nonconf_node_sets)
150-
std::unordered_map<int, int> rr_node_to_non_config_node_set;
150+
std::vector<int> rr_node_to_non_config_node_set;
151151

152152
//The indicies of rr nodes of a given type at a specific x,y grid location
153153
t_rr_node_indices rr_node_indices; //[0..NUM_RR_TYPES-1][0..grid.width()-1][0..grid.width()-1][0..size-1]

vpr/src/base/vpr_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ struct t_router_opts {
962962
float reconvergence_cpd_threshold;
963963
std::string first_iteration_timing_report_file;
964964
bool strict_checks;
965+
bool disable_check_route;
965966
};
966967

967968
struct t_analysis_opts {

vpr/src/route/route_common.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,9 @@ float get_rr_cong_cost(int inode) {
723723

724724
float cost = get_single_rr_cong_cost(inode);
725725

726-
auto itr = device_ctx.rr_node_to_non_config_node_set.find(inode);
727-
if (itr != device_ctx.rr_node_to_non_config_node_set.end()) {
728-
for (int node : device_ctx.rr_non_config_node_sets[itr->second]) {
726+
int node_set = device_ctx.rr_node_to_non_config_node_set[inode];
727+
if (node_set != -1) {
728+
for (int node : device_ctx.rr_non_config_node_sets[node_set]) {
729729
if (node != inode) {
730730
continue; //Already included above
731731
}

vpr/src/route/rr_graph.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3113,20 +3113,19 @@ static void expand_non_configurable(int inode, std::set<t_node_edge>& edge_set)
31133113
}
31143114

31153115
static void process_non_config_sets(const t_non_configurable_rr_sets& non_config_rr_sets) {
3116-
std::vector<std::vector<int>> non_config_rr_node_sets;
3117-
std::unordered_map<int, int> rr_node_non_config_node_set;
3116+
auto& device_ctx = g_vpr_ctx.mutable_device();
3117+
3118+
std::vector<std::vector<int>>& non_config_rr_node_sets = device_ctx.rr_non_config_node_sets;
3119+
std::vector<int>& rr_node_non_config_node_set = device_ctx.rr_node_to_non_config_node_set;
3120+
rr_node_non_config_node_set.resize(device_ctx.rr_nodes.size(), -1);
31183121

31193122
for (const auto& node_set : non_config_rr_sets.node_sets) {
31203123
//Convert node sets to vectors
31213124
non_config_rr_node_sets.push_back(std::vector<int>(node_set.begin(), node_set.end()));
31223125

31233126
//Record reverse look-ups
31243127
for (int inode : node_set) {
3125-
rr_node_non_config_node_set.emplace(inode, non_config_rr_node_sets.size() - 1);
3128+
rr_node_non_config_node_set[inode] = non_config_rr_node_sets.size() - 1;
31263129
}
31273130
}
3128-
3129-
auto& device_ctx = g_vpr_ctx.mutable_device();
3130-
device_ctx.rr_non_config_node_sets = std::move(non_config_rr_node_sets);
3131-
device_ctx.rr_node_to_non_config_node_set = std::move(rr_node_non_config_node_set);
31323131
}

vpr/src/timing/timing_util.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,10 @@ float calc_relaxed_criticality(const std::map<DomainPair, float>& domains_max_re
571571
max_req += shift;
572572
}
573573

574+
if (!std::isfinite(slack)) {
575+
continue;
576+
}
577+
574578
float crit = std::numeric_limits<float>::quiet_NaN();
575579
if (max_req > 0.) {
576580
//Standard case

0 commit comments

Comments
 (0)