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/06 08:42:57 UTC

[GitHub] edmBernard commented on issue #8965: GPU Memory Usage keep increase (Not in train or predict)

edmBernard commented on issue #8965: GPU Memory Usage keep increase (Not in train or predict)
URL: https://github.com/apache/incubator-mxnet/issues/8965#issuecomment-349572288
 
 
   Most of Mxnet computation are asynchronous. 
   A simple loop like this will crash GPU:
   ```python
   for image in dataset:
        tmps += module.predict(image)
   ```
   Because it start new prediction without waiting the end of previous one.
   
   To force mxnet to wait the end of previous prediction you can add `waitall`
   ```python
   for image in dataset:
        tmps += module.predict(image)
        ndarray.waitall()
   ```

----------------------------------------------------------------
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