diff --git a/cmake/paddlepaddle.cmake b/cmake/paddlepaddle.cmake index ccccdddeb838f3c6429c1dc2cd4a01371963183d..8a88db9797c90689858468a42673da266c59ae2c 100644 --- a/cmake/paddlepaddle.cmake +++ b/cmake/paddlepaddle.cmake @@ -32,19 +32,23 @@ message( "WITH_GPU = ${WITH_GPU}") # latest: latest develop build # version number like 1.5.2 SET(PADDLE_VERSION "2.0.0") -if(CUDA_VERSION EQUAL 11.0) - set(CUDA_SUFFIX "cuda11-cudnn8-avx-mkl") - set(WITH_TRT ON) -elseif(CUDA_VERSION EQUAL 10.2) - set(CUDA_SUFFIX "cuda10.2-cudnn8-avx-mkl") - set(WITH_TRT ON) -elseif(CUDA_VERSION EQUAL 10.1) - set(CUDA_SUFFIX "cuda10.1-cudnn7-avx-mkl") - set(WITH_TRT ON) -elseif(CUDA_VERSION EQUAL 10.0) - set(CUDA_SUFFIX "cuda10-cudnn7-avx-mkl") -elseif(CUDA_VERSION EQUAL 9.0) - set(CUDA_SUFFIX "cuda9-cudnn7-avx-mkl") +if (WITH_GPU) + if(CUDA_VERSION EQUAL 11.0) + set(CUDA_SUFFIX "cuda11-cudnn8-avx-mkl") + set(WITH_TRT ON) + elseif(CUDA_VERSION EQUAL 10.2) + set(CUDA_SUFFIX "cuda10.2-cudnn8-avx-mkl") + set(WITH_TRT ON) + elseif(CUDA_VERSION EQUAL 10.1) + set(CUDA_SUFFIX "cuda10.1-cudnn7-avx-mkl") + set(WITH_TRT ON) + elseif(CUDA_VERSION EQUAL 10.0) + set(CUDA_SUFFIX "cuda10-cudnn7-avx-mkl") + elseif(CUDA_VERSION EQUAL 9.0) + set(CUDA_SUFFIX "cuda9-cudnn7-avx-mkl") + endif() +else() + set(WITH_TRT OFF) endif() if (WITH_GPU) diff --git a/core/cube/cube-builder/CMakeLists.txt b/core/cube/cube-builder/CMakeLists.txt index 1802465e3aaeb1885ae5d3396a1e5ac076228b37..65f77f4eb0ff16299d5ee54f192c2171ac5b956c 100755 --- a/core/cube/cube-builder/CMakeLists.txt +++ b/core/cube/cube-builder/CMakeLists.txt @@ -22,7 +22,7 @@ include_directories(SYSTEM ${CMAKE_CURRENT_BINARY_DIR}/../) add_executable(cube-builder src/main.cpp include/cube-builder/util.h src/util.cpp src/builder_job.cpp include/cube-builder/builder_job.h include/cube-builder/define.h src/seqfile_reader.cpp include/cube-builder/seqfile_reader.h include/cube-builder/raw_reader.h include/cube-builder/vtext.h src/crovl_builder_increment.cpp include/cube-builder/crovl_builder_increment.h src/curl_simple.cpp include/cube-builder/curl_simple.h) -add_dependencies(cube-builder jsoncpp) +add_dependencies(cube-builder jsoncpp boost) set(DYNAMIC_LIB gflags