cudnn错误:: CUDNN_STATUS_SUCCESS(1 vs.0)CUDNN_STATUS_NOT_INITIALIZED

时间:2020-02-13 14:09:46

标签: nvidia cudnn openpose

我正在尝试安装开源软件“ openpose”,为此我需要安装cuda,cudnn和nvidia驱动程序。 nvidia-smi的输出是:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.59       Driver Version: 440.59       CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 940MX       Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   47C    P8    N/A /  N/A |    107MiB /  2004MiB |      7%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1513      G   /usr/lib/xorg/Xorg                            63MiB |
|    0      1698      G   /usr/bin/gnome-shell                          41MiB |
+-----------------------------------------------------------------------------+

cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2的输出给出:

#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 5

在成功安装了上述所有软件和库之后,我终于运行了openpose 与:

./build/examples/openpose/openpose.bin --video examples/media/video.avi

但是输出是:

Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
F0214 01:02:35.327615  3433 cudnn_conv_layer.cpp:53] Check failed: status == CUDNN_STATUS_SUCCESS (1 vs. 0)  CUDNN_STATUS_NOT_INITIALIZED
*** Check failure stack trace: ***
    @     0x7fabb8f390cd  google::LogMessage::Fail()
    @     0x7fabb8f3af33  google::LogMessage::SendToLog()
    @     0x7fabb8f38c28  google::LogMessage::Flush()
    @     0x7fabb8f3b999  google::LogMessageFatal::~LogMessageFatal()
    @     0x7fabb89459d3  caffe::CuDNNConvolutionLayer<>::LayerSetUp()
    @     0x7fabb8a42308  caffe::Net<>::Init()
    @     0x7fabb8a441e0  caffe::Net<>::Net()
    @     0x7fabbaa2ccaa  op::NetCaffe::initializationOnThread()
    @     0x7fabbaa500a1  op::addCaffeNetOnThread()
    @     0x7fabbaa51518  op::PoseExtractorCaffe::netInitializationOnThread()
    @     0x7fabbaa57163  op::PoseExtractorNet::initializationOnThread()
    @     0x7fabbaa4be61  op::PoseExtractor::initializationOnThread()
    @     0x7fabbaa46a51  op::WPoseExtractor<>::initializationOnThread()
    @     0x7fabbaa8aff1  op::Worker<>::initializationOnThreadNoException()
    @     0x7fabbaa8b120  op::SubThread<>::initializationOnThread()
    @     0x7fabbaa8d2d8  op::Thread<>::initializationOnThread()
    @     0x7fabbaa8d4a7  op::Thread<>::threadFunction()
    @     0x7fabba32566f  (unknown)
    @     0x7fabb9a476db  start_thread
    @     0x7fabb9d8088f  clone
Aborted

我已经进行了很多在线讨论,但不知道如何解决这个问题。

1 个答案:

答案 0 :(得分:3)

我在使用CUDNN时遇到了同样的问题。

尽管不理想,但我一直在没有CUDNN的情况下运行。在cmake-gui中,取消选中USE_CUDNN,然后进行编译。在运行openpose时,我还必须减少-net_resolution。

例如:./build/examples/openpose/openpose.bin -net_resolution 256x192 分辨率越高,FPS越慢。