Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
ce7a5ea6
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
260
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ce7a5ea6
编写于
4月 16, 2021
作者:
F
FluorineDog
提交者:
yefu.chen
4月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support segcoreinit
Signed-off-by:
N
FluorineDog
<
guilin.gou@zilliz.com
>
上级
13f41f16
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
36 addition
and
11 deletion
+36
-11
internal/core/bench/CMakeLists.txt
internal/core/bench/CMakeLists.txt
+0
-1
internal/core/src/index/knowhere/CMakeLists.txt
internal/core/src/index/knowhere/CMakeLists.txt
+5
-0
internal/core/src/index/knowhere/knowhere/archive/KnowhereConfig.cpp
...re/src/index/knowhere/knowhere/archive/KnowhereConfig.cpp
+1
-1
internal/core/src/index/knowhere/knowhere/archive/KnowhereConfig.h
...core/src/index/knowhere/knowhere/archive/KnowhereConfig.h
+0
-0
internal/core/src/segcore/CMakeLists.txt
internal/core/src/segcore/CMakeLists.txt
+1
-1
internal/core/src/segcore/segcore_init_c.cpp
internal/core/src/segcore/segcore_init_c.cpp
+19
-5
internal/core/src/segcore/segcore_init_c.h
internal/core/src/segcore/segcore_init_c.h
+6
-1
internal/core/unittest/test_init.cpp
internal/core/unittest/test_init.cpp
+1
-1
internal/querynode/query_node.go
internal/querynode/query_node.go
+2
-0
internal/storage/payload.go
internal/storage/payload.go
+1
-1
未找到文件。
internal/core/bench/CMakeLists.txt
浏览文件 @
ce7a5ea6
...
...
@@ -14,7 +14,6 @@ set(indexbuilder_bench_srcs
add_executable
(
all_bench
${
bench_srcs
}
)
target_link_libraries
(
all_bench
milvus_segcore
milvus_indexbuilder
log
pthread
)
...
...
internal/core/src/index/knowhere/CMakeLists.txt
浏览文件 @
ce7a5ea6
...
...
@@ -52,6 +52,10 @@ set_target_properties(index_log PROPERTIES RULE_LAUNCH_COMPILE "")
set_target_properties
(
index_log PROPERTIES RULE_LAUNCH_LINK
""
)
include_directories
(
${
MILVUS_THIRDPARTY_SRC
}
)
set
(
config_srcs
knowhere/archive/KnowhereConfig.cpp
)
set
(
vector_index_srcs
knowhere/index/IndexType.cpp
knowhere/index/vector_index/adapter/VectorAdapter.cpp
...
...
@@ -149,6 +153,7 @@ if (NOT TARGET knowhere)
add_library
(
knowhere STATIC
${
external_srcs
}
${
config_srcs
}
${
vector_index_srcs
}
${
vector_offset_index_srcs
}
)
...
...
internal/core/src/index/archive/KnowhereConfig.cpp
→
internal/core/src/index/
knowhere/knowhere/
archive/KnowhereConfig.cpp
浏览文件 @
ce7a5ea6
...
...
@@ -9,7 +9,7 @@
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License.
#include "
index/archive/
KnowhereConfig.h"
#include "KnowhereConfig.h"
#ifdef MILVUS_GPU_VERSION
#include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h"
#endif
...
...
internal/core/src/index/archive/KnowhereConfig.h
→
internal/core/src/index/
knowhere/knowhere/
archive/KnowhereConfig.h
浏览文件 @
ce7a5ea6
文件已移动
internal/core/src/segcore/CMakeLists.txt
浏览文件 @
ce7a5ea6
...
...
@@ -15,7 +15,7 @@ set(SEGCORE_FILES
SealedIndexingRecord.cpp
SegmentInterface.cpp
SegcoreConfig.cpp
SegcoreInit
.cpp
segcore_init_c
.cpp
)
add_library
(
milvus_segcore SHARED
${
SEGCORE_FILES
}
...
...
internal/core/src/segcore/
SegcoreInit
.cpp
→
internal/core/src/segcore/
segcore_init_c
.cpp
浏览文件 @
ce7a5ea6
...
...
@@ -10,12 +10,26 @@
// or implied. See the License for the specific language governing permissions and limitations under the License
#include "index/thirdparty/faiss/FaissHook.h"
#include "segcore/SegcoreInit.h"
#include "segcore/segcore_init_c.h"
#include "knowhere/archive/KnowhereConfig.h"
#include <iostream>
#include "utils/Log.h"
namespace
milvus
::
segcore
{
void
SegcoreInit
()
{
std
::
string
cpu_flags
;
faiss
::
hook_init
(
cpu_flags
);
static
void
SegcoreInitImpl
()
{
namespace
eg
=
milvus
::
engine
;
eg
::
KnowhereConfig
::
SetSimdType
(
eg
::
KnowhereConfig
::
SimdType
::
AUTO
);
eg
::
KnowhereConfig
::
SetBlasThreshold
(
16384
);
eg
::
KnowhereConfig
::
SetEarlyStopThreshold
(
0
);
eg
::
KnowhereConfig
::
SetLogHandler
();
eg
::
KnowhereConfig
::
SetStatisticsLevel
(
0
);
el
::
Configurations
el_conf
;
el_conf
.
setGlobally
(
el
::
ConfigurationType
::
Enabled
,
std
::
to_string
(
false
));
}
}
// namespace milvus::segcore
extern
"C"
void
SegcoreInit
()
{
milvus
::
segcore
::
SegcoreInitImpl
();
}
internal/core/src/segcore/
SegcoreInit
.h
→
internal/core/src/segcore/
segcore_init_c
.h
浏览文件 @
ce7a5ea6
...
...
@@ -8,8 +8,13 @@
// Unless required by applicable law or agreed to in writing, software distributed under the License
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#ifdef __cplusplus
extern
"C"
{
#endif
namespace
milvus
::
segcore
{
void
SegcoreInit
();
#ifdef __cplusplus
}
#endif
internal/core/unittest/test_init.cpp
浏览文件 @
ce7a5ea6
...
...
@@ -14,7 +14,7 @@
//
#include "test_utils/DataGen.h"
#include <gtest/gtest.h>
#include "segcore/
SegcoreInit
.h"
#include "segcore/
segcore_init_c
.h"
TEST
(
Init
,
Naive
)
{
using
namespace
milvus
;
...
...
internal/querynode/query_node.go
浏览文件 @
ce7a5ea6
...
...
@@ -8,6 +8,7 @@ package querynode
#include "segcore/collection_c.h"
#include "segcore/segment_c.h"
#include "segcore/segcore_init_c.h"
*/
import
"C"
...
...
@@ -103,6 +104,7 @@ func NewQueryNodeWithoutID(ctx context.Context, factory msgstream.Factory) *Quer
func
(
node
*
QueryNode
)
Init
()
error
{
ctx
:=
context
.
Background
()
C
.
SegcoreInit
()
registerReq
:=
&
queryPb
.
RegisterNodeRequest
{
Base
:
&
commonpb
.
MsgBase
{
SourceID
:
Params
.
QueryNodeID
,
...
...
internal/storage/payload.go
浏览文件 @
ce7a5ea6
...
...
@@ -3,7 +3,7 @@ package storage
/*
#cgo CFLAGS: -I${SRCDIR}/cwrapper
#cgo LDFLAGS: -L${SRCDIR}/cwrapper/output -l
:libwrapper.a -l:libparquet.a -l:libarrow.a -l:libthrift.a -l:libutf8proc.a
-lstdc++ -lm
#cgo LDFLAGS: -L${SRCDIR}/cwrapper/output -l
wrapper -lparquet -larrow -lthrift -lutf8proc
-lstdc++ -lm
#include <stdlib.h>
#include "ParquetWrapper.h"
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录