安装了Tensorflow-gpu,CUDA和cudnn,但是找到但未使用GPU设备

时间:2017-05-30 18:07:24

标签: python tensorflow cudnn

  • Windows 7 x64
  • Python 3.5.2
  • CUDA Toolkit 8.0.61
  • Tensorflow包:tensorflow-gpu-1.2.0rc0
  • cudnn 8.0(适用于CUDA 8.0工具包)

测试:

# Creates a graph.
a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3], name='a')
b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')
c = tf.matmul(a, b)
# Creates a session with log_device_placement set to True.
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
# Runs the op.
print(sess.run(c))

结果:

2017-05-30 13:50:33.021124: I C:\...\gpu_device.cc:906] Found device 0 with properties:
name: NVS 5200M
major: 2 minor: 1 memoryClockRate (GHz) 1.344
pciBusID 0000:01:00.0
Total memory: 1.00GiB
Free memory: 886.41MiB
2017-05-30 13:50:33.022124: I C:\...\gpu_device.cc:927] DMA: 0
2017-05-30 13:50:33.022124: I C:\...\gpu_device.cc:937] 0:   Y
2017-05-30 13:50:33.022124: I C:\...\gpu_device.cc:969] Ignoring visible gpu device (device: 0, name: NVS 5200M, pci bus id: 0000:01:00.0) with Cuda compute capability 2.1. The minimum required Cuda capability is 3.0.
Device mapping: no known devices.
2017-05-30 13:50:33.024124: I C:\...\direct_session.cc:265] Device mappin
g:

MatMul: (MatMul): /job:localhost/replica:0/task:0/cpu:0
2017-05-30 13:50:33.026124: I C:\...\simple_placer.cc:847] MatMul: (MatMul)/job:localhost/replica:0/task:0/cpu:0
b: (Const): /job:localhost/replica:0/task:0/cpu:0
2017-05-30 13:50:33.027124: I C:\...\simple_placer.cc:847] b: (Const)/job:localhost/replica:0/task:0/cpu:0
a: (Const): /job:localhost/replica:0/task:0/cpu:0
2017-05-30 13:50:33.027124: I C:\...\simple_placer.cc:847] a: (Const)/job:localhost/replica:0/task:0/cpu:0
[[ 22.  28.]
 [ 49.  64.]]

我认为我的问题是"忽略具有CUDA计算能力的可见gpu设备2.1。所需的最低Cuda能力为3.0。"因此我的硬件似乎仅限于CUDA 2.1,但不清楚3.0要求是否来自。它是CUDA工具包还是张量流库?

1 个答案:

答案 0 :(得分:0)

您可以在安装页面上找到有关GPU支持的说明。

  

具有CUDA Compute Capability 3.0或更高版本的GPU卡。有关支持的GPU卡列表,请参阅NVIDIA文档。

但是,有一些方法可以使用具有较低计算能力的GPU。请参阅this