简体   繁体   English

Tensorflow-gpu 似乎没有看到我的 gpu

[英]Tensorflow-gpu doesn't seem to see my gpu

I am using the TensorFlow-GPU 1.12.0 version, CUDA version 9, CUDNN version 7.0.5, bazel version 0.15 and python version 3.5.2 as mentioned in Which TensorFlow and CUDA version combinations are compatible?我正在使用 TensorFlow-GPU 1.12.0 版本、CUDA 版本 9、CUDNN 版本 7.0.5、bazel 版本 0.15 和 python 版本 3.5.2,如哪个 TensorFlow 和 CUDA 版本组合兼容? for compatibility.为了兼容性。 The machine has Nvidia driver 384.130.该机器具有 Nvidia 驱动程序 384.130。

But the GPU of my machine is not detected by the Tensorflow by running the following command但是通过运行以下命令,Tensorflow 未检测到我机器的 GPU

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

the output is following as:输出如下:

[ [

name: "/device:CPU:0" device_type: "CPU" memory_limit: 268435456名称:“/设备:CPU:0”设备类型:“CPU”内存限制:268435456

locality {}地点{}

incarnation: 13408836213255819255 , name: "/device:XLA_CPU:0" device_type: "XLA_CPU" memory_limit: 17179869184化身:13408836213255819255,名称:“/device:XLA_CPU:0” device_type:“XLA_CPU” memory_limit:17179869184

locality {}地点{}

incarnation: 17981738971591465658 physical_device_desc: "device: XLA_CPU device" ]化身:17981738971591465658 physical_device_desc:“设备:XLA_CPU设备”]

I tried the solutions in the following links我尝试了以下链接中的解决方案

1- Tensorflow doesn't seem to see my gpu 1- Tensorflow 似乎没有看到我的 GPU

2- list_local_device tensorflow does not detect gpu 2- list_local_device tensorflow 不检测 gpu

This solution works in my case.这个解决方案适用于我的情况。

The problem with the CUDNN version in the above configuration.上面配置中CUDNN版本的问题。 I update the CUDNN version to the 7.1.4 for CUDA version 9 and my code start using GPU.我将 CUDNN 版本更新为 CUDA 版本 9 的 7.1.4,我的代码开始使用 GPU。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM