-
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
Improving Unrelated Clustering Feature in VPR #2237
Open
kimiatkh
wants to merge
8
commits into
master
Choose a base branch
from
unrelated_clustering_fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
826cc37
Enabling unrelated clustering by block type
kimiatkh 6034bf6
make format
kimiatkh 919f1df
Updating the documentation
kimiatkh 55c929b
Add more comments
kimiatkh a29adb2
Refactor the try_pack function
kimiatkh e3893a5
Add comments
kimiatkh 91884fe
Add comments
kimiatkh 7500fcd
make foramt
kimiatkh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,10 +133,14 @@ enum class e_const_gen_inference { | |
COMB_SEQ ///<Both combinational and sequential constant generator inference | ||
}; | ||
|
||
enum class e_unrelated_clustering { | ||
OFF, | ||
ON, | ||
AUTO | ||
enum class e_unrel_clust_stat { | ||
OFF, ///<unrelated clustering is turned off | ||
ON ///<unrelated clustering is turned on | ||
}; | ||
|
||
enum class e_unrel_clust_mode { | ||
FIXED, ///<Unrelated clustering status is given by the user and cannot be updated | ||
AUTO ///<Unrelated clustering status can be updated by VPR throughout the packing flow | ||
}; | ||
|
||
enum class e_balance_block_type_util { | ||
|
@@ -208,6 +212,53 @@ class t_ext_pin_util_targets { | |
std::map<std::string, t_ext_pin_util> overrides_; | ||
}; | ||
|
||
class t_allow_unrelated_clustering { | ||
public: | ||
t_allow_unrelated_clustering() = default; | ||
t_allow_unrelated_clustering(enum e_unrel_clust_stat status, enum e_unrel_clust_mode mode); | ||
/** | ||
* @brief Returns the unrelated clustering status for the specified block type | ||
*/ | ||
enum e_unrel_clust_stat get_block_status(std::string block_type_name) const; | ||
/** | ||
* @brief Returns the unrelated clustering mode for the specified block type | ||
*/ | ||
enum e_unrel_clust_mode get_block_mode(std::string block_type_name) const; | ||
|
||
public: | ||
/** | ||
* @brief Sets the unrelated clustering status for the specified block type | ||
* | ||
* @param block_type_name | ||
* The pb_type name of the block for which we want to set the unrelated clustering status | ||
* @param status | ||
* A pair of status control variables. The first variable indicates whether | ||
* unrelated clustering is turned on or off. The second variable indicates | ||
* whether the status of the variable is provided by the user | ||
* (bool = false) or user lets it to be automatically determined by VPR | ||
* (bool = true). If provided by the user, the status cannot be overriden | ||
* later, otherwise it can be adjusted by VPR throughout the flow as necessary. | ||
*/ | ||
void set_block_status(std::string block_type_name, std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode> status); | ||
/** | ||
* @brief Sets the default value for unrelated clustering status | ||
* | ||
*/ | ||
void set_default_status(std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode> status); | ||
|
||
private: | ||
/** | ||
* @brief The default value of unrelated clustering status for all block types | ||
*/ | ||
std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode> default_; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Comment what these are: default value for all block types, and overrides by block_type name for specific types. Each says whether unrelated cluster is on or off, and if it was set to that state by the user or automatic vpr behaviour. |
||
/** | ||
* @brief Overrides the default value of unrelated clustering status for specific block types. Each entry | ||
* is associated with a certain block type and determines whether unrelated cluster is on or off, | ||
* and whether its status is set by the user or automatically determined by VPR. | ||
*/ | ||
std::map<std::string, std::pair<enum e_unrel_clust_stat, enum e_unrel_clust_mode>> overrides_; | ||
}; | ||
|
||
class t_pack_high_fanout_thresholds { | ||
public: | ||
t_pack_high_fanout_thresholds() = default; | ||
|
@@ -840,7 +891,7 @@ struct t_packer_opts { | |
float inter_cluster_net_delay; | ||
float target_device_utilization; | ||
bool auto_compute_inter_cluster_net_delay; | ||
e_unrelated_clustering allow_unrelated_clustering; | ||
std::vector<std::string> allow_unrelated_clustering; | ||
bool connection_driven; | ||
int pack_verbosity; | ||
bool enable_pin_feasibility_filter; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
comment usage / meaning