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

Tensorflow-gpu, CUDA and cudnn installed, however GPU device is found but not utilized

测试:

# 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.]]

我想我的问题是 "Ignoring visible gpu device with CUDA compute capability 2.1. The minimum required Cuda capability is 3.0." 所以我的硬件似乎限制了 CUDA 2.1,但不清楚 3.0 的要求是从哪里来的。是 CUDA 工具包还是 tensorflow 库?

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

GPU card with CUDA Compute Capability 3.0 or higher. See NVIDIA documentation for a list of supported GPU cards.

不过,还有一些方法可以使用计算能力较低的 GPU。参考this.