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

use accelerator for setCheckerboard in RHMC #379

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

edbennett
Copy link
Contributor

This goes some way towards #378. One-flavour RHMC is 10–20% faster with this, and gives identical results (i.e. generated configurations, excluding the header, are bitwise identical).

Things that could potentially be improved:

  • I don't understand what the optional checker_dim_half parameter to acceleratorSetCheckerboard does, so I have left it at the default value.
  • In principle I imagine that all calls to setCheckerboard could behave the same way; adding a dispatcher function in Lattice_transfer.h that implements the code in this PR in a single place, and then replacing all calls to setCheckerboard with calls to this new function would achieve this. However, I'm not set up to verify that the other calls to setCheckerboard still give correct results after this change, so I took the more conservative approach of just changing what I can confidently claim works.

@paboyle
Copy link
Owner

paboyle commented Aug 23, 2024

Hi -- I didn't merge this request because I was worried about the comments about non-understood parameter.
But I'm working on a feature branch that unifies the accelerator and non-accelerator pickCheckerboard to just always be fast (and single implementation).
All it required was a small change to the base class to expose a virtual method that for checkerboard grids returns the checker_dim, and is possible to always use the accelerator version.

@edbennett
Copy link
Contributor Author

Many thanks for the feedback—it'd be great to have a single performant implementation of this!

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.

2 participants