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

Redesign how KBMOD encodes data for on GPU use #403

Merged
merged 8 commits into from
Dec 13, 2023
Merged

Conversation

jeremykubica
Copy link
Contributor

This PR moves the encoding of the Psi and Phi arrays into an object to provide more flexibility and better modularity. The major goals of this change include:

  • Restore the interleaved psi/phi approach from the original code to improve memory locality on the GPU.
  • Allow the code to copy the psi/phi data to GPU memory once and run multiple searches. This is not currently used anywhere, but will allow us to reduce the memory needed to store results by breaking the search into batches.
  • Provide direct hooks for reading the encoding that can be used for testing (previous code was tested indirectly via a full search)

The code is a bit complicated due to the fact that CUDA cannot call non-device functions from a device function (including the getters/setters for a class).

Copy link
Collaborator

@maxwest-uw maxwest-uw left a comment

Choose a reason for hiding this comment

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

have a few comments to make sure I understand how the kernel changes work, but otherwise looks good!

src/kbmod/search/kernels.cu Show resolved Hide resolved
src/kbmod/search/kernels.cu Show resolved Hide resolved
@jeremykubica jeremykubica merged commit 2c7c37b into main Dec 13, 2023
2 checks passed
@jeremykubica jeremykubica deleted the psi_phi_array branch December 13, 2023 19:45
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