Skip to content

Change warmup strategy for sliding window#5755

Merged
dsharletg merged 160 commits intomasterfrom
dsharletg/sliding-window
Mar 11, 2021
Merged

Change warmup strategy for sliding window#5755
dsharletg merged 160 commits intomasterfrom
dsharletg/sliding-window

Conversation

@dsharletg
Copy link
Contributor

@dsharletg dsharletg commented Feb 18, 2021

This branch changes how we handle the "warmup" of sliding windows before running the "steady state". The old strategy was to make the first iteration handle the warmup. This branch changes the strategy to "back up" the loop so the steady state warms up the loop itself, inserting the necessary ifs to guard the producer and consumer to avoid producing or consuming out of bounds values.

This change has the following impacts:

  • It is now possible to generate much finer grained sliding window schedules with low overhead. The 'blur' app in this branch is ~30% faster than master.
  • Some sliding window schedules appear to get possibly a bit faster in some test cases (local_laplacian, stencil_chain, camera_pipe).
  • Folded storage buffers can be smaller, because the folded storage only needs to accommodate the steady state of the loop. The warmups in the old strategy needed larger folded storage windows. See the changes to camera_pipe and local_laplacian for example. This should make storage folding less confusing (the reason for the larger factors was confusing and seemed unnecessary).

This avoids one of the motivations for #5204, and is hopefully helpful for #1820

@dsharletg
Copy link
Contributor Author

Reopening now that those two prerequisite PRs have been merged.

@dsharletg dsharletg reopened this Mar 3, 2021
@steven-johnson
Copy link
Contributor

Looks clean. Ready to land?

@dsharletg
Copy link
Contributor Author

I think this is ready to merge, @abadams, @rootjalex did you want to take a final look at this before merging?

Copy link
Member

@rootjalex rootjalex left a comment

Choose a reason for hiding this comment

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

The interval code lgtm

@dsharletg dsharletg merged commit c3882a5 into master Mar 11, 2021
@dsharletg dsharletg deleted the dsharletg/sliding-window branch March 11, 2021 23:14
@alexreinking alexreinking added this to the v12.0.0 milestone May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants