-
Notifications
You must be signed in to change notification settings - Fork 419
[RouterLookahead] Router Lookahead Report #3161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[RouterLookahead] Router Lookahead Report #3161
Conversation
Here is an example of what the report looks like: ![]() ... ![]() |
@amin1377 FYI, you might find this option interesting. |
Added an option to generate a report on the router lookahead. This reports profiles the router lookahead by performing a set of trial routes from source RR nodes to all target RR nodes and comparing the estimated cost from the router lookahead to the actual cost of the path. Notably, this report tries to show the mean squared error of the router lookahead and the maximum overestimation of the router lookahead. The mean squared error is a measure of how accurate the router lookahead is. The more accurate the router lookahead is, the faster the path search will be (with less loss in quality). The max overestimation is a measure of the admissibility of the router lookahead heuristic. The more the router lookahead overestimates, the worse the quality of the path found (theoretically).
d4026a5
to
c60fde5
Compare
return "UNKNOWN"; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rr_node_typename
in rr_node_types.h does the same thing.
|
||
// Create a NOP router lookahead to be used during the all-destination dijkstra search. | ||
t_det_routing_arch temp_det_routing_arch; | ||
auto temp_router_lookahead = make_router_lookahead(temp_det_routing_arch, e_router_lookahead::NO_OP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace auto with explicit type name
float heuristic_delay = 0.0f; | ||
float path_delay = 0.0f; | ||
}; | ||
std::vector<t_overestimation_info> max_overestimation_per_type((int)e_rr_type::NUM_RR_TYPES); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use vtr::vector and index it directly with e_rr_type
* valuable since over-estimations in the router lookahead cause the | ||
* heuristic to be inadmissible which can hurt quality. | ||
*/ | ||
static void profile_lookahead_overestimation(std::ofstream& os, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functio is quite long. Consider breaking it down
// The target number of random source (sample) nodes to use. | ||
size_t target_num_trials = 100; | ||
// The maximum number of attempts. | ||
size_t max_attempts = 10000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use constexpr if there is no plan to modify these values through command line options
Added an option to generate a report on the router lookahead. This reports profiles the router lookahead by performing a set of trial routes from source RR nodes to all target RR nodes and comparing the estimated cost from the router lookahead to the actual cost of the path.
Notably, this report tries to show the mean squared error of the router lookahead and the maximum overestimation of the router lookahead.
The mean squared error is a measure of how accurate the router lookahead is. The more accurate the router lookahead is, the faster the path search will be (with less loss in quality). The max overestimation is a measure of the admissibility of the router lookahead heuristic. The more the router lookahead overestimates, the worse the quality of the path found (theoretically).