From f04646bc8f45c6f3778eea3b92da29573605000d Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Fri, 15 Apr 2022 18:16:01 +0800 Subject: [PATCH] fix bug of set cuda lib in demo_ci and infer_ut (#41811) --- paddle/fluid/inference/api/demo_ci/CMakeLists.txt | 2 +- paddle/fluid/inference/tests/infer_ut/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/inference/api/demo_ci/CMakeLists.txt b/paddle/fluid/inference/api/demo_ci/CMakeLists.txt index c02fcd07813..547e265d2fd 100644 --- a/paddle/fluid/inference/api/demo_ci/CMakeLists.txt +++ b/paddle/fluid/inference/api/demo_ci/CMakeLists.txt @@ -85,7 +85,7 @@ if(WITH_GPU) set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library") else() set(CUDA_LIB "" CACHE STRING "CUDA_LIB") - if("${TENSORRT_ROOT}" STREQUAL "") + if("${CUDA_LIB}" STREQUAL "") if(DEFINED ENV{CUDA_PATH}) set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64") else() diff --git a/paddle/fluid/inference/tests/infer_ut/CMakeLists.txt b/paddle/fluid/inference/tests/infer_ut/CMakeLists.txt index 5c17e2d62d3..ad7ef0c04ce 100644 --- a/paddle/fluid/inference/tests/infer_ut/CMakeLists.txt +++ b/paddle/fluid/inference/tests/infer_ut/CMakeLists.txt @@ -84,7 +84,7 @@ if(WITH_GPU) set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library") else() set(CUDA_LIB "" CACHE STRING "CUDA_LIB") - if("${TENSORRT_ROOT}" STREQUAL "") + if("${CUDA_LIB}" STREQUAL "") if(DEFINED ENV{CUDA_PATH}) set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64") else() -- GitLab