【问题标题】:Tensorflow compiles with cuDNN 5.0 even though 5.1.10 is specified即使指定了 5.1.10,Tensorflow 也可以使用 cuDNN 5.0 进行编译
【发布时间】:2017-06-24 15:09:46
【问题描述】:

我尝试自己编译 Tensorflow 以加快训练速度(使用预编译的轮子可以工作,但速度很慢)。我使用 ./configure 来配置并明确指定应使用 cuDNN 版本 5.1.10。在此之前,我下载了 cuDNN 5.1.10 并将我的文件复制到 Cuda 目录。

这是配置 (.tf_configure.bazelrc) 的样子:

build --action_env PYTHON_BIN_PATH="/home/ubuntu/project/venv/bin/python"
build --action_env PYTHON_LIB_PATH="/home/ubuntu/project/venv/lib/python3.5/site-packages"
build --define PYTHON_BIN_PATH="/home/ubuntu/project/venv/bin/python"
build --define PYTHON_LIB_PATH="/home/ubuntu/project/venv/lib/python3.5/site-packages"
build --force_python=py3
build --host_force_python=py3
build --python3_path="/home/ubuntu/project/venv/bin/python"
test --force_python=py3
test --host_force_python=py3
test --define PYTHON_BIN_PATH="/home/ubuntu/project/venv/bin/python"
test --define PYTHON_LIB_PATH="/home/ubuntu/project/venv/lib/python3.5/site-packages"
run --define PYTHON_BIN_PATH="/home/ubuntu/project/venv/bin/python"
run --define PYTHON_LIB_PATH="/home/ubuntu/project/venv/lib/python3.5/site-packages"
build --define with_jemalloc=true
build:opt --cxxopt=-march=native --copt=-march=native
build --action_env TF_NEED_CUDA="1"
build --action_env TF_NEED_OPENCL="0"
build --action_env TF_CUDA_CLANG="0"
build --action_env CUDA_TOOLKIT_PATH="/usr/local/cuda"
build --action_env TF_CUDA_VERSION="8.0"
build --action_env GCC_HOST_COMPILER_PATH="/usr/bin/gcc"
build --action_env TF_CUDNN_VERSION="5.1.10"
build --action_env CUDNN_INSTALL_PATH="/usr/local/cuda-8.0"
build --action_env TF_CUDNN_VERSION="5.1.10"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="3.7"
build --config=cuda
test --config=cuda

注意 TF_CUDNN_VERSION="5.1.10" 部分。接下来我执行以下命令:

bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

pip3 install --upgrade /tmp/tensorflow_pkg/tensorflow-1.2.0-cp35-cp35m-linux_x86_64.whl

最后,我收到以下错误消息

Loaded runtime CuDNN library: 5110 (compatibility version 5100) but source was compiled with 5005 (compatibility version 5000).  If using a binary install, upgrade your CuDNN library to match.  If building from sources, make sure the library loaded at runtime matches a compatible version specified during compile configuration.

发生了什么事?即使我指定了正确的版本,Tensorflow 还是使用 cuDNN 5.0 编译?!

系统是Ubuntu 16,AWS p2实例。

【问题讨论】:

    标签: ubuntu-16.04 cudnn tensorflow-gpu


    【解决方案1】:

    我可以解决此问题的唯一方法是重新开始(来自 AWS 市场的全新 Ubuntu 版本)。

    我会接受这个答案,因为没有必要回去尝试解决问题,但如果其他人对此感到疑惑,我发现这篇文章很有帮助: https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-06
      • 2014-07-13
      • 2020-12-19
      • 2017-06-06
      • 2016-11-07
      • 1970-01-01
      • 2017-08-27
      • 1970-01-01
      相关资源
      最近更新 更多