Use CUDA_HOME and CUDNN_HOME from the environment if they are not specified on the command line. (#8575)

This commit is contained in:
satyajandhyala 2021-08-02 09:18:44 -07:00 committed by GitHub
parent 49a6ff75e6
commit 87975bdeef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -782,8 +782,8 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home
add_cmake_define_without_override(cmake_extra_defines, "onnxruntime_USE_CUDA", "ON")
add_cmake_define_without_override(cmake_extra_defines, "onnxruntime_CUDA_VERSION", args.cuda_version)
# TODO: this variable is not really needed
add_cmake_define_without_override(cmake_extra_defines, "onnxruntime_CUDA_HOME", args.cuda_home)
add_cmake_define_without_override(cmake_extra_defines, "onnxruntime_CUDNN_HOME", args.cudnn_home)
add_cmake_define_without_override(cmake_extra_defines, "onnxruntime_CUDA_HOME", cuda_home)
add_cmake_define_without_override(cmake_extra_defines, "onnxruntime_CUDNN_HOME", cudnn_home)
if is_windows():
if args.enable_msvc_static_runtime: