最低要求的 Cuda 功能是 3.5

The minimum required Cuda capability is 3.5

在 g2.2xlarge EC2 实例上安装 TensorFlow 及其依赖项后,我尝试 运行 来自入门页面的 MNIST 示例:

python tensorflow/models/image/mnist/convolutional.py

但我收到以下警告:

I tensorflow/core/common_runtime/gpu/gpu_device.cc:611] Ignoring gpu device 
(device: 0, name: GRID K520, pci bus id: 0000:00:03.0) with Cuda compute 
capability 3.0. The minimum required Cuda capability is 3.5.

这是硬性要求吗?我有没有机会评论在 TensorFlow 的分支中签出?如果能够在 AWS 中训练模型,那就太好了。

目前官方只支持计算能力 >= 3.5 的 GPU。然而,GitHub 用户@infojunkie 提供了 a patch 这使得可以将 TensorFlow 与具有计算能力 3.0 的 GPU 一起使用。

官方修复正在开发中。同时,查看 GitHub issue 上关于添加此支持的讨论。

official installation page 中有一节会指导您启用 Cuda 3,但您需要从源代码构建 Tensorflow。

$ TF_UNOFFICIAL_SETTING=1 ./configure

# Same as the official settings above

WARNING: You are configuring unofficial settings in TensorFlow. Because some
external libraries are not backward compatible, these settings are largely
untested and unsupported.

Please specify a list of comma-separated Cuda compute capabilities you want to
build with. You can find the compute capability of your device at:
https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases
your build time and binary size. [Default is: "3.5,5.2"]: 3.0

Setting up Cuda include
Setting up Cuda lib64
Setting up Cuda bin
Setting up Cuda nvvm
Configuration finished

有一个简单的技巧。您甚至不必从源代码构建 TF。

在文件 tensorflow\python\_pywrap_tensorflow.pyd 中出现了两次正则表达式 3\.5.*5\.2。只需将 3.5 替换为 3.0.

在 Windows10、Anaconda 4.2.13、Python3.5.2、TensorFlow 0.12、CUDA 8、NVidia GTX 660m(CUDA 上限 3.0)上测试。