-
Notifications
You must be signed in to change notification settings - Fork 415
Clean up the usage tracking in grid blocks. #3088
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
Conversation
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.
Looks good @haydar-c ! It looks like this get_usage method was only used for drawing, logging, and verification which are not performance critical. I agree with removing the usage value and having it be dynamically calculated for simplicity.
I left a small comment on documentation, other than that it looks good to me!
Thank you for reviewing @AlexandreSinger! I've just added documentation for get_usage. |
vpr/src/base/grid_block.cpp
Outdated
@@ -31,7 +31,6 @@ void GridBlock::zero_initialize() { | |||
for (int layer_num = 0; layer_num < (int)device_ctx.grid.get_num_layers(); layer_num++) { | |||
for (int i = 0; i < (int)device_ctx.grid.width(); i++) { | |||
for (int j = 0; j < (int)device_ctx.grid.height(); j++) { | |||
set_usage({i, j, layer_num}, 0); | |||
auto tile = device_ctx.grid.get_physical_type({i, j, layer_num}); |
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.
Could you replace auto
with explicit type names?
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.
LGTM, but see Soheil's comment above. Should be a quick fix.
Thank you @soheilshahrouz for reviewing! I have changed the auto types to explicit ones for grid blocks. |
This PR removes the unused 'usage' member from t_grid_blocks and all associated routines of set_usage, increment_usage, decrement_usage (get_usage changed as below).
Description
Changes:
get_usage()
to dynamically count valid blocks based on sub-tile occupancy.Related Issue
This PR resolves the issue #1607