【问题标题】:TensorFlow 1.6.0 doesn't show my GPU in Windows 10TensorFlow 1.6.0 未在 Windows 10 中显示我的 GPU
【发布时间】:2018-03-07 20:05:12
【问题描述】:

我在 Windows 10 的 GPU 上运行 tensorflow 时遇到问题。代码在 CPU 上运行,因为没有检测到任何 GPU。谁能帮帮我?

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

[name: "/device:CPU:0"
 device_type: "CPU"
 memory_limit: 268435456
 locality {
 }
 incarnation: 9240676128181481018]

Tensorflow 版本为 1.6.0,python 3.6.4

我已经从 pip 安装了 tensorflow 和 tensorflow-gpu 和 pip install tensorflow 和 pip install tensorflow-gpu

还有 pip3 pip3 install tensorflow 和 pip3 install tensorflow-gpu

import sys
print (sys.version)
3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)]

import tensorflow as tf
print(tf.__version__)
1.6.0

我的 GPU 是带有驱动程序 391.01 的 1080TI

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 391.01                 Driver Version: 391.01                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108... WDDM  | 00000000:01:00.0  On |                  N/A |
|  0%   21C    P8    15W / 280W |    948MiB / 11264MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1208    C+G   Insufficient Permissions                   N/A      |
|    0      4616    C+G   ...6)\Google\Chrome\Application\chrome.exe N/A      |
|    0      8256    C+G   Insufficient Permissions                   N/A      |
|    0      8616    C+G   ...t_cw5n1h2txyewy\ShellExperienceHost.exe N/A      |
|    0      8780    C+G   C:\Windows\explorer.exe                    N/A      |
|    0      9800    C+G   ...dows.Cortana_cw5n1h2txyewy\SearchUI.exe N/A      |
+-----------------------------------------------------------------------------+

安装了补丁 1、2、3 的 CUDA Toolkit 9.1

cuDNN v7.1.1(2018 年 2 月 28 日),适用于 CUDA 9.1

Microsoft Windows [版本 10.0.16299.248]


更新

我试过了

带有补丁 1,2 的 CUDA 9.0

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:32_Central_Daylight_Time_2017
Cuda compilation tools, release 9.0, V9.0.176

cuDNN v7.1.1(2018 年 2 月 28 日),适用于 CUDA 9.0

但也不起作用。

提前感谢您的帮助

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    更新

    我发现了这个问题。我可能与我之前安装的几个软件包有某种冲突。我使用 pip 和 pip3 从我的环境中卸载了所有 tensorflow 包,并使用 pip install tensorflow-gpu 安装了 ONLY tensorflow-gpu。

    现在运行良好:

    from tensorflow.python.client import device_lib
    device_lib.list_local_devices()
    
    [name: "/device:CPU:0"
     device_type: "CPU"
     memory_limit: 268435456
     locality {
     }
     incarnation: 9774489396791002051, name: "/device:GPU:0"
     device_type: "GPU"
     memory_limit: 9234234737
     locality {
       bus_id: 1
     }
     incarnation: 10911103484745736471
     physical_device_desc: "device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1"]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-09-11
      • 1970-01-01
      • 2018-04-10
      • 1970-01-01
      • 1970-01-01
      • 2021-08-29
      • 1970-01-01
      • 2017-09-29
      相关资源
      最近更新 更多