python - TensorFlow 的 ./configure 在哪里以及如何启用 GPU 支持?

标签 python gpu nvidia tensorflow

在我的 Ubuntu 上安装 TensorFlow 时,我想将 GPU 与 CUDA 结合使用。

但我在 Official Tutorial 中的这一步停止了:

enter image description here

这个 ./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/

相关文章:

c++ - glBufferData 因尺寸过大而无声地失败

c++ - OpenCL 内存访问

python - 我可以在存储视频之前使用 ffmpeg 转换从表单上传的 django 视频吗?

python - Flask关系模型如果不存在则多次获取或创建

opengl - NV_path_rendering 替代方案

tensorflow - 多 GPU TFF 模拟错误 "Detected dataset reduce op in multi-GPU TFF simulation"

multithreading - Boost::thread() 和 Nvidia CUDA 是否存在某种不兼容?

python - 如何很好地处理 [ :-0] slicing?

python - 我是否需要针对 Perlin 噪声定制随机数生成器?

python - 如何在 XGBoost 中释放 GPU 上的所有内存?