You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I swap the parameters or activations of a module to CPU after its forward propagation, the CUDA memory actually be not freed.
But once the backward propagation of this module is performed, we can release the CUDA memory occupied by parameters or activations.
Is this related to the Autograd mechanism of PyTorch?
How can we free parameters or activations before backward propagation in PyTorch?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I swap the parameters or activations of a module to CPU after its forward propagation, the CUDA memory actually be not freed.
But once the backward propagation of this module is performed, we can release the CUDA memory occupied by parameters or activations.
Is this related to the Autograd mechanism of PyTorch?
How can we free parameters or activations before backward propagation in PyTorch?
Beta Was this translation helpful? Give feedback.
All reactions