-2

I have been trying to build tensorflow with GPU support for about a week now and keep running into installation issues with bazel. Granted, I am able to run my GPU outside of this process. Windows 10 machine , cuda 8.0, cudnn 5.1

I believe it has something to do with my environment variables not pointing to the right path and/or a path that is referenced in a file somewhere that is pointing to the usr/local/bin folder as opposed to the C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0

If someone can provide the correct paths that would be extremely helpful. Another thought was whether I needed to modify bazel configure files to help with this issue? Environment paths here:

My error:

C:\Users\me\Anaconda3\envs\tensorflow_gpu\tensorflow>bazel build -c opt --copt=mavx tensorflow/examples/image_retraining:retrain . ERROR: error loading package 'tensorflow/examples/image_retraining': Encountered error while reading extension file 'cuda/build_defs.bzl': no such package '@local_config_cuda//cuda': Traceback (most recent call last): File "C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl", line 915 _create_cuda_repository(repository_ctx) File "C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl", line 803, in _create_cuda_repository _get_cuda_config(repository_ctx) File "C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl", line 619, in _get_cuda_config _cudnn_install_basedir(repository_ctx) File "C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl", line 202, in _cudnn_install_basedir auto_configure_fail("Cannot find cudnn install path....) File "C:/users/me/anaconda3/envs/tensorflow_gpu/tensorflow/third_party/gpus/cuda_configure.bzl", line 125, in auto_configure_fail fail(" %sAuto-Configuration Error:%s ...))

Auto-Configuration Error: Cannot find cudnn install path. . INFO: Elapsed time: 21.262s

terp26
  • 29
  • 4

2 Answers2

1

I did solve this problem. The answer lies in the forward slashes and backslashes between the windows environment and presumably the linux environment.

I made sure to include the forward slashes in the 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"

as well as the environment variables in windows.

Thanks again for the help.

terp26
  • 29
  • 4
0

Try setting the CUDNN_INSTALL_PATH environment variable: https://github.com/tensorflow/tensorflow/blob/da0d883cba8c3b8103e17432bf8398a56a719c40/third_party/gpus/cuda_configure.bzl#L16

László
  • 3,973
  • 1
  • 13
  • 26
  • I tried setting the path to `DEFAULT_CUDNN_INSTALL_PATH = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/bin` and `DEFAULT_CUDNN_INSTALL_PATH = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64` as well as just the root 8.0 directory and none of those seemed to help. – terp26 May 16 '17 at 23:05