You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/05 18:01:43 UTC

[GitHub] mcxkarakoc opened a new issue #5983: Memory leak in Module. Bug?

mcxkarakoc opened a new issue #5983: Memory leak in Module. Bug?
URL: https://github.com/apache/incubator-mxnet/issues/5983
 
 
   For bugs or installation issues, please provide the following information.
   The more information you provide, the more likely people will be able to help you.
   
   ## Environment info
   Operating System: Ubuntu 16.04
   
   Compiler: gcc
   
   Package used (Python/R/Scala/Julia): Python
   
   MxNet commit hash: f89f96540ec477de6f2e0fee5001df0b78810316
   
   If you are using python package, please provide
   
   Python version and distribution: 2.7
   ---------------------------------------------------
   I'll explain the issue as a little bit story :) Sorry about this. Let's have a 8GB GPU.
   
   When I've executed the code below, no problem.
   ```python
   A = mx.nd.uniform(...) #Create a 7GB array in GPU
   A= None
   
   sleep(1)
   A = mx.nd.uniform(...) #Create a 7GB array in GPU
   ```
   However, when I've executed such a code, `CUDA: Out of memory` error occurs when a new 7GB array is being created after `fit()`.
   
   ```python
   A = mx.nd.uniform(...) #Create a 7GB array in GPU
   A= None
   
   sleep(1)
   
   B = mx.mod.Module(...) # Will create and use 1,5GB array in total in GPU
   B.fit(...)
   B = None # or del B or something else to run garbage collector
   
   sleep(1) # 1, 2 sec or whatever. Does not matter.
   A = mx.nd.uniform(...) #Create a 7GB array in GPU, Out of memory
   ```
   
   How can I force the module to release its GPU memory? 
   
   
   
   
   
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services