0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZED

Last updated at Posted at 2021-12-10

modelをfitするときにタイトルのようなエラーが出たが,私の場合はGPUの総メモリを制限することで解決した.
参考: https://github.com/tensorflow/tensorflow/issues/45779

環境

Ubuntu20.04LTS
cuda 11.1
cuDNN 8.0.5
tensorflow 2.4
GPU: RTX3070

#解決策
https://www.tensorflow.org/guide/gpu#limiting_gpu_memory_growth にあるコード

gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
  try:
    # Currently, memory growth needs to be the same across GPUs
    for gpu in gpus:
      tf.config.experimental.set_memory_growth(gpu, True)
    logical_gpus = tf.config.experimental.list_logical_devices('GPU')
    print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
  except RuntimeError as e:
    # Memory growth must be set before GPUs have been initialized
    print(e)

を事前に実行することで解決した.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?