Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.47 GiB (GPU 3; 23.69 GiB total capacity; 19.38 GiB already allocated; 1.44 GiB free; 20.79 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Dear all,
I am confused why GPU 3 total capacity is 23.69 GiB while PyTorch only reserved 20.79 GiB.
I am sure that no other process is running on the GPU
I tried to set os.environ[“PYTORCH_CUDA_ALLOC_CONF”] = “max_split_size_mb:1024”.
However, it increased nearly 30% of the computation time. It can be seen that the required
memory is only little more than the free memoey