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

Out of GPU memory when running posterior sampling post-training #27

Open
azylbertal opened this issue Oct 2, 2024 · 0 comments
Open

Comments

@azylbertal
Copy link

return [s / num_samples for s in sums]

Hi!
I'm analysing a very large dataset, and encountered a problem where during the generation of the posterior sample (post training) I kept running out of GPU memory. I narrowed it down to the fact that all of the results are accumulated in the GPU RAM, and only being transferred to the CPU RAM after analysing all the trials. Solved by changing the line above to:
return [(s / num_samples).cpu() for s in sums]

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

No branches or pull requests

1 participant