openpose icon indicating copy to clipboard operation
openpose copied to clipboard

CUDNN installed, but 'Check failed: error == cudaSuccess (2 vs. 0)'

Open adrpadua opened this issue 6 years ago • 9 comments

Issue Summary

CUDA and CUDNN are installed, however my GPU memory is 10GB/11GB when running face and hand commands. I verified my CUDA and CUDNN installations so I don't know why CUDNN is not being picked up.

Executed Command (if any)

Note: add --logging_level 0 --disable_multi_thread to get higher debug information. ./build/examples/openpose/openpose.bin --video examples/media/video.avi --face --hand

OpenPose Output (if any)

https://pastebin.com/kZhhy1Lg

Errors (if any)

F0130 22:22:20.498729 117194 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory

Type of Issue

  • Execution error

Your System Configuration

Whole console output: https://pastebin.com/kZhhy1Lg

OpenPose version: d78ae77fa660fdf75300a5ff1aebab0783052c7b

General configuration: - Installation mode: CMake gui - Operating system Ubuntu - Operating system version 18.04 - Release or Debug mode? Release - Compiler gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

3rd-party software: - Caffe version: b5ede488952e40861e84e51a9f9fd8fe2395cc8a - CMake version (cmake --version in Ubuntu): cmake version 3.10.2 - OpenCV version: (3.2.0+dfsg-4ubuntu0.1)

If GPU mode issue: - CUDA version: CUDA Version 10.2.89 - cuDNN version: 7.6.5 - GPU model NVIDIA RTX 2080Ti

adrpadua avatar Jan 31 '20 06:01 adrpadua

downgraded from CUDA 10.2/cuDNN 7.6.5 to CUDA 10.1/cuDNN7.5.0 and the video/image tests with face and hands are working.

It's still using about 7GB/11GB of available GPU memory

adrpadua avatar Feb 01 '20 21:02 adrpadua

Also, read this.

https://medium.com/@erica.z.zheng/installing-openpose-on-ubuntu-18-04-cuda-10-ebb371cf3442

adrpadua avatar Feb 02 '20 22:02 adrpadua

I'm experiencing the same issue. GTX1060, cuda 10.2, last version of openpose, cudnn installed. I get:

./build/examples/openpose/openpose.bin -camera_resolution 160x-1
Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
Desired webcam resolution 1280x720 could not being set. Final resolution: 1344x376 in /home/ianni/SW/openpose/src/openpose/producer/webcamReader.cpp:WebcamReader():37
Auto-detecting camera index... Detected and opened camera 0.
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
F0213 12:27:33.996084 28451 syncedmem.cpp:78] Check failed: error == cudaSuccess (2 vs. 0)  out of memory
*** Check failure stack trace: ***
    @     0x7eff7f1d70cd  google::LogMessage::Fail()
    @     0x7eff7f1d8f33  google::LogMessage::SendToLog()
    @     0x7eff7f1d6c28  google::LogMessage::Flush()
    @     0x7eff7f1d9999  google::LogMessageFatal::~LogMessageFatal()
    @     0x7eff7ece860a  caffe::SyncedMemory::gpu_data()
    @     0x7eff7eb40902  caffe::Blob<>::gpu_data()
    @     0x7eff7ed383c0  caffe::CuDNNConvolutionLayer<>::Forward_gpu()
    @     0x7eff7ecaf2e2  caffe::Net<>::ForwardFromTo()
    @     0x7eff807f5b49  op::NetCaffe::forwardPass()
    @     0x7eff8081e562  op::PoseExtractorCaffe::forwardPass()
    @     0x7eff808174d5  op::PoseExtractor::forwardPass()
    @     0x7eff8081434e  op::WPoseExtractor<>::work()
    @     0x7eff808565b9  op::Worker<>::checkAndWork()
    @     0x7eff80856743  op::SubThread<>::workTWorkers()
    @     0x7eff808603a8  op::SubThreadQueueInOut<>::work()
    @     0x7eff80858a21  op::Thread<>::threadFunction()
    @     0x7eff800ed66f  (unknown)
    @     0x7eff7f80f6db  start_thread
    @     0x7eff7fb4888f  clone
Aborted

I need to know if reverting to cuda 10.1 is the only way to go. Thank you very much for any hints

ianni67 avatar Feb 13 '20 11:02 ianni67

See doc/faq for the out of memory issues. Thanks! (Feel free to keep posting here questions outside that FAQ).

gineshidalgo99 avatar Mar 01 '20 18:03 gineshidalgo99

See doc/faq for the out of memory issues. Thanks! (Feel free to keep posting here questions outside that FAQ).

You did not read the issue :dancer:

Problem solved with version 10.1 of CUDA toolkit, it still remained with 10.2

IternaAdolfo avatar Mar 28 '20 04:03 IternaAdolfo

downgraded from CUDA 10.2/cuDNN 7.6.5 to CUDA 10.1/cuDNN7.5.0 and the video/image tests with face and hands are working.

It's still using about 7GB/11GB of available GPU memory

Does it work fine after install CUDA 10.2/cuDNN7.6.5 to CUDA 10.1/cuDnn7.5.0?I met the same problem when : ./build/examples/openpose/openpose.bin --video /home/pinocchio/video/1.mp4 --hand and python 02_whole_body_from_image.py

Pinocchioo avatar Dec 10 '20 13:12 Pinocchioo

The same problem in windows Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0. F0202 09:28:57.534350 10964 syncedmem.cpp:71] Check failed: error == cudaSuccess (2 vs. 0) out of memory

spacewalk01 avatar Feb 02 '21 00:02 spacewalk01

Just made an interesting observation, possibly related to this issue: For me it works with a GTX1060/6GB, but only with particular resolutions. Native FullHD with 1920x1080 works fine. However, using images with a lower resolution of 1032x776, I also get the OOM error. Resizing the images solves the problem for me but should not be the solution.

Maybe this can solve the issue for you. At least, one could double check if this behavious persists on different machines/setups.

adlanto avatar Feb 05 '21 09:02 adlanto

v1.7.0 was modified to allow cuDNN 8, which was a pain. I am not an expert, so I am sure there must be a better way to run the cuDNN convolutions using less memory, but I am not an expert on it. I am very open to suggestions about the cudnn_conv implementation to minimize memory: https://github.com/CMU-Perceptual-Computing-Lab/caffe/blob/master/src/caffe/layers/cudnn_conv_layer.cpp

Please, continue this discursion in #1864, to centralize messages and hopefully focus efforts to fix the issue. Thanks!

gineshidalgo99 avatar Feb 07 '21 16:02 gineshidalgo99