Why does pytorch lightning cause more GPU memory usage? #13648
Replies: 1 comment 8 replies
-
Hi @chuzheng88! Thank you for waiting for replies patiently here. I haven't looked at your pure PyTorch implementation, so I can't point out issues for sure. However, to me, the suspect looks like the return value of Also, there is a list of possible causes in performance difference between PL and PyTorch in #12398. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Assumign that my model uses 2G GPU memory, every batch data uses 3G GPU memory. Traning code will use 5G (2+3) GPU memory when I use Pytorch. However, new training code use 8G (2 + 3 + 3) GPU memory when I use Pytorch ligntning. I do not know why ? or new codes are wrong ?

Some new codes described as follows:
Can you help me ?
Beta Was this translation helpful? Give feedback.
All reactions