Merge branch 'branch-0.3.1' into 'branch-0.3.1'

MS-276 Fix compile with volta architecture

See merge request megasearch/milvus!273

Former-commit-id: ffc15e40c2c042ffefd73d3f4a583ead93883057
This commit is contained in:
jinhai 2019-07-24 20:29:39 +08:00
commit dbff40af0d

View File

@ -752,10 +752,7 @@ macro(build_faiss)
if(${MILVUS_WITH_FAISS_GPU_VERSION} STREQUAL "ON") if(${MILVUS_WITH_FAISS_GPU_VERSION} STREQUAL "ON")
set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS} set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS}
"--with-cuda=${CUDA_TOOLKIT_ROOT_DIR}" "--with-cuda=${CUDA_TOOLKIT_ROOT_DIR}"
"--with-cuda-arch=\"-gencode=arch=compute_35,code=sm_35\"" "--with-cuda-arch=-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_75,code=sm_75"
"--with-cuda-arch=\"-gencode=arch=compute_52,code=sm_52\""
"--with-cuda-arch=\"-gencode=arch=compute_60,code=sm_60\""
"--with-cuda-arch=\"-gencode=arch=compute_61,code=sm_61\""
) )
else() else()
set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS} --without-cuda) set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS} --without-cuda)
@ -769,7 +766,7 @@ macro(build_faiss)
"./configure" "./configure"
${FAISS_CONFIGURE_ARGS} ${FAISS_CONFIGURE_ARGS}
BUILD_COMMAND BUILD_COMMAND
${MAKE} ${MAKE_BUILD_ARGS} ${MAKE} ${MAKE_BUILD_ARGS} VERBOSE=1
BUILD_IN_SOURCE BUILD_IN_SOURCE
1 1
INSTALL_COMMAND INSTALL_COMMAND