torch-bakedsdf icon indicating copy to clipboard operation
torch-bakedsdf copied to clipboard

OutOfMemoryError : how to reduce GPU memory footprint ?

Open fabricecarles opened this issue 1 year ago • 0 comments

when I try to run : python launch.py --config configs/bakedsdf-colmap.yaml --gpu 0 --train I get this type of error in my GPU GeForce RTX 2070 (with 8 Gb of VRAM)

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 2.10 GiB (GPU 0; 7.79 GiB total capacity; 3.30 GiB already allocated; 341.44 MiB free; 5.82 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
Epoch 0: : 16it [02:12,  8.29s/it, loss=1.99, train/inv_s=20.10, train/num_rays=1226.0]
  1. How can I change config to reduce GPU memory footprint ?
  2. What is the minim amount of VRAM required ?

fabricecarles avatar Feb 09 '24 17:02 fabricecarles