Free GPU memory?


#1

Dear all,

is there a way to free GPU memory allocated, from within a python executable? Deleting a network doesn’t seem to de-allocate the memory until the python program exits.


#2

MXNet does normally not de-allocate memory because of performance reasons: memory that has been de-allocated goes back to an internal memory pool so that it can be reused. However there is an environment variable (MXNET_GPU_MEM_POOL_RESERVE) where you can adjust how much memory is reserved by MXNet.