You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Detectron2 in order to train a custom dataset of about 4000 images. I turned off augmentation, and I'm experiencing some out of memory on GPUs. My cluster have nodes with 4 Nvidia Tesla V100 16 Gb for gpu.
With augmentation on it works well. The problems start when is off. Using 1 GPU I get:
RuntimeError: CUDA out of memory. Tried to allocate 154.00 MiB (GPU 0; 15.78 GiB total capacity; 14.34 GiB already allocated; 88.88 MiB free; 14.36 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
Using 8 GPus I Get:
RuntimeError: CUDA out of memory. Tried to allocate 240.00 MiB (GPU 1; 15.78 GiB total capacity; 14.10 GiB already allocated; 204.88 MiB free; 14.12 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
Using 16 GPus I get:
RuntimeError: CUDA out of memory. Tried to allocate 348.00 MiB (GPU 2; 15.78 GiB total capacity; 13.36 GiB already allocated; 266.88 MiB free; 13.90 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
I don't understand if Detectron split dataset among GPUs or simply replicate on each GPU. Why the amount of memory per GPU requested does not decrease with more GPus?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using Detectron2 in order to train a custom dataset of about 4000 images. I turned off augmentation, and I'm experiencing some out of memory on GPUs. My cluster have nodes with 4 Nvidia Tesla V100 16 Gb for gpu.
First of all, I disabled augmentation:
Some net configuration:
And launched with multigpus and multi node (example using 2 nodes and 4 gpu per node, so 8 gpus in total):
With augmentation on it works well. The problems start when is off. Using 1 GPU I get:
RuntimeError: CUDA out of memory. Tried to allocate 154.00 MiB (GPU 0; 15.78 GiB total capacity; 14.34 GiB already allocated; 88.88 MiB free; 14.36 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
Using 8 GPus I Get:
RuntimeError: CUDA out of memory. Tried to allocate 240.00 MiB (GPU 1; 15.78 GiB total capacity; 14.10 GiB already allocated; 204.88 MiB free; 14.12 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
Using 16 GPus I get:
RuntimeError: CUDA out of memory. Tried to allocate 348.00 MiB (GPU 2; 15.78 GiB total capacity; 13.36 GiB already allocated; 266.88 MiB free; 13.90 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
I don't understand if Detectron split dataset among GPUs or simply replicate on each GPU. Why the amount of memory per GPU requested does not decrease with more GPus?
I tried also using:
export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:128
with no effect. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions