在我的 Ubuntu 上安装 TensorFlow 时,我想将 GPU 与 CUDA 结合使用。
但我在 Official Tutorial 中的这一步停止了:
这个 ./configure
到底在哪里?或者我的源代码树的根在哪里。
我的 TensorFlow 位于此处 /usr/local/lib/python2.7/dist-packages/tensorflow
。但是我还是没有找到./configure
。
编辑
我根据Salvador Dali's answer找到了./configure
.但是在执行示例代码时,出现以下错误:
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 8
E tensorflow/stream_executor/cuda/cuda_driver.cc:466] failed call to cuInit: CUDA_ERROR_NO_DEVICE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:86] kernel driver does not appear to be running on this host (cliu-ubuntu): /proc/driver/nvidia/version does not exist
I tensorflow/core/common_runtime/gpu/gpu_init.cc:112] DMA:
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 8
找不到cuda 设备。
回答
查看有关如何启用 GPU 支持的答案 here .
最佳答案
这是一个 bash 脚本,应该在
the root of your source tree
当你cloned the repo .这是https://github.com/tensorflow/tensorflow/blob/master/configure
关于python - TensorFlow 的 ./configure 在哪里以及如何启用 GPU 支持?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33659047/