Tensorflow not running on GPU

前端 未结 3 724
無奈伤痛
無奈伤痛 2020-12-24 01:39

I have aldready spent a considerable of time digging around on stack overflow and else looking for the answer, but couldn\'t find anything

相关标签:
3条回答
  • 2020-12-24 02:10

    It may sound dumb, but try reboot. It helped me and some other folks in GitHub.

    0 讨论(0)
  • 2020-12-24 02:13

    I was still having trouble getting GPU support even after correctly installing tensorflow-gpu via pip. My problem was that I had installed tensorflow 1.5, and CUDA 9.1 (the default version Nvidia directs you to), whereas the precompiled tensorflow 1.5 works with CUDA versions <= 9.0. Here is download page on nvidia's site to get the correct CUDA 9.0:

    https://developer.nvidia.com/cuda-90-download-archive

    Also make sure to update your cuDNN to a version compatible with CUDA 9.0 https://developer.nvidia.com/cudnn https://developer.nvidia.com/rdp/cudnn-download

    0 讨论(0)
  • 2020-12-24 02:29

    To check which devices are available to TensorFlow you can use this and see if the GPU cards are available:

    from tensorflow.python.client import device_lib
    print(device_lib.list_local_devices())
    

    Edit Also, you should see this kind of logs if you use TensorFlow Cuda version :

    I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so.*.* locally
    I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so.*.*  locally
    I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so.*.*  locally
    
    0 讨论(0)
提交回复
热议问题