【问题标题】:Tensorflow GPU is not identifying my GPUsTensorflow GPU 无法识别我的 GPU
【发布时间】:2019-03-11 09:28:49
【问题描述】:

我一直在尝试使用 Tensorflow GPU,但显然,Tersorflow 没有识别我的 GPU。

当我跑步时:

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

作为输出,只有我的 CPU 出现。我检查了所有内容的所有版本,它们似乎是兼容的。我有 CUDA 10.1 和 CUDA Toolkit、cuDNN 7.5 和 Tensorflow 1.13.1。我在 Ubuntu 18.xx 上运行一切

我做错了什么?

【问题讨论】:

  • 你真的有兼容 CUDA 的 GPU 吗?
  • 是的。我有一个 NVIDIA GM200 (GeForce GTX Titan X)。计算能力也高于Tensorflow所要求的
  • nvidia-smi 的输出是什么?
  • 这是输出:| NVIDIA-SMI 418.43 驱动程序版本:418.43 CUDA 版本:10.1 | |-------------------------------+----------------- -----+-----------+ | GPU名称持久化-M|总线 ID Disp.A |挥发性的 Uncorr。纠错 | | Fan Temp Perf Pwr:Usage/Cap|内存使用 | GPU-Util Compute M. | |=================================+================= =====+========================| | 0 GeForce GTX TIT...关闭 | 00000000:01:00.0 关闭 |不适用 | | 17% 56C P0 62W / 250W | 0MiB / 12210MiB | 0% 默认 |

标签: tensorflow nvidia cudnn


【解决方案1】:

输出是什么:

from tensorflow.python.client import device_lib

device_lib.list_local_devices()

在我的系统上,tensorflow 无法识别 GPU,因为它是一个 XLA_GPU。我不太确定为什么 XLA_GPU 也不是 GPU,似乎 tensorflow-gpu 代码中的某处缺少 OR 语句。

如果上面的代码没有列出任何 GPU(而你有一个):

pip uninstall tensorflow
pip uninstall tensorflow-gpu
pip install tensorflow-gpu 

……为我工作。

【讨论】:

    猜你喜欢
    • 2020-01-14
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 1970-01-01
    • 2021-12-20
    • 1970-01-01
    相关资源
    最近更新 更多