diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e9025ef0..9e10ecccc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,7 +297,7 @@ if (NOT CUDA_FOUND) endif() # annoy -if (USE_CAFFE OR USE_TORCH) +if (USE_CAFFE OR USE_TORCH OR USE_TENSORRT) if (USE_SIMSEARCH) if (USE_FAISS AND USE_ANNOY) message (STATUS "ANNOY selected, using ANNOY as simsearch backend") @@ -326,9 +326,9 @@ if (USE_CAFFE OR USE_TORCH) endif() if(USE_FAISS) if (USE_FAISS_CPU_ONLY) - set(CONFIGURE_OPTS "-DFAISS_ENABLE_GPU=OFF" "-DBUILD_TESTING=OFF") + set(CONFIGURE_OPTS "-DFAISS_ENABLE_GPU=OFF" "-DBUILD_TESTING=OFF" "-DFAISS_ENABLE_PYTHON=OFF") else() - set(CONFIGURE_OPTS "-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc" "-DBUILD_TESTING=OFF") + set(CONFIGURE_OPTS "-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc" "-DBUILD_TESTING=OFF" "-DFAISS_ENABLE_PYTHON=OFF") endif() message(STATUS "Fetching FAISS") add_definitions(-DUSE_FAISS) @@ -349,7 +349,7 @@ if (USE_CAFFE OR USE_TORCH) set(FAISS_INCLUDE_DIR ${CMAKE_BINARY_DIR}/faiss/src/faiss) include_directories("${FAISS_INCLUDE_DIR}") set(FAISS_LIB_DIR ${CMAKE_BINARY_DIR}/faiss/src/faiss/build/faiss) - set(FAISS_LIB_DEPS openblas faiss) + set(FAISS_LIB_DEPS openblas faiss lmdb) endif() endif() else() diff --git a/build.sh b/build.sh index bffd10cfd..cd8861d44 100755 --- a/build.sh +++ b/build.sh @@ -154,8 +154,8 @@ gpu_build() { "tf") extra_flags="$default_flags -DUSE_TF=ON" ;; "caffe2") extra_flags="$default_flags -DUSE_CAFFE2=ON" ;; "torch") extra_flags="$default_flags -DUSE_TORCH=ON" ;; - "tensorrt") extra_flags="-DUSE_TENSORRT=ON -DUSE_CAFFE=OFF" ;; - "tensorrt-cv4-cuda") extra_flags="-DUSE_TENSORRT=ON -DUSE_CAFFE=OFF -DUSE_CUDA_CV=ON -DUSE_OPENCV_VERSION=4 -DOpenCV_DIR=${DEEPDETECT_OPENCV4_BUILD_PATH}";; + "tensorrt") extra_flags="-DUSE_SIMSEARCH=ON -DUSE_TENSORRT=ON -DUSE_CAFFE=OFF" ;; + "tensorrt-cv4-cuda") extra_flags="-DUSE_SIMSEARCH=ON -DUSE_TENSORRT=ON -DUSE_CAFFE=OFF -DUSE_CUDA_CV=ON -DUSE_OPENCV_VERSION=4 -DOpenCV_DIR=${DEEPDETECT_OPENCV4_BUILD_PATH}";; *) extra_flags="$default_flags";; esac cmake .. $extra_flags -DCUDA_ARCH="${DEEPDETECT_CUDA_ARCH} -DRELEASE=${DEEPDETECT_RELEASE}"