-
Notifications
You must be signed in to change notification settings - Fork 396
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
NetCostHandler class #2676
NetCostHandler class #2676
Conversation
…b_from_scratch_()
Re-launching CI. |
vtr_nightly_test5 failures all appear to be in 3D architectures with placement constraints (one big partition, left / right, and up/down partitions). The return code is SIGABRT, which likely means a seg fault. |
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.
Hi @soheilshahrouz , I really appreciate these kind of code refactorings! I think VTR can really improve with more classes like this!
I have left a few comments; however, I recognize that a lot of this code is not yours and you are just moving it from one place to another. So, feel free to ignore the comments if you think they are not necessary for what you are doing.
vtr_reg_nightly_test3/vtr_reg_qor_chain_large
|
vtr_reg_nightly_test2/titan_quick_qor
|
…s() to BlkLocRegistry class
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.
Minor changes requested and some TODOs. Biggest one is 3D / cube_bb -- we seem to be missing the 3rd dimension computation. @amin1377 : is the layer part of cube_bb merged in?
* will never be used. | ||
*/ | ||
vtr::NdMatrix<float, 2> chanx_place_cost_fac_; // [0...device_ctx.grid.width()-2] | ||
vtr::NdMatrix<float, 2> chany_place_cost_fac_; // [0...device_ctx.grid.height()-2] |
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.
TODO: make these line up with the edge of the grid so we get rid of some if statements (probably width-1 or width instead of width-2).
Also, we should have a 3rd dimension normalization somewhere using the same technique and it seems that variable should also go here.
|
||
return (ncost); | ||
return ncost; |
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.
We should have a 3rd term:
ncost += (layer_max-layer_min+1) * chanz_place_cost_fac
Big TODO!
QoR looks good -- good to merge. |
@soheilshahrouz @vaughnbetz The failed CI test is the one that I fixed in my most recent PR. I think this can just be merged. |
@vaughnbetz I applied your comments and replaced |
This PR refactors net_cost_handler.cpp/.h files. A new class called NetCostHandler is added. All static variables in net_cost_handler.cpp are now member variables of NetCostHandler. Removing file-scoped variables is another step towards running multiple annealers at the same time.