-
Notifications
You must be signed in to change notification settings - Fork 415
Add check route option #1288
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
Add check route option #1288
Conversation
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Dustin DeWeese <[email protected]>
Signed-off-by: Dustin DeWeese <[email protected]>
The difference between the "quick" and "full" check is the non-configurable nodes that are checked in the "full" and skipped with the "quick" option Signed-off-by: Alessandro Comodi <[email protected]>
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.
Overall the code in this PR looks good.
On question however, I recall someone (perhaps @HackerFoo?) mentioning they had found a performance fix for check route. If that fix exists, is it reasonable to just land the fix instead of adding this option?
If this does get merged, we should include a strong regression test for the added command-line option (testing: off, quick, full).
Other comments are below.
vpr/src/base/vpr_api.cpp
Outdated
if (router_opts.check_route == e_check_route_option::QUICK) { | ||
check_route(router_opts.route_type, /*quick=*/true); | ||
} else if (router_opts.check_route == e_check_route_option::FULL) { | ||
check_route(router_opts.route_type, /*quick=*/false); | ||
} else { | ||
VTR_LOG_WARN("The user disabled the check route step."); | ||
} |
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.
I'd suggest moving this code inside check_route (passing in route_opts.check_route as an argument).
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.
One reason I did put the check_route option check outside of check_route is that, if the option disables it, then check_route should not be called.
I thought it was cleaner to leave all the conditions of the check route option in one place
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.
I think it's OK to put the check inside check_route and have it bail out early, something like:
void check_route(e_route_type route_type, e_check_route_option option) {
if (option == e_check_route_option::OFF) {
VTR_LOG_WARN("The user disabled the check route step.");
return;
}
//Normal check route...
}
That keeps check_route() more re-usable and ensures the option is respected if more calls to check_route() are ever added in the future (e.g. after tweaking/fine-tuning an existing routing).
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.
I also like embedding the check inside check_route to make it all self contained.
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.
Sure, done. Also added a reg test with all the three options.
See the changes I made to This may improve the runtime of I can make and test a separate PR. |
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
61946f5
to
0d5dc85
Compare
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.
I've made a comment about the default value below.
I guess my only remaining question is, do we still need this option if #1289 makes the non-config edge check run-time acceptable?
vpr/src/base/read_options.cpp
Outdated
" * off : check route is completely disabled.\n" | ||
" * quick : runs check route with slow checks disabled.\n" | ||
" * full : runs the full check route step.\n") | ||
.default_value("quick") |
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.
I'd lean towards keeping the default for this option as full
. That ensures we do the most thorough checking by default (which is what we want, for example in regular VTR). Particularly if #1289 narrows the run-time difference between quick
and full
.
If someone (e.g. symbiflow) want to use quick, I feel that should be an end-user/flow override.
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.
Sure, moved the option default back to full
Signed-off-by: Alessandro Comodi <[email protected]>
I think we need to wait for @HackerFoo's data. Probably this will not be needed anymore if run-time goes back to acceptable levels. |
Description
This PR adds an option that controls how check route runs. It consists of three values:
off
: check route is completely disabled;quick
: non-configurable nodes are skipped from the check;full
: performs the full check;Motivation and Context
For some of the real devices, check route takes a non-negligible amount of time due to the high presence of non-configurable nodes, which check slows down the entire process.
With this PR the user can choose to skip the check of these nodes, or completely disable the check route.
How Has This Been Tested?
reg_basic
reg_strong
Types of changes
Checklist: