未验证 提交 bda4965a 编写于 作者: S Sing_chan 提交者: GitHub

fix bug of set cuda lib in demo_ci and infer_ut (#41677)

上级 b075dee8
...@@ -85,7 +85,7 @@ if(WITH_GPU) ...@@ -85,7 +85,7 @@ if(WITH_GPU)
set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library") set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library")
else() else()
set(CUDA_LIB "" CACHE STRING "CUDA_LIB") set(CUDA_LIB "" CACHE STRING "CUDA_LIB")
if("${TENSORRT_ROOT}" STREQUAL "") if("${CUDA_LIB}" STREQUAL "")
if(DEFINED ENV{CUDA_PATH}) if(DEFINED ENV{CUDA_PATH})
set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64") set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64")
else() else()
......
...@@ -84,7 +84,7 @@ if(WITH_GPU) ...@@ -84,7 +84,7 @@ if(WITH_GPU)
set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library") set(CUDA_LIB "/usr/local/cuda/lib64/" CACHE STRING "CUDA Library")
else() else()
set(CUDA_LIB "" CACHE STRING "CUDA_LIB") set(CUDA_LIB "" CACHE STRING "CUDA_LIB")
if("${TENSORRT_ROOT}" STREQUAL "") if("${CUDA_LIB}" STREQUAL "")
if(DEFINED ENV{CUDA_PATH}) if(DEFINED ENV{CUDA_PATH})
set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64") set(CUDA_LIB "$ENV{CUDA_PATH}\\lib\\x64")
else() else()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册