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

GPU memory keeps increasing with every batch and finally leads to CUDA being out of memory #9

Open
Lin-ZN opened this issue May 17, 2023 · 4 comments

Comments

@Lin-ZN
Copy link

Lin-ZN commented May 17, 2023

Hi Otaheri,

Thank you for your good work!

Do you meet the problem that when training GNet, the GPU memory keeps increasing with every batch and finally leads to CUDA being out of memory? When training GNet, the first few iterations have seen a significant GPU memory increase, while the later each batch has increased by approximately 2 or 4M. As far as I know, if we don't intentionally save some variables with gradients, the release and new occupation of memory after the first iteration in training neural networks should be in a balanced stage, that is, there won't be any further increase in GPU memory. Could you help me solve this problem? Thank you very much!

@siddharthKatageri
Copy link

@Lin-ZN I noticed the same. Were you able to find the cause for this?
@otaheri

@Lin-ZN
Copy link
Author

Lin-ZN commented Mar 5, 2024

@siddharthKatageri Hello, this issue may be caused by a mismatch in the PyTorch environment and its dependencies. I resolved the problem by adjusting the environment configuration. I hope this information helps you as well.

@z050209
Copy link

z050209 commented Apr 5, 2024

@Lin-ZN hi, I also face the same issue, would please also share your python version and pytorch version etc.? Thank you!

@otaheri
Copy link
Owner

otaheri commented Apr 22, 2024

Hi @siddharthKatageri @z050209 @Lin-ZN, did you guys find a solution for this? Unfortunately I couldn't replicate this so far. Maybe, can you provide more details about the system and config that you have so that we can try replicating this and finding a solution? Also, if you found a solution for this, it would be great to share it. Thanks.

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

4 participants