free_memory#
- delu.cuda.free_memory() None [source]#
Free GPU memory =
torch.cuda.synchronize
+gc.collect
+torch.cuda.empty_cache
.Note
There is a small chunk of GPU-memory (occupied by drivers) that is impossible to free. This is a property of
torch
, so this function inherits this property.Usage
>>> delu.cuda.free_memory()