Tag Archives: could not create cudnn handle:

Tensorflow training could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR error

Tensorflow1.10 Gpu: 2080 cuda: 9
Question:
Even if the batchsize is set to 1, there will be a problem when performing the training
could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
Solutions:
Searched a lot of methods, the following list of solutions
A,

config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 1.0
session = tf.Session(config=config, ...)

It doesn’t work for me…

config = tf.ConfigProto() 
config.gpu_options.allow_growth = True 
sess = tf.Session(config=config)

It doesn’t work for me…
Three,
Execute SUdo RM-f ~/.nv to solve the problem
It doesn’t work for me…
Four,
Set existing automatic growth in this way; That’s how I solved it,
Note that this is different from the second one, the green one, depending on the tensorFlow version, the import is different, and I’ve listed two;

from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
From tensorflow import ConfigProto
from tensorflow import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)