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

About memory usage #2

Closed
EdwardLi250 opened this issue Jul 26, 2021 · 2 comments
Closed

About memory usage #2

EdwardLi250 opened this issue Jul 26, 2021 · 2 comments

Comments

@EdwardLi250
Copy link

How to reduce memory usage in the code?
I tried to modify 'batch-size', but whatever I set, memory usage was always very high, and would return a 'CUDA out of memory' error.

I use an RTX 2080Ti, so I suppose my gpu memory should be enough?

@Wendison
Copy link
Owner

Hi, in my case, I use RTX 2080 (~12GB) and set batch-size to 16, it takes around 8GB for running experiments by using apex. Without apex, it will exceed 12GB. Maybe you can try to install apex (https://github.com/NVIDIA/apex) to reduce the memory usage.

@EdwardLi250
Copy link
Author

Thanks! I installed apex and enabled amp, it works

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

2 participants