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

RuntimeError: CuDNN error: CUDNN_STATUS_SUCCESS #493

Open
kuacboss opened this issue Apr 4, 2024 · 3 comments
Open

RuntimeError: CuDNN error: CUDNN_STATUS_SUCCESS #493

kuacboss opened this issue Apr 4, 2024 · 3 comments

Comments

@kuacboss
Copy link

kuacboss commented Apr 4, 2024

I installed it with this code
conda create -n monodepth2 python=3.6.6
conda install pytorch=0.4.1 torchvision=0.2.1 -c pytorch
pip install tensorboardX==1.4
conda install opencv=3.3.1 # just needed for evaluation

python test_simple.py --image_path assets/test_image.jpg --model_name mono+stereo_640x192 --pred_metric_depth
-> Loading model from models/mono+stereo_640x192
Loading pretrained encoder
Loading pretrained decoder
-> Predicting on 1 test images
Traceback (most recent call last):
File "test_simple.py", line 171, in
test_simple(args)
File "test_simple.py", line 132, in test_simple
features = encoder(input_image)
File "/home/sm99/anaconda3/envs/monodepth2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self. forward(*input, **kwargs)
File "/home/sm99/monodepth2/networks/resnet_encoder.py", line 90, in forward
x = self.encoder.conv1(x)
File "/home/sm99/anaconda3/envs/monodepth2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self. forward(*input, **kwargs)
File "/home/sm99/anaconda3/envs/monodepth2/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

This error occurs:
But when I run it with -no_cuda it runs fine.

please help me....

@19991105
Copy link

19991105 commented Apr 9, 2024

I installed it with this code conda create -n monodepth2 python=3.6.6 conda install pytorch=0.4.1 torchvision=0.2.1 -c pytorch pip install tensorboardX==1.4 conda install opencv=3.3.1 # just needed for evaluation

python test_simple.py --image_path assets/test_image.jpg --model_name mono+stereo_640x192 --pred_metric_depth -> Loading model from models/mono+stereo_640x192 Loading pretrained encoder Loading pretrained decoder -> Predicting on 1 test images Traceback (most recent call last): File "test_simple.py", line 171, in test_simple(args) File "test_simple.py", line 132, in test_simple features = encoder(input_image) File "/home/sm99/anaconda3/envs/monodepth2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self. forward(*input, **kwargs) File "/home/sm99/monodepth2/networks/resnet_encoder.py", line 90, in forward x = self.encoder.conv1(x) File "/home/sm99/anaconda3/envs/monodepth2/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call result = self. forward(*input, **kwargs) File "/home/sm99/anaconda3/envs/monodepth2/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

This error occurs: But when I run it with -no_cuda it runs fine.

please help me....

Hi,I have the same problem.Have you solve it?

@zengy5
Copy link

zengy5 commented May 22, 2024

@19991105 hi,I may found the solution
My cuda version is cuda 9.0, which can be seen with command "nvcc -V"
If your cuda version isn't cuda9.0, maybe it can not help, but I suggest you to try
add the following code into "test_simple.py ", right behind import ended.
torch.backends.cudnn.benchmark = True

Hope this can help you.

@li12138cmd
Copy link

I have encountered this problem, I solved it, I am running this project in a container, my host CUDA is 12.2, I have tried to install 12.2, 11.4, 11.6 version of CUDA in the container, and at the same time configure the corresponding CUDNN, this problem will occur. In the end, my successful method, first of all, I must install CUDA and the corresponding version of CUDNN, install the corresponding CUDA version of torch and torchvision, I use the CUDA version of 12.2, and install the corresponding torch package of 12.1 on the official website of torch, and the error will not appear after configuration

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

4 participants