【问题标题】:Why won't Tensorflow 2.1 recognise my GPU?为什么 TensorFlow 2.1 不能识别我的 GPU?
【发布时间】:2020-05-06 12:50:03
【问题描述】:

我正在尝试在 Windows 机器上设置 Tensorflow 2,我已经检查过该机器具有支持 Cuda 的 GPU(Nvidia Quadro RTX 3000)。我已经安装了必要的 CUDA 库和 SDK 并添加到我的路径(见下文):

我已经通过 pip 安装了 tensorflow 和 tensorflow-gpu。我已使用以下内容检查了我的设置:

gpus = tf.config.list_physical_devices('GPU')
result = tf.config.list_physical_devices()
print(tf.__version__)
print(result)
print('Built with cuda: ', tf.test.is_built_with_cuda())
print('Built with gpu support: ', tf.test.is_built_with_gpu_support())
print('is gpu available: ', tf.test.is_gpu_available())
print('gpus: ', gpus)

我得到的输出是:

2.1.0
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU')]
Built with cuda:  True
Built with gpu support:  True
WARNING:tensorflow:From <ipython-input-1-601dc453d590>:14: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
is gpu available:  False
gpus:  []

关于这个问题的其他问题涉及设置 tensorflow 的问题,这似乎不是这里的情况。为什么 tensorflow 仍然看不到我的 GPU?我有什么遗漏的吗?

【问题讨论】:

  • 据我所知,Tensorflow 目前不支持 CUDA10.2。试试 CUDA10.1
  • 我安装了CUDA10.1,它成功了,非常感谢!如果您想将其发布为答案,我会接受。

标签: python tensorflow2.x


【解决方案1】:

TensorFlow 2.1 目前不支持CUDA 10.2

您必须按照docs 中的说明使用CUDA 10.1

【讨论】:

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