【问题标题】:I have been trying to build tensorflow with GPU support for about a week now and keep running into installation issues我一直在尝试使用 GPU 支持构建 tensorflow 大约一个星期,并且一直遇到安装问题
【发布时间】:2017-05-16 04:26:12
【问题描述】:

我已经尝试构建支持 GPU 的 tensorflow 大约一周了,并且一直遇到 bazel 的安装问题。当然,我可以在这个过程之外运行我的 GPU。 Windows 10 机器,cuda 8.0,cudnn 5.1

我相信这与我的环境变量没有指向正确的路径和/或在指向 usr/local/bin 文件夹而不是 C:\ 的文件中引用的路径有关Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0

如果有人可以提供正确的路径,那将非常有帮助。另一个想法是我是否需要修改 bazel 配置文件来帮助解决这个问题? Environment paths here:

我的错误:

C:\Users\me\Anaconda3\envs\tensorflow_gpu\tensorflow>bazel build -c opt --copt=mavx tensorflow/examples/image_retraining:retrain . 错误:加载包'tensorflow/examples/image_retraining'时出错:读取扩展文件'cuda/build_defs.bzl'时遇到错误:没有这样的包'@local_config_cuda//cuda':回溯(最近一次调用): 文件“C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl”,第 915 行 _create_cuda_repository(repository_ctx) _create_cuda_repository 中的文件“C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl”,第 803 行 _get_cuda_config(repository_ctx) _get_cuda_config 中的文件“C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl”,第 619 行 _cudnn_install_basedir(repository_ctx) _cudnn_install_basedir 中的文件“C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl”,第 202 行 auto_configure_fail("找不到 cudnn 安装路径....) 文件“C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl”,第 125 行,在 auto_configure_fail 失败(” %s自动配置错误:%s ...))

自动配置错误:找不到 cudnn 安装路径。 . 信息:经过时间:21.262 秒

【问题讨论】:

    标签: tensorflow gpu bazel cudnn


    【解决方案1】:

    我确实解决了这个问题。答案在于windows环境和大概linux环境之间的正斜杠和反斜杠。

    我确保在 cuda_configure.bzl 中包含正斜杠

    _DEFAULT_CUDA_TOOLKIT_PATH = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0" _DEFAULT_CUDNN_INSTALL_PATH = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0"

    还有windows中的环境变量。

    再次感谢您的帮助。

    【讨论】:

      【解决方案2】:

      【讨论】:

      • 我尝试将路径设置为 DEFAULT_CUDNN_INSTALL_PATH = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/binDEFAULT_CUDNN_INSTALL_PATH = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64 以及根 8.0 目录,但这些似乎都没有帮助。
      猜你喜欢
      • 2022-06-11
      • 2018-07-18
      • 1970-01-01
      • 2021-12-30
      • 1970-01-01
      • 2021-10-29
      • 2022-08-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多