Solved by ptrblck in post #2 
              
              
                I don’t think there is a reliable way to calculate the real GPU memory usage without running the code. 
Depending on your hardware, CUDA version, PyTorch version etc. the CUDA context would need a different memory footprint. While the difference might be small, this would already add some version de…