Skip to content
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

if stopping after packing skip unnecessary placement setup #2680

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions vpr/src/base/vpr_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ bool vpr_flow(t_vpr_setup& vpr_setup, t_arch& arch) {
if (!pack_success) {
return false; //Unimplementable
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work if --route is specified? In that case packing is skipped (read from file), placement and skipped (read from file) but routing is performed. Same question is --analysis is specified. This change looks like it could break those flows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doPlacement is an enum:

enum e_stage_action {
STAGE_SKIP = 0,
STAGE_LOAD,
STAGE_DO,
STAGE_AUTO
};

So the value checked on line 386 (!vpr_setup.PlacerOpts.doPlacement) is only true when doPlacement is set to STAGE_SKIP. If Analysis or Routing is run but Placement is not, doPlacement is set to STAGE_LOAD, which does not trigger the early return in line 387.

if (!vpr_setup.PlacerOpts.doPlacement) {
return true; // skip unnecessary placer setup
}
}

// For the time being, we decided to create the flat graph after placement is done. Thus, the is_flat parameter for this function
Expand Down Expand Up @@ -602,11 +605,11 @@ bool vpr_pack_flow(t_vpr_setup& vpr_setup, const t_arch& arch) {
// generate a .net file by legalizing an input flat placement file
if (packer_opts.load_flat_placement) {

//Load and legalizer flat placement file
vpr_load_flat_placement(vpr_setup, arch);

//Load the result from the .net file
vpr_load_packing(vpr_setup, arch);
//Load and legalize flat placement file
status = vpr_load_flat_placement(vpr_setup, arch);
if (!status) {
return status;
}

} else {

Expand Down
Loading