Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
374b3079
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,发现更多精彩内容 >>
提交
374b3079
编写于
6月 17, 2019
作者:
G
groot
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-92 - Unify behavior of debug and release build
Former-commit-id: cf2ab198bf28c9bf26cd0acb239c203626f7592f
上级
1336716d
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
19 addition
and
12 deletion
+19
-12
cpp/CHANGELOG.md
cpp/CHANGELOG.md
+1
-0
cpp/CMakeLists.txt
cpp/CMakeLists.txt
+2
-4
cpp/README.md
cpp/README.md
+0
-1
cpp/build.sh
cpp/build.sh
+5
-5
cpp/src/db/DBMetaImpl.cpp
cpp/src/db/DBMetaImpl.cpp
+1
-1
cpp/src/wrapper/IndexBuilder.cpp
cpp/src/wrapper/IndexBuilder.cpp
+3
-0
cpp/unittest/db/CMakeLists.txt
cpp/unittest/db/CMakeLists.txt
+1
-0
cpp/unittest/db/db_tests.cpp
cpp/unittest/db/db_tests.cpp
+3
-0
cpp/unittest/faiss_wrapper/CMakeLists.txt
cpp/unittest/faiss_wrapper/CMakeLists.txt
+1
-0
cpp/unittest/metrics/CMakeLists.txt
cpp/unittest/metrics/CMakeLists.txt
+1
-1
cpp/unittest/server/CMakeLists.txt
cpp/unittest/server/CMakeLists.txt
+1
-0
未找到文件。
cpp/CHANGELOG.md
浏览文件 @
374b3079
...
...
@@ -13,6 +13,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
MS-83 - Update vecwise to Milvus
-
MS-77 - Performance issue of post-search action
-
MS-22 - Enhancement for MemVector size control
-
MS-92 - Unify behavior of debug and release build
## New Feature
...
...
cpp/CMakeLists.txt
浏览文件 @
374b3079
...
...
@@ -71,9 +71,7 @@ set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -O0 -g")
message
(
"CUDA_TOOLKIT_ROOT_DIR=
${
CUDA_TOOLKIT_ROOT_DIR
}
"
)
message
(
"CUDA_NVCC_FLAGS=
${
CUDA_NVCC_FLAGS
}
"
)
if
(
GPU_VERSION STREQUAL
"ON"
)
add_definitions
(
"-DGPU_VERSION"
)
endif
()
add_definitions
(
"-DGPU_VERSION"
)
set
(
CMAKE_CXX_STANDARD 14
)
set
(
CMAKE_CXX_STANDARD_REQUIRED on
)
...
...
@@ -92,7 +90,7 @@ endif()
if
(
CMAKE_BUILD_TYPE STREQUAL
"Release"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-O3 -fPIC -DELPP_THREAD_SAFE -fopenmp"
)
if
(
GPU_VERSION
STREQUAL
"ON"
)
if
(
CMAKE_LICENSE_CHECK
STREQUAL
"ON"
)
set
(
ENABLE_LICENSE
"ON"
)
add_definitions
(
"-DENABLE_LICENSE"
)
endif
()
...
...
cpp/README.md
浏览文件 @
374b3079
...
...
@@ -15,7 +15,6 @@ cmake_build/src/libmilvus_engine.a is the static library
cd [sourcecode path]/cpp
./build.sh -t Debug
./build.sh -t Release
./build.sh -g # Build GPU version
If you encounter the following error when building:
`protocol https not supported or disabled in libcurl`
...
...
cpp/build.sh
浏览文件 @
374b3079
...
...
@@ -2,7 +2,7 @@
BUILD_TYPE
=
"Debug"
BUILD_UNITTEST
=
"off"
BUILD_GPU
=
"OFF"
LICENSE_CHECK
=
"OFF"
INSTALL_PREFIX
=
$(
pwd
)
/milvus
MAKE_CLEAN
=
"OFF"
...
...
@@ -19,8 +19,8 @@ do
p
)
INSTALL_PREFIX
=
$OPTARG
;;
g
)
BUILD_GPU
=
"ON"
l
)
LICENSE_CHECK
=
"ON"
;;
r
)
if
[[
-d
cmake_build
]]
;
then
...
...
@@ -35,7 +35,7 @@ parameter:
-t: build type
-u: building unit test options
-p: install prefix
-
g: build GPU
version
-
l: build license
version
-r: remove previous build directory
usage:
...
...
@@ -64,7 +64,7 @@ if [[ ${MAKE_CLEAN} = "ON" ]]; then
-DCMAKE_INSTALL_PREFIX=
${
INSTALL_PREFIX
}
-DCMAKE_BUILD_TYPE=
${
BUILD_TYPE
}
\
-DCMAKE_CUDA_COMPILER=
${
CUDA_COMPILER
}
\
-D
GPU_VERSION=
${
BUILD_GPU
}
\
-D
CMAKE_LICENSE_CHECK=
${
LICENSE_CHECK
}
\
$@
../"
echo
${
CMAKE_CMD
}
...
...
cpp/src/db/DBMetaImpl.cpp
浏览文件 @
374b3079
...
...
@@ -318,7 +318,7 @@ Status DBMetaImpl::CreateTableFile(TableFileSchema &file_schema) {
file_schema
.
updated_time_
=
file_schema
.
created_on_
;
file_schema
.
engine_type_
=
table_schema
.
engine_type_
;
GetTableFilePath
(
file_schema
);
ENGINE_LOG_DEBUG
<<
"CreateTableFile "
<<
file_schema
.
file_id_
;
{
try
{
server
::
Metrics
::
GetInstance
().
MetaAccessTotalIncrement
();
...
...
cpp/src/wrapper/IndexBuilder.cpp
浏览文件 @
374b3079
...
...
@@ -69,6 +69,7 @@ Index_ptr IndexBuilder::build_all(const long &nb,
std
::
shared_ptr
<
faiss
::
Index
>
host_index
=
nullptr
;
#ifdef GPU_VERSION
{
LOG
(
DEBUG
)
<<
"Build index by GPU"
;
// TODO: list support index-type.
faiss
::
Index
*
ori_index
=
faiss
::
index_factory
(
opd_
->
d
,
opd_
->
get_index_type
(
nb
).
c_str
());
...
...
@@ -88,6 +89,7 @@ Index_ptr IndexBuilder::build_all(const long &nb,
}
#else
{
LOG
(
DEBUG
)
<<
"Build index by CPU"
;
faiss
::
Index
*
index
=
faiss
::
index_factory
(
opd_
->
d
,
opd_
->
get_index_type
(
nb
).
c_str
());
if
(
!
index
->
is_trained
)
{
nt
==
0
||
xt
==
nullptr
?
index
->
train
(
nb
,
xb
)
...
...
@@ -113,6 +115,7 @@ Index_ptr BgCpuBuilder::build_all(const long &nb, const float *xb, const long *i
std
::
shared_ptr
<
faiss
::
Index
>
index
=
nullptr
;
index
.
reset
(
faiss
::
index_factory
(
opd_
->
d
,
opd_
->
get_index_type
(
nb
).
c_str
()));
LOG
(
DEBUG
)
<<
"Build index by CPU"
;
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
cpu_resource
);
if
(
!
index
->
is_trained
)
{
...
...
cpp/unittest/db/CMakeLists.txt
浏览文件 @
374b3079
...
...
@@ -35,6 +35,7 @@ set(db_test_src
cuda_add_executable
(
db_test
${
db_test_src
}
)
set
(
db_libs
gpufaiss
faiss
cudart
cublas
...
...
cpp/unittest/db/db_tests.cpp
浏览文件 @
374b3079
...
...
@@ -69,6 +69,7 @@ TEST_F(DBTest2, ARHIVE_DISK_CHECK) {
engine
::
meta
::
TableSchema
group_info
;
group_info
.
dimension_
=
group_dim
;
group_info
.
table_id_
=
group_name
;
group_info
.
engine_type_
=
(
int
)
engine
::
EngineType
::
FAISS_IVFFLAT
;
engine
::
Status
stat
=
db_
->
CreateTable
(
group_info
);
engine
::
meta
::
TableSchema
group_info_get
;
...
...
@@ -116,6 +117,7 @@ TEST_F(DBTest, DB_TEST) {
engine
::
meta
::
TableSchema
group_info
;
group_info
.
dimension_
=
group_dim
;
group_info
.
table_id_
=
group_name
;
group_info
.
engine_type_
=
(
int
)
engine
::
EngineType
::
FAISS_IVFFLAT
;
engine
::
Status
stat
=
db_
->
CreateTable
(
group_info
);
engine
::
meta
::
TableSchema
group_info_get
;
...
...
@@ -202,6 +204,7 @@ TEST_F(DBTest, SEARCH_TEST) {
engine
::
meta
::
TableSchema
group_info
;
group_info
.
dimension_
=
group_dim
;
group_info
.
table_id_
=
group_name
;
group_info
.
engine_type_
=
(
int
)
engine
::
EngineType
::
FAISS_IVFFLAT
;
engine
::
Status
stat
=
db_
->
CreateTable
(
group_info
);
engine
::
meta
::
TableSchema
group_info_get
;
...
...
cpp/unittest/faiss_wrapper/CMakeLists.txt
浏览文件 @
374b3079
...
...
@@ -32,6 +32,7 @@ set(wrapper_libs
stdc++
boost_system
boost_filesystem
gpufaiss
faiss
cudart
cublas
...
...
cpp/unittest/metrics/CMakeLists.txt
浏览文件 @
374b3079
...
...
@@ -60,7 +60,7 @@ set(count_test_src
add_executable
(
metrics_test
${
count_test_src
}
${
require_files
}
)
target_link_libraries
(
metrics_test
gpufaiss
faiss
cudart
cublas
...
...
cpp/unittest/server/CMakeLists.txt
浏览文件 @
374b3079
...
...
@@ -33,6 +33,7 @@ cuda_add_executable(server_test
set
(
require_libs
stdc++
gpufaiss
faiss
cudart
cublas
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录