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

Conversation

KA7E
Copy link
Contributor

@KA7E KA7E commented Aug 8, 2024

If running packing but not placement, return before unnecessary placement data structure setup.

Description

If packing returns success, added check to see if placement will run; if not, return.

Related Issue

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@KA7E KA7E requested a review from vaughnbetz August 8, 2024 01:21
@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Aug 8, 2024
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

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

CI on the google cloud runners is down again, unfortunately, so lots of tests didn't run. @AlexandreSinger is looking into it.
Please run tests on one design with:
--route
--analysis
--place
--pack

to make sure all the flows work with this change. From code inspection I am worried --route and --analysis might not work with the change.

@@ -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.

@KA7E
Copy link
Contributor Author

KA7E commented Aug 8, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants