Skip to content

Commit

Permalink
Only check for 'bin' folder in cudnn path on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
skottmckay committed Nov 29, 2018
1 parent 2f61926 commit 91f1866
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 91f1866

Please sign in to comment.