Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
09da953a
M
milvus
项目概览
milvus
/
milvus
9 个月 前同步成功
通知
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 搜索 >>
未验证
提交
09da953a
编写于
8月 13, 2023
作者:
P
Patrick Weizhi Xu
提交者:
GitHub
8月 13, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use Knowhere AIO Context Init Defalut Value and Panic when Fail (#26286)
Signed-off-by:
N
Patrick Weizhi Xu
<
weizhi.xu@zilliz.com
>
上级
5b8d716c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
2 deletion
+20
-2
internal/core/src/config/ConfigKnowhere.cpp
internal/core/src/config/ConfigKnowhere.cpp
+4
-1
internal/core/thirdparty/knowhere/CMakeLists.txt
internal/core/thirdparty/knowhere/CMakeLists.txt
+1
-1
internal/core/unittest/test_init.cpp
internal/core/unittest/test_init.cpp
+15
-0
未找到文件。
internal/core/src/config/ConfigKnowhere.cpp
浏览文件 @
09da953a
...
@@ -74,7 +74,10 @@ KnowhereSetSimdType(const char* value) {
...
@@ -74,7 +74,10 @@ KnowhereSetSimdType(const char* value) {
void
void
KnowhereInitThreadPool
(
const
uint32_t
num_threads
)
{
KnowhereInitThreadPool
(
const
uint32_t
num_threads
)
{
knowhere
::
ThreadPool
::
InitGlobalThreadPool
(
num_threads
);
knowhere
::
ThreadPool
::
InitGlobalThreadPool
(
num_threads
);
knowhere
::
KnowhereConfig
::
SetAioContextPool
(
num_threads
,
32
);
if
(
!
knowhere
::
KnowhereConfig
::
SetAioContextPool
(
num_threads
))
{
PanicInfo
(
"Failed to set aio context pool with num_threads "
+
std
::
to_string
(
num_threads
));
}
}
}
}
// namespace milvus::config
}
// namespace milvus::config
internal/core/thirdparty/knowhere/CMakeLists.txt
浏览文件 @
09da953a
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
# or implied. See the License for the specific language governing permissions and limitations under the License.
# or implied. See the License for the specific language governing permissions and limitations under the License.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
set
(
KNOWHERE_VERSION
4f99dc0
)
set
(
KNOWHERE_VERSION
aa4a42f
)
message
(
STATUS
"Building knowhere-
${
KNOWHERE_SOURCE_VER
}
from source"
)
message
(
STATUS
"Building knowhere-
${
KNOWHERE_SOURCE_VER
}
from source"
)
message
(
STATUS
${
CMAKE_BUILD_TYPE
}
)
message
(
STATUS
${
CMAKE_BUILD_TYPE
}
)
...
...
internal/core/unittest/test_init.cpp
浏览文件 @
09da953a
...
@@ -10,7 +10,10 @@
...
@@ -10,7 +10,10 @@
// or implied. See the License for the specific language governing permissions and limitations under the License
// or implied. See the License for the specific language governing permissions and limitations under the License
#include <gtest/gtest.h>
#include <gtest/gtest.h>
#include <exception>
#include "config/ConfigKnowhere.h"
#include "gtest/gtest-death-test.h"
#include "segcore/segcore_init_c.h"
#include "segcore/segcore_init_c.h"
#include "test_utils/DataGen.h"
#include "test_utils/DataGen.h"
...
@@ -22,3 +25,15 @@ TEST(Init, Naive) {
...
@@ -22,3 +25,15 @@ TEST(Init, Naive) {
auto
simd_type
=
SegcoreSetSimdType
(
"auto"
);
auto
simd_type
=
SegcoreSetSimdType
(
"auto"
);
free
(
simd_type
);
free
(
simd_type
);
}
}
TEST
(
Init
,
KnowhereThreadPoolInit
)
{
#ifdef BUILD_DISK_ANN
try
{
milvus
::
config
::
KnowhereInitThreadPool
(
0
);
}
catch
(
std
::
exception
&
e
)
{
ASSERT_TRUE
(
std
::
string
(
e
.
what
()).
find
(
"Failed to set aio context pool"
)
!=
std
::
string
::
npos
);
}
#endif
milvus
::
config
::
KnowhereInitThreadPool
(
8
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录