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

Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR #2

Open
DanielYeh opened this issue Mar 20, 2020 · 0 comments
Open

Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR #2

DanielYeh opened this issue Mar 20, 2020 · 0 comments

Comments

@DanielYeh
Copy link

DanielYeh commented Mar 20, 2020

If you face this problem

2020-01-16 00:25:55.881381: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR2020-01-16 00:25:55.901231: E tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR2020-01-16 00:25:55.901300: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.

And you already make sure that you have been installed CUDA & Cudnn package correctly, the problems are maybe caused by Tensorflow.
Please refer to this

Solution:

Add this code at the beginning of the training code

for tf 1.xx
import tensorflow as tfconfig = tf.ConfigProto()

config.gpu_options.allow_growth = True

session = tf.InteractiveSession(config=config)

for tf 2.xx
import tensorflow as tf config = tf.compat.v1.ConfigProto()

config.gpu_options.allow_growth = True

session = tf.compat.v1.InteractiveSession(config=config)

@DanielYeh DanielYeh reopened this Mar 20, 2020
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

1 participant