gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 17:31:54 25 4
gpt4 key购买 nike

在我的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com