提交 2a1f2ab0 编写于 作者: Y youny626

change default config to gpu

上级 bd01ac91
......@@ -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
......@@ -17,4 +17,4 @@
#define MILVUS_VERSION "0.5.0"
#define BUILD_TYPE "Debug"
#define BUILD_TIME "2019-11-05 13:39.33"
#define BUILD_TIME "2019-11-05 18:49.05"
......@@ -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:
......
......@@ -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);
}
......
......@@ -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
......
......@@ -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
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册