Nice!!!
the inplace operation works. GPU memory doesn’t increase any longer.
during forward, the memory of add operation doesn’t increse any longer.
however, during backward, I experienced another issue:
Exception has occurred: RuntimeError one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [1, 64, 640, 360]], which is output 0 of AsStridedBackward, is at version 9; expected version 8 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!