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

Refactor StackSearch to do batching at search() function #356

Closed
jeremykubica opened this issue Sep 28, 2023 · 1 comment
Closed

Refactor StackSearch to do batching at search() function #356

jeremykubica opened this issue Sep 28, 2023 · 1 comment

Comments

@jeremykubica
Copy link
Contributor

The search() function in StackSearch runs the GPU-based search for the entire cross product of starting pixels and search_list velocities. Given N x M images and V different velocities, it runs N * M * V searches and stores 8 * N * M * V results in a results vector. To avoid overloading python, it provides a function to read the results back in batches.

We could reduce memory usage by doing the batching at the search function instead. The search function would run a subset of the searches (maybe a range of starting pixels) and return the results directly. It would not need to store the full result set in memory in either the GPU (during computation) or CPU (after computation). Individual batches could be filtered before the next set is run.

In order to do this batching efficiently, we need to do the precomputation (creating the psi_images and phi_images) once and copy the data to the GPU once. This would require new functions to prepare and clean up the GPU memory (both based off of deviceSearchFilter).

@jeremykubica
Copy link
Contributor Author

Closed by #530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant