Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_35024513
milvus
提交
2a1f2ab0
milvus
项目概览
qq_35024513
/
milvus
与 Fork 源项目一致
Fork自
milvus / milvus
通知
14
Star
0
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,发现更多精彩内容 >>
提交
2a1f2ab0
编写于
11月 05, 2019
作者:
Y
youny626
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change default config to gpu
上级
bd01ac91
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
15 addition
and
6 deletion
+15
-6
core/conf/server_config.template
core/conf/server_config.template
+5
-4
core/src/config.h
core/src/config.h
+1
-1
core/src/server/Config.h
core/src/server/Config.h
+4
-0
core/src/utils/ValidationUtil.cpp
core/src/utils/ValidationUtil.cpp
+2
-1
core/unittest/db/utils.cpp
core/unittest/db/utils.cpp
+1
-0
core/unittest/server/utils.cpp
core/unittest/server/utils.cpp
+1
-0
core/unittest/wrapper/utils.cpp
core/unittest/wrapper/utils.cpp
+1
-0
未找到文件。
core/conf/server_config.template
浏览文件 @
2a1f2ab0
...
...
@@ -32,9 +32,9 @@ cache_config:
cpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered, must be in range (0.0, 1.0]
cache_insert_data: false # whether to load inserted data into cache, must be a boolean
#
Uncomment
the following config if you are using GPU version
#
gpu_cache_capacity: 4 # GB, GPU memory used for cache, must be a positive integer
#
gpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered, must be in range (0.0, 1.0]
#
Skip
the following config if you are using GPU version
gpu_cache_capacity: 4 # GB, GPU memory used for cache, must be a positive integer
gpu_cache_threshold: 0.85 # percentage of data that will be kept when cache cleanup is triggered, must be in range (0.0, 1.0]
engine_config:
use_blas_threshold: 20 # if nq < use_blas_threshold, use SSE, faster with fluctuated response times
...
...
@@ -44,4 +44,5 @@ engine_config:
resource_config:
search_resources: # define the CPU / GPUs used for search computation, must be in format: cpu / gpux
- cpu
index_build_device: cpu # CPU / GPU used for building index, must be in format: cpu / gpux
- gpu0
index_build_device: gpu0 # CPU / GPU used for building index, must be in format: cpu / gpux
core/src/config.h
浏览文件 @
2a1f2ab0
...
...
@@ -17,4 +17,4 @@
#define MILVUS_VERSION "0.5.0"
#define BUILD_TYPE "Debug"
#define BUILD_TIME "2019-11-05 1
3:39.33
"
#define BUILD_TIME "2019-11-05 1
8:49.05
"
core/src/server/Config.h
浏览文件 @
2a1f2ab0
...
...
@@ -93,7 +93,11 @@ static const char* CONFIG_RESOURCE_MODE = "mode";
static
const
char
*
CONFIG_RESOURCE_MODE_DEFAULT
=
"simple"
;
static
const
char
*
CONFIG_RESOURCE_SEARCH_RESOURCES
=
"search_resources"
;
static
const
char
*
CONFIG_RESOURCE_INDEX_BUILD_DEVICE
=
"index_build_device"
;
#ifdef MILVUS_CPU_VERSION
static
const
char
*
CONFIG_RESOURCE_INDEX_BUILD_DEVICE_DEFAULT
=
"cpu"
;
#else
static
const
char
*
CONFIG_RESOURCE_INDEX_BUILD_DEVICE_DEFAULT
=
"gpu0"
;
#endif
class
Config
{
public:
...
...
core/src/utils/ValidationUtil.cpp
浏览文件 @
2a1f2ab0
...
...
@@ -196,7 +196,8 @@ ValidationUtil::GetGpuMemory(uint32_t gpu_index, size_t& memory) {
cudaDeviceProp
deviceProp
;
auto
cuda_err
=
cudaGetDeviceProperties
(
&
deviceProp
,
gpu_index
);
if
(
cuda_err
)
{
std
::
string
msg
=
"Failed to get gpu properties, cuda error:"
+
std
::
to_string
(
cuda_err
);
std
::
string
msg
=
"Failed to get gpu properties for gpu"
+
gpu_index
+
" , cuda error:"
+
std
::
to_string
(
cuda_err
);
SERVER_LOG_ERROR
<<
msg
;
return
Status
(
SERVER_UNEXPECTED_ERROR
,
msg
);
}
...
...
core/unittest/db/utils.cpp
浏览文件 @
2a1f2ab0
...
...
@@ -75,6 +75,7 @@ static const char* CONFIG_STR =
" index_build_device: cpu # CPU used for building index"
;
#else
" search_resources:
\n
"
" - cpu
\n
"
" - gpu0
\n
"
" index_build_device: gpu0 # GPU used for building index"
;
#endif
...
...
core/unittest/server/utils.cpp
浏览文件 @
2a1f2ab0
...
...
@@ -66,6 +66,7 @@ static const char* VALID_CONFIG_STR =
" index_build_device: cpu # CPU used for building index"
;
#else
" search_resources:
\n
"
" - cpu
\n
"
" - gpu0
\n
"
" index_build_device: gpu0 # GPU used for building index"
;
#endif
...
...
core/unittest/wrapper/utils.cpp
浏览文件 @
2a1f2ab0
...
...
@@ -63,6 +63,7 @@ static const char* CONFIG_STR =
" index_build_device: cpu # CPU used for building index"
;
#else
" search_resources:
\n
"
" - cpu
\n
"
" - gpu0
\n
"
" index_build_device: gpu0 # GPU used for building index"
;
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录