From 91f1866b648b144a0d7c49e26f047c7b95493c1b Mon Sep 17 00:00:00 2001 From: Scott McKay Date: Thu, 29 Nov 2018 12:25:41 +1000 Subject: [PATCH] Only check for 'bin' folder in cudnn path on windows. --- tools/ci_build/build.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 120b8076275da..489955490f696 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -296,12 +296,13 @@ def setup_cuda_vars(args): .format(cuda_home, cuda_home_valid, cudnn_home, cudnn_home_valid)) sys.exit(-1) - if (not os.path.exists(os.path.join(cudnn_home, "bin"))): - log.error("cudnn_home path should include the 'cuda' folder, and must contain the CUDNN 'bin' directory.") - log.error("cudnn_home='{}'".format(cudnn_home)) - sys.exit(-1) - if (is_windows()): + # Validate that the cudnn_home is pointing at the right level + if (not os.path.exists(os.path.join(cudnn_home, "bin"))): + log.error("cudnn_home path should include the 'cuda' folder, and must contain the CUDNN 'bin' directory.") + log.error("cudnn_home='{}'".format(cudnn_home)) + sys.exit(-1) + os.environ["CUDA_PATH"] = cuda_home os.environ["CUDA_TOOLKIT_ROOT_DIR"] = cuda_home