monodepth2 icon indicating copy to clipboard operation
monodepth2 copied to clipboard

RuntimeError: CuDNN error: CUDNN_STATUS_SUCCESS

Open kuacboss opened this issue 10 months ago • 3 comments

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....

kuacboss avatar Apr 04 '24 09:04 kuacboss

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?

19991105 avatar Apr 09 '24 02:04 19991105

@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.

zengy5 avatar May 22 '24 07:05 zengy5

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

li12138cmd avatar Sep 22 '24 02:09 li12138cmd