question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python benchmark.py try to allocate cuda memory 9177984325.83 GiB

See original GitHub issue

when I try to run benchmark.py, it raise an error says that RuntimeError: CUDA out of memory. Tried to allocate 9177984325.83 GiB (GPU 0; 5.93 GiB total capacity; 78.25 MiB already allocated; 4.44 GiB free; 0 bytes cached) (malloc at /pytorch/aten/src/THC/THCCachingAllocator.cpp:231)

here is my environments: pytorch 1.0 cuda9.0

Is something wrong? thanks a lot.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hailshamcommented, Jun 6, 2019

hello! sorry for delay. I find the solution to problem of python setup.py build, according to this, I comment #include <torch/extension.h> in Correlation_Module/correlation_cuda_kernel.cu and replace it with #include <torch/types.h>, then it works fine. but it still try to allocate a lot gigabytes when I run python benchmark.py cuda, I will keep looking for the solution. thanks.

0reactions
XiaoXueHoucommented, Apr 19, 2021

@hailsham 朋友你好!很抱歉时隔这么久还在这个Issue中打扰你~我在安装“spatial-correlation-sampler”库时遇到了比较棘手的问题,然后我发现你当时的environments和我的很相似。所以冒昧打扰,希望能够得到你的指点和帮助。我的environments是:Python3.6、Pytorch1.0.1、CUDA9.0、gcc5.4.0,当我使用“pip install spatial-correlation-sampler”进行安装时,会报错如图1。当我使用"python setup.py install"进行安装时,会报错如图2。我也发布了新的Issue以期获得作者的帮助,但是可能是由于问题表达不够清晰,作者提出的方案未能解决我的问题。在寻找解决办法时,无意发现了我们environments比较相似,而且国内朋友可以更清晰地阐明问题。期待能够得到你的帮助~ 图①: image image image 图②: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

help ! RuntimeError: CUDA out of memory. Tried to allocate ...
error message: RuntimeError: CUDA out of memory. Tried to allocate 1.50 GiB (GPU 0; 10.92 GiB total capacity; 8.62 GiB already allocated; 1.39...
Read more >
How to avoid "CUDA out of memory" in PyTorch - Stack Overflow
CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 10.76 GiB total capacity; 4.29 GiB already allocated; 10.12 MiB free; 4.46...
Read more >
stabilityai/stable-diffusion · RuntimeError: CUDA out of memory.
Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 3.46 GiB ... by PyTorch) If reserved memory is >> allocated memory...
Read more >
Fast, Flexible Allocation for NVIDIA CUDA with RAPIDS ...
When I joined the RAPIDS team in 2018, NVIDIA CUDA device memory allocation was a performance problem. RAPIDS cuDF allocates and deallocates ...
Read more >
RuntimeError: CUDA out of memory. Tried to allocate - windows
I am trying to make CUDA work on open AI whisper release. ... Tried to allocate 70.00 MiB (GPU 0; 4.00 GiB total...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found