From 1e054739b8eac6084ed033ac46ee8fcdcb1b75bb Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 4 Aug 2020 17:03:40 -0700 Subject: [PATCH] Remove the requirement of CUDA's version.txt (#4706) Sometimes there is a file named "version.txt" in your CUDA installation dir, but sometimes there isn't one. I couldn't figure out it why, but the latest CUDA 11 on our CI build machines doesn't have this file. As the file is not needed for building onnxruntime, so I removed the check. --- tools/ci_build/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 28aa53813f..d952f7b893 100755 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -946,7 +946,8 @@ def setup_cuda_vars(args): .format( cuda_home, cuda_home_valid, cudnn_home, cudnn_home_valid)) - if is_windows(): + # Our CI build machines already have the env vars setup + if is_windows() and 'AGENT_VERSION' not in os.environ: # Validate that the cudnn_home is pointing at # the right level. if not os.path.exists(os.path.join(cudnn_home, "bin")):