From bda4965a0f651d0c23396815c83b9f9cc9212d4f Mon Sep 17 00:00:00 2001 From: Sing_chan <51314274+betterpig@users.noreply.github.com> Date: Thu, 14 Apr 2022 14:45:37 +0800 Subject: [PATCH] fix bug of set cuda lib in demo_ci and infer_ut (#41677) --- 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 c02fcd0781..547e265d2f 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 5c17e2d62d..ad7ef0c04c 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