-
Hi, I use the C++ APIs of MXNet to do some classification tasks. But I find that MXNet does not release GPU memory when calling MXPredFree(). When my program exits, all occupied GPU memory is released. So when I run my program, I can do classification just once, otherwise GPU memory is not enough. I think this is a very serious problem. I hope MXNet developers @tqchen @mli @piiswrong can look into this issue and resolve it ASAP. Thanks! The sequence of function calls is as follows: after i call MXPredCreate the GPU memory will capture by mxnet, by i can not release gpu memory bu mxnet c_predict_api |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use the C-API |
Beta Was this translation helpful? Give feedback.
You can use the C-API
MXStorageEmptyCache(dev_type, dev_id)
to ask the memory pool to release the memory