Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA run out of memory #20

Open
delonixsen opened this issue Jan 27, 2022 · 2 comments
Open

CUDA run out of memory #20

delonixsen opened this issue Jan 27, 2022 · 2 comments

Comments

@delonixsen
Copy link

delonixsen commented Jan 27, 2022

RuntimeError: CUDA out of memory. Tried to allocate 1.51 GiB (GPU 0; 3.82 GiB total capacity; 1.04 GiB already allocated; 74.38 MiB free; 1.04 GiB reserved in total by PyTorch)

Can someone help me with this problem? since I tried to reduce batch size, and nothing works

GPU : NVIDIA GeForce GTX 1650 4GB

Should I upgrade the Graphics Card?

@gostensvig
Copy link

gostensvig commented Apr 17, 2022

I got the same error:

RuntimeError: CUDA out of memory. Tried to allocate 1.51 GiB (GPU 0; 3.82 GiB total capacity; 1.04 GiB already allocated; 99.75 MiB free; 1.04 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

The error happened when I ran:
./experiments/scripts/demo.sh

GPU : NVIDIA Quadro T2000 with Max-Q

I'm using:

  • Ubuntu 18.04
  • PyTorch 1.10.2
  • CUDA 11.3

Full Traceback:

finished loading sdf ! 
Traceback (most recent call last):
  File "./tools/test_images.py", line 193, in <module>
    cfg.sdf_optimizer = sdf_optimizer(cfg.TEST.CLASSES[1:], sdf_files)
  File "/home/.../PoseCNN-PyTorch/tools/../lib/sdf/sdf_optimizer.py", line 73, in __init__
    self.sdf_torch = self.sdf_torch.cuda()
RuntimeError: CUDA out of memory. Tried to allocate 1.51 GiB (GPU 0; 3.82 GiB total capacity; 1.04 GiB already allocated; 99.75 MiB free; 1.04 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

@lewamlyn
Copy link

run ./experiments/scripts/demo.sh 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants