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

Multi-dimensional Unrolling #12

Open
muellch opened this issue Mar 18, 2020 · 1 comment
Open

Multi-dimensional Unrolling #12

muellch opened this issue Mar 18, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@muellch
Copy link
Collaborator

muellch commented Mar 18, 2020

Unrolling a stencil in 2 or even 3 dimensions (+ inlining) might have performance benefits over unrolling into one dimension (+ inlining).

Example in 2D:

  • Assume for every grid point (i,j) the Laplacians for the 9 surrounding gridpoints have to be calculated (i-1) to (i+1) and (j-1) to (j+1).
  • We now compare no unrolling to unrolling in one direction by 4 to unrolling in 2 dimensions by 2. We always look at how many Laplacians have to be calculated for 4 grid points.
  • No Unrolling: 4*9 = 36
  • Unrolling in one dimension by 4: 9 + 3*3 = 18
  • Unrolling in two dimensions by 2: 9 + 3 + 4 = 16

Here the unrolling in two dimensions seems to be the best choice for performance

@gysit
Copy link
Collaborator

gysit commented Aug 27, 2020

I close this issue since this has rather low priority at the moment. I think we should focus on features and correctness

@gysit gysit closed this as completed Aug 27, 2020
@gysit gysit reopened this Aug 27, 2020
@gysit gysit added the enhancement New feature or request label Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants