tf.test.is_gpu_available() returns False



  • print(tf.test.is_gpu_available())
    print(tf.test.is_built_with_cuda())
    

    Come back.

    False
    

    True

    Tensorflow - 2.7.0
    CUDA - 11.2

    What did I do wrong? Help!



  • Next. https://www.tensorflow.org/install/gpu

    Software requirements

    The following NVIDIA web software must be installed on your system:

    • NVIDIAW GPU drivers - CUDAW 11.2 requires 450.80.02 or higher.
    • CUDAHO Toolkit -TensorFlow supports CUDAW 11.2 (TensorFlow grad= 2.5.0)
    • CUPTI ships with the CUDA web Toolkit.
    • cuDNN SDK 8.1.0 cuDNN versions). (Optional) TensorRT 7 to improve latency and throughput for inference on some models.

    Windows setup

    See the hardware requirements and software requirements listed above. Read the CUDA web install guide for Windows.

    Make sure the installed NVIDIA software packages match the versions listed above. In particular, TensorFlow will not load without the cuDN64_8.dll file. To use a different version, see the Windows build from source guide.

    Add the CUDAHO, CUPTI, and cuDNN installation directories to the %PATH% environmental variable. For example, if the CUDAHO Toolkit is installed to C:\Program Files/NVIDIA GPU Computing Toolkit/CUDA\v11.0 and cuDNNN to C:\tools\cuda, update your %PATH% to match:

    SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin;%PATH%
    SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\extras\CUPTI\lib64;%PATH%
    SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include;%PATH%
    SET PATH=C:\tools\cuda\bin;%PATH%
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2