Saturday, June 22, 2019

TensorFlow CUDNN_STATUS_INTERNAL_ERROR

When I was executing code with TensorFlow's nn.conv2d() function. I got a problem and two errors,

E tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR

tensorflow.python.framework.errors_impl.UnknownError: 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. [[{{node Conv2D}}]]

I searched for the errors and found some other people had the same problem.
Basically, when you run TensorFlow session, you have to set "config.gpu_options.allow_growth = True" for GPU memory management.

https://www.tensorflow.org/guide/using_gpu#allowing_gpu_memory_growth

You have to put these lines in your code,
#
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession

config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)
#

By the way, my graphic card is EVGA GeForce RTX 2070 Black.

No comments:

Post a Comment

Installing TensorFlow GPU with Anaconda

Now I got Ubuntu 19 installed on Ryzen 2700 + RTX 2070 (27 Combo I call). Next step was to install TensorFlow GPU. Ndvia driver should be in...