提交 9c34c92e 编写于 作者: J jinhai

Merge branch 'branch-0.3.0' into 'branch-0.3.0'

MS-81: fix faiss ptx issue; change cuda gencode

See merge request megasearch/vecwise_engine!84

Former-commit-id: 14033f044523fe36dfff5c4c5841b794ed2ffb75
......@@ -23,6 +23,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-65 - Implement GetTableRowCount interface
- MS-45 - Implement DeleteTable interface
- MS-75 - cmake: change faiss version to 1.5.2; add CUDA gencode
- MS-81 - fix faiss ptx issue; change cuda gencode
## Task
- MS-74 - Change README.md in cpp
......
......@@ -44,33 +44,6 @@ if("${MAKE}" STREQUAL "")
endif()
endif()
set(GCC_VERSION 5.3.0)
set(GCC_DIR "${CMAKE_CURRENT_BINARY_DIR}/gcc")
set(GCC_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/gcc/gcc_build")
set(GCC_TAR_NAME "${GCC_BUILD_DIR}/gcc-${GCC_VERSION}.tar.gz")
if (NOT EXISTS ${GCC_TAR_NAME})
file(MAKE_DIRECTORY ${GCC_BUILD_DIR})
file(DOWNLOAD http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-${GCC_VERSION}/${GCC_TAR_NAME}
${GCC_TAR_NAME})
message(STATUS "Building GCC-${GCC_VERSION} from source")
execute_process(
COMMAND
"${CMAKE_COMMAND} -E tar -xf ${GCC_TAR_NAME}"
COMMAND
"./configure --prefix=${GCC_DIR} --with-local-prefix=${GCC_DIR}
--enable-languages=cxx,fortran
--enable-checking=release
--disable-bootstrap"
COMMAND
"${MAKE} -j4"
COMMAND
"${MAKE} install"
RESULT_VARIABLE _status
#OUTPUT_QUIET
#ERROR_QUIET
WORKING_DIRECTORY ${GCC_BUILD_DIR})
endif ()
set(MEGASEARCH_VERSION_MAJOR "${megasearch_VERSION_MAJOR}")
set(MEGASEARCH_VERSION_MINOR "${megasearch_VERSION_MINOR}")
set(MEGASEARCH_VERSION_PATCH "${megasearch_VERSION_PATCH}")
......
......@@ -70,8 +70,8 @@ define_option(MEGASEARCH_WITH_FAISS "Build with FAISS library" ON)
define_option(MEGASEARCH_WITH_FAISS_GPU_VERSION "Build with FAISS GPU version" ON)
define_option_string(MEGASEARCH_FAISS_GPU_ARCH "Specifying which GPU architectures to build against"
"-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")
#define_option_string(MEGASEARCH_FAISS_GPU_ARCH "Specifying which GPU architectures to build against"
# "-gencode=arch=compute_35,code=compute_35 -gencode=arch=compute_52,code=compute_52 -gencode=arch=compute_60,code=compute_60 -gencode=arch=compute_61,code=compute_61")
define_option(MEGASEARCH_WITH_LAPACK "Build with LAPACK library" ON)
......
......@@ -686,7 +686,15 @@ macro(build_faiss)
if(${MEGASEARCH_WITH_FAISS_GPU_VERSION} STREQUAL "ON")
set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS}
"--with-cuda=${CUDA_TOOLKIT_ROOT_DIR}"
"--with-cuda-arch=${MEGASEARCH_FAISS_GPU_ARCH}")
# "with_cuda_arch=\"-gencode=arch=compute_35,code=compute_35 \\
# -gencode=arch=compute_52,code=compute_52 \\
# -gencode=arch=compute_60,code=compute_60 \\
# -gencode=arch=compute_61,code=compute_61\""
"--with-cuda-arch=\"-gencode=arch=compute_35,code=compute_35\""
"--with-cuda-arch=\"-gencode=arch=compute_52,code=compute_52\""
"--with-cuda-arch=\"-gencode=arch=compute_60,code=compute_60\""
"--with-cuda-arch=\"-gencode=arch=compute_61,code=compute_61\""
)
else()
set(FAISS_CONFIGURE_ARGS ${FAISS_CONFIGURE_ARGS} --without-cuda)
endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册