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

How to avoid CUDA out of memory error for large batch sizes? #18

Open
phosseini opened this issue Oct 1, 2019 · 1 comment
Open

How to avoid CUDA out of memory error for large batch sizes? #18

phosseini opened this issue Oct 1, 2019 · 1 comment

Comments

@phosseini
Copy link

phosseini commented Oct 1, 2019

I have two GPUs (2 x NVIDIA Tesla V100) and I'm running the codes in run_model.ipynb on Google Cloud. I get the CUDA out of memory exception when I want to run my code with a sequence length longer than 128 for greater batch sizes.

I wonder if I need to make any changes to the code to make it runnable using multiple GPUs? I think I shouldn't get the out of memory error considering the number of GPUs I have and their memory (please correct me if I'm wrong.)

@ThilinaRajapakse
Copy link
Owner

The code in this repo was not written to support multi-GPU training (mainly because I only have the one). But, the code that this is based on does support multi-GPUs. You should be able to get it to work with only a few changes.

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