CenterNet icon indicating copy to clipboard operation
CenterNet copied to clipboard

CuDNN error: CUDNN_STATUS_SUCCESS

Open Midhilesh29 opened this issue 6 years ago • 15 comments

Traceback (most recent call last):
  File "demo.py", line 56, in <module>
    demo(opt)
  File "demo.py", line 49, in demo
    ret = detector.run(image_name)
  File "/workspace/midhilesh/CenterNet/src/lib/detectors/base_detector.py", line 116, in run
    output, dets, forward_time = self.process(images, return_time=True)
  File "/workspace/midhilesh/CenterNet/src/lib/detectors/ctdet.py", line 30, in process
    output = self.model(images)[-1]
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/workspace/midhilesh/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 471, in forward
    x = self.base(x)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/workspace/midhilesh/CenterNet/src/lib/models/networks/pose_dla_dcn.py", line 288, in forward
    x = self.base_layer(x)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/container.py", line 91, in forward
    input = module(input)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 301, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: CuDNN error: CUDNN_STATUS_SUCCESS

I got this error while using the demo file. Can anyone please help me with this problem?

I used Pytorch 0.4.1, CUDA 9.0.176

Midhilesh29 avatar Jan 23 '20 11:01 Midhilesh29

It seems a pytorch installation issue. Can you make sure you can run other pytorch projects under this environment?

xingyizhou avatar Jan 27 '20 20:01 xingyizhou

have you sovled this problem???

wjgarnett avatar Apr 17 '20 08:04 wjgarnett

Has anyone solved this problem?

XavierYoungY avatar May 28 '20 07:05 XavierYoungY

I met this problem, too.

lhyfst avatar Jun 07 '20 02:06 lhyfst

I met this problem, too. have you solve this problem?? It disturb me for 2days!!!

liushuai839 avatar Jun 15 '20 12:06 liushuai839

fobidden cudnn in code

`import torch

torch.backends.cudnn.enabled=False`

xiaowk5516 avatar Sep 09 '20 04:09 xiaowk5516

try a different batch size.

lhyfst avatar Sep 11 '20 02:09 lhyfst

I have the same problem. Different batch size did not solve this problem

sh7jacobi avatar Feb 05 '21 07:02 sh7jacobi

fobidden cudnn in code

`import torch

torch.backends.cudnn.enabled=False`

It helped me. I added this code to test,py at first

sh7jacobi avatar Feb 05 '21 08:02 sh7jacobi

fobidden cudnn in code

`import torch

torch.backends.cudnn.enabled=False`

Should I do that even if the project is supposed to use cudnn ? I don't know if it makes sense...a bit lost ^^

GabrielGuez avatar Mar 02 '21 16:03 GabrielGuez

@GabrielGuez, I think you can learn this model by setting torch.backends.cudnn.enabled=False. But I am not sure it will work correctly if you implement the model in another project, where it needs cudnn.

sh7jacobi avatar Mar 03 '21 15:03 sh7jacobi

@sh7jacobi Thank you for your answer. After further investigation, it seems that torch.backends.cudnn.benchmark = True did the trick :) Apparently it 'optimizes' CuDNN somehow, don't really understand how thought. If someone have an idea how it works, don't hesitate to give a quick explanation. Have a good day.

GabrielGuez avatar Mar 04 '21 22:03 GabrielGuez

@sh7jacobi Thank you for your answer. After further investigation, it seems that torch.backends.cudnn.benchmark = True did the trick :) Apparently it 'optimizes' CuDNN somehow, don't really understand how thought. If someone have an idea how it works, don't hesitate to give a quick explanation. Have a good day.

Thanks that is worked with me :)

mahmoudEltaher avatar Mar 05 '21 09:03 mahmoudEltaher

@sh7jacobi Thank you for your answer. After further investigation, it seems that torch.backends.cudnn.benchmark = True did the trick :) Apparently it 'optimizes' CuDNN somehow, don't really understand how thought. If someone have an idea how it works, don't hesitate to give a quick explanation. Have a good day.

Worked for me too

andrewtratz avatar Mar 06 '21 03:03 andrewtratz

@sh7jacobi Thank you for your answer. After further investigation, it seems that torch.backends.cudnn.benchmark = True did the trick :) Apparently it 'optimizes' CuDNN somehow, don't really understand how thought. If someone have an idea how it works, don't hesitate to give a quick explanation. Have a good day.

its working ,means no errors but its using cpu instead of gpu .Can you suggest how to train it on gpu ?

Nishikanta059 avatar Jul 17 '22 09:07 Nishikanta059