Release ALL CUDA GPU MEMORY using Libtorch C++ - C++ ...
discuss.pytorch.org › t › release-all-cuda-gpuJan 08, 2021 · Hi, I want to know how to release ALL CUDA GPU memory used for a Libtorch Module ( torch::nn::Module ). I created a new class A that inherits from Module. This class have other registered modules inside. I cannot release a module basic-class instance as nn::Conv2d. To start I will ask for a simple case of how to release a simple instance of nn::Conv2d that has its memory in a CUDA GPU. Here an ...