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 cost too much with platoon #84

Open
mingxuan opened this issue Dec 8, 2016 · 5 comments
Open

GPU Memory cost too much with platoon #84

mingxuan opened this issue Dec 8, 2016 · 5 comments

Comments

@mingxuan
Copy link

mingxuan commented Dec 8, 2016

I write a neural machine translation system with platoon.
The batch size is 80 and sync every 10 mini-batches.
I found that the memory cost about 4 times larger than the same system without platoon.
Does someone else have the same experience?

I have also test the "lstm" example, which cost about 5GB memory with 16 batch size and 1024 hidden size.
Could some else help me to find the problem?

@nouiz
Copy link
Contributor

nouiz commented Dec 10, 2016 via email

@mingxuan
Copy link
Author

It's GPU memory. I use the command "nvidia-smi" to see the GPU memory cost.
I found that when use platoon, the memory cost is stable and the "GPU-util" is very closing to 100%.
While without platoon, my gpu cost will change rapidly during training and the "CPU-Util" will also vary form about 30% to 100%.
Would Platoon change the default config of Theano?
Thanks for your help.

@mouna99
Copy link

mouna99 commented Apr 19, 2017

I meet the same problem, and it is worse for me to have the "out of memory" error, so my nmt system can not train with platoon at all. Have you finally solved this problem?

Thanks for your help.

@mingxuan
Copy link
Author

The problem may comes from NCCL and pygpu. I find that theano built with NCCL and pygpu cost much more memory than previous version.

@cshanbo
Copy link

cshanbo commented Jun 21, 2017

Yes. The more memory cost does caused by the new back-end of Theano. We prefer to use THEANO_FLAGS=gpuarray.preallocate=0.95,... to pre-allocate GPU memory, where you could set 0.95 to any other digit \in (0, 1). See this issue

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