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:
[email protected]


With regards,
Apache Git Services

Reply via email to