cudnnハンドルを作成できませんでした:CUDNN_STATUS_NOT_INITIALIZED



Could Not Create Cudnn Handle



今日、kerasバージョンのcnn rnn分類器を実行していたときに、次のエラーが報告されました。

totalMemory: 10.91GiB freeMemory: 10.20GiB 2018-05-08 21:27:29.962822: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0 2018-05-08 21:27:30.176092: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix: 2018-05-08 21:27:30.176127: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0 2018-05-08 21:27:30.176135: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N 2018-05-08 21:27:30.176364: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 9868 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:03:00.0, compute capability: 6.1) 2018-05-08 21:27:32.141585: E tensorflow/stream_executor/cuda/cuda_dnn.cc:455] could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED 2018-05-08 21:27:32.141664: E tensorflow/stream_executor/cuda/cuda_dnn.cc:463] possibly insufficient driver version: 384.130.0 2018-05-08 21:27:32.141682: F tensorflow/core/kernels/conv_ops.cc:713] Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo(), &algorithms) Aborted (core dumped)

戸惑いました。たくさんの情報をチェックしましたが、うまくいきませんでした。私の環境はcuda9.0、ubuntu 16.04ですが、cudnnのエラーはcudnnに関連しているようです。私のcudaは9.0なので、cuda7.0をダウンロードしました。



tar zxvf cudnn-9.0-linux-x64-v7.tgz sudo cp cuda/include/cudnn.h /usr/local/cuda/include sudo cp cuda/lib64/* /usr/local/cuda/lib64

その後、プログラムが正常に実行できることがわかりました。これは、cudaの更新後にcudnnを7.0に更新し忘れたことが原因である可能性があると分析しました。ここに記録しましたので、お役に立てれば幸いです。




[1] .cuDNN.https://blog.csdn.net/guoyunfei20/article/details/78191599