Tensorflow 2.0 can't use GPU, something wrong in cuDNN? :Failed to get convolution algorithm. This is probably because cuDNN failed to initialize

前端 未结 2 471
Happy的楠姐
Happy的楠姐 2021-01-01 03:48

I am trying to understand and debug my code. I try to predict with a CNN model developed under tf2.0/tf.keras on GPU, but get those error messages. could someone help me to

相关标签:
2条回答
  • 2021-01-01 04:17

    Check the instructions on this TensorFlow GPU instruction page for your OS. It resolved issue for me on Ubuntu 16.04.6 LTS and Tensorflow 2.0

    0 讨论(0)
  • 2021-01-01 04:34

    You have to check that you have the right version of CUDA + CUDNN + TensorFlow(also ensure that you have all installed.

    A couple of examples of running configurations are presented below(UPDATE FOR LATEST VERSION OF TENSORFLOW)

    1. Cuda 10.1 + CuDNN 7.6.5 (normally > 7.6) + TensorFlow 2.2.0/TensorFlow 2.3.0 (TF >= 2.1 requires CUDA >=10.1)

    2. Cuda 10.1 + CuDNN 7.6.5 (normally > 7.6) + TensorFlow 2.1.0 (TF >= 2.1 requires CUDA >= 10.1)

    3. Cuda 10.0 + CuDNN 7.6.3 + / TensorFlow 1.13/1.14 / TensorFlow 2.0.

    4. Cuda 9.0 + CuDNN 7.0.5 + TensorFlow 1.10 works

    Usually this error appears when you have an incompatible version of TensorFlow/CuDNN installed. In my case, this appeared when I tried using an older TensorFlow with a newer version of CuDNN.

    **If for some reason you get an error message like(and nothing happens afterwards) :

    Relying on the driver to perform ptx compilation

    Solution : Install the latest nvidia driver

    0 讨论(0)
提交回复
热议问题