Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
e24ae026
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e24ae026
编写于
7月 21, 2019
作者:
Z
zhiru
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update faiss version to 1.5.3 and add BUILD_FAISS_WITH_MKL as an option
Former-commit-id: 0c26016af4203d4849b8b9b710d005e83e32daea
上级
55e9b227
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
21 addition
and
31 deletion
+21
-31
cpp/cmake/ThirdPartyPackages.cmake
cpp/cmake/ThirdPartyPackages.cmake
+15
-20
cpp/src/CMakeLists.txt
cpp/src/CMakeLists.txt
+1
-2
cpp/thirdparty/versions.txt
cpp/thirdparty/versions.txt
+1
-1
cpp/unittest/db/CMakeLists.txt
cpp/unittest/db/CMakeLists.txt
+1
-2
cpp/unittest/faiss_wrapper/CMakeLists.txt
cpp/unittest/faiss_wrapper/CMakeLists.txt
+1
-2
cpp/unittest/metrics/CMakeLists.txt
cpp/unittest/metrics/CMakeLists.txt
+1
-2
cpp/unittest/server/CMakeLists.txt
cpp/unittest/server/CMakeLists.txt
+1
-2
未找到文件。
cpp/cmake/ThirdPartyPackages.cmake
浏览文件 @
e24ae026
...
@@ -699,7 +699,9 @@ endmacro()
...
@@ -699,7 +699,9 @@ endmacro()
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# FAISS
# FAISS
set
(
BUILD_FAISS_WITH_MKL false
)
if
(
NOT DEFINED BUILD_FAISS_WITH_MKL
)
set
(
BUILD_FAISS_WITH_MKL OFF
)
endif
()
if
(
EXISTS
"/proc/cpuinfo"
)
if
(
EXISTS
"/proc/cpuinfo"
)
FILE
(
READ /proc/cpuinfo PROC_CPUINFO
)
FILE
(
READ /proc/cpuinfo PROC_CPUINFO
)
...
@@ -708,8 +710,8 @@ if(EXISTS "/proc/cpuinfo")
...
@@ -708,8 +710,8 @@ if(EXISTS "/proc/cpuinfo")
STRING
(
REGEX MATCH
"
${
VENDOR_ID_RX
}
"
VENDOR_ID
"
${
PROC_CPUINFO
}
"
)
STRING
(
REGEX MATCH
"
${
VENDOR_ID_RX
}
"
VENDOR_ID
"
${
PROC_CPUINFO
}
"
)
STRING
(
REGEX REPLACE
"
${
VENDOR_ID_RX
}
"
"
\\
1"
VENDOR_ID
"
${
VENDOR_ID
}
"
)
STRING
(
REGEX REPLACE
"
${
VENDOR_ID_RX
}
"
"
\\
1"
VENDOR_ID
"
${
VENDOR_ID
}
"
)
if
(
${
VENDOR_ID
}
STREQUAL
"GenuineIntel"
)
if
(
NOT
${
VENDOR_ID
}
STREQUAL
"GenuineIntel"
)
set
(
BUILD_FAISS_WITH_MKL
true
)
set
(
BUILD_FAISS_WITH_MKL
OFF
)
endif
()
endif
()
endif
()
endif
()
...
@@ -729,7 +731,7 @@ macro(build_faiss)
...
@@ -729,7 +731,7 @@ macro(build_faiss)
set
(
FAISS_CFLAGS
${
EP_C_FLAGS
}
)
set
(
FAISS_CFLAGS
${
EP_C_FLAGS
}
)
set
(
FAISS_CXXFLAGS
${
EP_CXX_FLAGS
}
)
set
(
FAISS_CXXFLAGS
${
EP_CXX_FLAGS
}
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
message
(
STATUS
"Build Faiss with MKL"
)
message
(
STATUS
"Build Faiss with MKL"
)
if
(
NOT DEFINED MKL_LIB_PATH
)
if
(
NOT DEFINED MKL_LIB_PATH
)
set
(
MKL_LIB_PATH
"/opt/intel/compilers_and_libraries_
${
MKL_VERSION
}
/linux/mkl/lib/intel64"
)
set
(
MKL_LIB_PATH
"/opt/intel/compilers_and_libraries_
${
MKL_VERSION
}
/linux/mkl/lib/intel64"
)
...
@@ -750,10 +752,10 @@ macro(build_faiss)
...
@@ -750,10 +752,10 @@ 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=
compute
_35
\"
"
"--with-cuda-arch=
\"
-gencode=arch=compute_35,code=
sm
_35
\"
"
"--with-cuda-arch=
\"
-gencode=arch=compute_52,code=
compute
_52
\"
"
"--with-cuda-arch=
\"
-gencode=arch=compute_52,code=
sm
_52
\"
"
"--with-cuda-arch=
\"
-gencode=arch=compute_60,code=
compute
_60
\"
"
"--with-cuda-arch=
\"
-gencode=arch=compute_60,code=
sm
_60
\"
"
"--with-cuda-arch=
\"
-gencode=arch=compute_61,code=
compute
_61
\"
"
"--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
)
...
@@ -767,26 +769,22 @@ macro(build_faiss)
...
@@ -767,26 +769,22 @@ macro(build_faiss)
"./configure"
"./configure"
${
FAISS_CONFIGURE_ARGS
}
${
FAISS_CONFIGURE_ARGS
}
BUILD_COMMAND
BUILD_COMMAND
${
MAKE
}
${
MAKE_BUILD_ARGS
}
all
${
MAKE
}
${
MAKE_BUILD_ARGS
}
COMMAND
cd gpu &&
${
MAKE
}
${
MAKE_BUILD_ARGS
}
BUILD_IN_SOURCE
BUILD_IN_SOURCE
1
1
INSTALL_COMMAND
INSTALL_COMMAND
${
MAKE
}
install
${
MAKE
}
install
COMMAND
ln -s faiss_ep ../faiss
BUILD_BYPRODUCTS
BUILD_BYPRODUCTS
${
FAISS_STATIC_LIB
}
)
${
FAISS_STATIC_LIB
}
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
false
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
OFF
"
)
ExternalProject_Add_StepDependencies
(
faiss_ep build openblas_ep lapack_ep
)
ExternalProject_Add_StepDependencies
(
faiss_ep build openblas_ep lapack_ep
)
endif
()
endif
()
file
(
MAKE_DIRECTORY
"
${
FAISS_INCLUDE_DIR
}
"
)
file
(
MAKE_DIRECTORY
"
${
FAISS_INCLUDE_DIR
}
"
)
add_library
(
faiss SHARED IMPORTED
)
add_library
(
faiss SHARED IMPORTED
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
set
(
MKL_LIBS
${
MKL_LIB_PATH
}
/libmkl_intel_ilp64.a
set
(
MKL_LIBS
${
MKL_LIB_PATH
}
/libmkl_intel_ilp64.a
${
MKL_LIB_PATH
}
/libmkl_gnu_thread.a
${
MKL_LIB_PATH
}
/libmkl_gnu_thread.a
${
MKL_LIB_PATH
}
/libmkl_core.a
)
${
MKL_LIB_PATH
}
/libmkl_core.a
)
...
@@ -806,7 +804,7 @@ macro(build_faiss)
...
@@ -806,7 +804,7 @@ macro(build_faiss)
add_dependencies
(
faiss faiss_ep
)
add_dependencies
(
faiss faiss_ep
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
false
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
OFF
"
)
add_dependencies
(
faiss openblas_ep
)
add_dependencies
(
faiss openblas_ep
)
add_dependencies
(
faiss lapack_ep
)
add_dependencies
(
faiss lapack_ep
)
endif
()
endif
()
...
@@ -815,7 +813,7 @@ endmacro()
...
@@ -815,7 +813,7 @@ endmacro()
if
(
MILVUS_WITH_FAISS
)
if
(
MILVUS_WITH_FAISS
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
false
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
OFF
"
)
resolve_dependency
(
OpenBLAS
)
resolve_dependency
(
OpenBLAS
)
get_target_property
(
OPENBLAS_INCLUDE_DIR openblas INTERFACE_INCLUDE_DIRECTORIES
)
get_target_property
(
OPENBLAS_INCLUDE_DIR openblas INTERFACE_INCLUDE_DIRECTORIES
)
include_directories
(
SYSTEM
"
${
OPENBLAS_INCLUDE_DIR
}
"
)
include_directories
(
SYSTEM
"
${
OPENBLAS_INCLUDE_DIR
}
"
)
...
@@ -830,10 +828,7 @@ if(MILVUS_WITH_FAISS)
...
@@ -830,10 +828,7 @@ if(MILVUS_WITH_FAISS)
resolve_dependency
(
FAISS
)
resolve_dependency
(
FAISS
)
get_target_property
(
FAISS_INCLUDE_DIR faiss INTERFACE_INCLUDE_DIRECTORIES
)
get_target_property
(
FAISS_INCLUDE_DIR faiss INTERFACE_INCLUDE_DIRECTORIES
)
include_directories
(
SYSTEM
"
${
FAISS_INCLUDE_DIR
}
"
)
include_directories
(
SYSTEM
"
${
FAISS_INCLUDE_DIR
}
"
)
include_directories
(
SYSTEM
"
${
CMAKE_CURRENT_BINARY_DIR
}
/faiss_ep-prefix/src/"
)
link_directories
(
SYSTEM
${
FAISS_PREFIX
}
/
)
link_directories
(
SYSTEM
${
FAISS_PREFIX
}
/lib/
)
link_directories
(
SYSTEM
${
FAISS_PREFIX
}
/lib/
)
link_directories
(
SYSTEM
${
FAISS_PREFIX
}
/gpu/
)
endif
()
endif
()
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
...
cpp/src/CMakeLists.txt
浏览文件 @
e24ae026
...
@@ -72,7 +72,6 @@ set(third_party_libs
...
@@ -72,7 +72,6 @@ set(third_party_libs
sqlite
sqlite
thrift
thrift
yaml-cpp
yaml-cpp
libgpufaiss.a
faiss
faiss
prometheus-cpp-push
prometheus-cpp-push
prometheus-cpp-pull
prometheus-cpp-pull
...
@@ -93,7 +92,7 @@ set(third_party_libs
...
@@ -93,7 +92,7 @@ set(third_party_libs
if
(
MEGASEARCH_WITH_ARROW STREQUAL
"ON"
)
if
(
MEGASEARCH_WITH_ARROW STREQUAL
"ON"
)
set
(
third_party_libs
${
third_party_libs
}
arrow
)
set
(
third_party_libs
${
third_party_libs
}
arrow
)
endif
()
endif
()
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
set
(
third_party_libs
${
third_party_libs
}
set
(
third_party_libs
${
third_party_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
${
MKL_LIBS
}
)
...
...
cpp/thirdparty/versions.txt
浏览文件 @
e24ae026
...
@@ -2,7 +2,7 @@ ARROW_VERSION=zilliz
...
@@ -2,7 +2,7 @@ ARROW_VERSION=zilliz
BOOST_VERSION=1.70.0
BOOST_VERSION=1.70.0
BZIP2_VERSION=1.0.6
BZIP2_VERSION=1.0.6
EASYLOGGINGPP_VERSION=v9.96.7
EASYLOGGINGPP_VERSION=v9.96.7
FAISS_VERSION=
7b07685
FAISS_VERSION=
v1.5.3
MKL_VERSION=2019.4.243
MKL_VERSION=2019.4.243
GTEST_VERSION=1.8.1
GTEST_VERSION=1.8.1
JSONCONS_VERSION=0.126.0
JSONCONS_VERSION=0.126.0
...
...
cpp/unittest/db/CMakeLists.txt
浏览文件 @
e24ae026
...
@@ -35,7 +35,6 @@ set(db_test_src
...
@@ -35,7 +35,6 @@ set(db_test_src
cuda_add_executable
(
db_test
${
db_test_src
}
)
cuda_add_executable
(
db_test
${
db_test_src
}
)
set
(
db_libs
set
(
db_libs
libgpufaiss.a
faiss
faiss
cudart
cudart
cublas
cublas
...
@@ -46,7 +45,7 @@ set(db_libs
...
@@ -46,7 +45,7 @@ set(db_libs
mysqlpp
mysqlpp
)
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
set
(
db_libs
${
db_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
set
(
db_libs
${
db_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
endif
()
endif
()
...
...
cpp/unittest/faiss_wrapper/CMakeLists.txt
浏览文件 @
e24ae026
...
@@ -24,7 +24,6 @@ set(wrapper_libs
...
@@ -24,7 +24,6 @@ set(wrapper_libs
stdc++
stdc++
boost_system_static
boost_system_static
boost_filesystem_static
boost_filesystem_static
libgpufaiss.a
faiss
faiss
cudart
cudart
cublas
cublas
...
@@ -35,7 +34,7 @@ set(wrapper_libs
...
@@ -35,7 +34,7 @@ set(wrapper_libs
zstd
zstd
lz4
lz4
)
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
set
(
wrapper_libs
${
wrapper_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
set
(
wrapper_libs
${
wrapper_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
endif
()
endif
()
...
...
cpp/unittest/metrics/CMakeLists.txt
浏览文件 @
e24ae026
...
@@ -49,7 +49,6 @@ set(count_test_src
...
@@ -49,7 +49,6 @@ set(count_test_src
add_executable
(
metrics_test
${
count_test_src
}
${
require_files
}
)
add_executable
(
metrics_test
${
count_test_src
}
${
require_files
}
)
target_link_libraries
(
metrics_test
target_link_libraries
(
metrics_test
libgpufaiss.a
faiss
faiss
cudart
cudart
cublas
cublas
...
@@ -64,7 +63,7 @@ target_link_libraries(metrics_test
...
@@ -64,7 +63,7 @@ target_link_libraries(metrics_test
mysqlpp
mysqlpp
${
unittest_libs
}
${
unittest_libs
}
)
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
target_link_libraries
(
metrics_test
${
MKL_LIBS
}
${
MKL_LIBS
}
)
target_link_libraries
(
metrics_test
${
MKL_LIBS
}
${
MKL_LIBS
}
)
endif
()
endif
()
...
...
cpp/unittest/server/CMakeLists.txt
浏览文件 @
e24ae026
...
@@ -33,7 +33,6 @@ cuda_add_executable(server_test
...
@@ -33,7 +33,6 @@ cuda_add_executable(server_test
set
(
require_libs
set
(
require_libs
stdc++
stdc++
libgpufaiss.a
faiss
faiss
cudart
cudart
cublas
cublas
...
@@ -48,7 +47,7 @@ set(require_libs
...
@@ -48,7 +47,7 @@ set(require_libs
pthread
pthread
)
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
true
"
)
if
(
${
BUILD_FAISS_WITH_MKL
}
STREQUAL
"
ON
"
)
set
(
require_libs
${
require_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
set
(
require_libs
${
require_libs
}
${
MKL_LIBS
}
${
MKL_LIBS
}
)
endif
()
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录