epigraf icon indicating copy to clipboard operation
epigraf copied to clipboard

How should I reduce the initial peak gpu memory?

Open tau-yihouxiang opened this issue 2 years ago • 1 comments

I have run the source code and it works! I wonder how should I reduce the initial peak gpu memory, so that I can increase the resolution to 512. Thank you in advance!

image

tau-yihouxiang avatar Jul 01 '22 05:07 tau-yihouxiang

Hi! Turned out the problem was during printing G's summary. Looks like even using torch.no_grad() context does not help — likely due to some hooks inside the print_module_summary(...) function. I reduced the batch size for the call in this commit, so it should help (it did help me locally to resolve the problem). Thank you for reporting the issue!

universome avatar Jul 03 '22 05:07 universome