提交 9998adb3 编写于 作者: P peng.xu

Merge branch 'branch-0.4.0' into 'branch-0.4.0'

remove gpu_cache_capacity config

See merge request megasearch/milvus!555

Former-commit-id: 684259254218b9c02a3fdaa67ffadd3dca7efc0e
...@@ -9,15 +9,12 @@ DB_PATH="/opt/milvus" ...@@ -9,15 +9,12 @@ DB_PATH="/opt/milvus"
PROFILING="OFF" PROFILING="OFF"
BUILD_FAISS_WITH_MKL="OFF" BUILD_FAISS_WITH_MKL="OFF"
USE_JFROG_CACHE="OFF" USE_JFROG_CACHE="OFF"
KNOWHERE_BUILD_DIR="`pwd`/src/core/cmake_build"
KNOWHERE_OPTIONS="-t ${BUILD_TYPE}"
while getopts "p:d:t:k:uhrcgmj" arg while getopts "p:d:t:uhrcgmj" arg
do do
case $arg in case $arg in
t) t)
BUILD_TYPE=$OPTARG # BUILD_TYPE BUILD_TYPE=$OPTARG # BUILD_TYPE
KNOWHERE_OPTIONS="-t ${BUILD_TYPE}"
;; ;;
u) u)
echo "Build and run unittest cases" ; echo "Build and run unittest cases" ;
...@@ -41,15 +38,11 @@ do ...@@ -41,15 +38,11 @@ do
g) g)
PROFILING="ON" PROFILING="ON"
;; ;;
k)
KNOWHERE_BUILD_DIR=$OPTARG
;;
m) m)
BUILD_FAISS_WITH_MKL="ON" BUILD_FAISS_WITH_MKL="ON"
;; ;;
j) j)
USE_JFROG_CACHE="ON" USE_JFROG_CACHE="ON"
KNOWHERE_OPTIONS="${KNOWHERE_OPTIONS} -j"
;; ;;
h) # help h) # help
echo " echo "
...@@ -62,7 +55,6 @@ parameter: ...@@ -62,7 +55,6 @@ parameter:
-r: remove previous build directory(default: OFF) -r: remove previous build directory(default: OFF)
-c: code coverage(default: OFF) -c: code coverage(default: OFF)
-g: profiling(default: OFF) -g: profiling(default: OFF)
-k: specify knowhere header/binary path
-m: build faiss with MKL(default: OFF) -m: build faiss with MKL(default: OFF)
-j: use jfrog cache build directory -j: use jfrog cache build directory
...@@ -96,7 +88,6 @@ if [[ ${MAKE_CLEAN} == "ON" ]]; then ...@@ -96,7 +88,6 @@ if [[ ${MAKE_CLEAN} == "ON" ]]; then
-DMILVUS_DB_PATH=${DB_PATH} \ -DMILVUS_DB_PATH=${DB_PATH} \
-DMILVUS_ENABLE_PROFILING=${PROFILING} \ -DMILVUS_ENABLE_PROFILING=${PROFILING} \
-DBUILD_FAISS_WITH_MKL=${BUILD_FAISS_WITH_MKL} \ -DBUILD_FAISS_WITH_MKL=${BUILD_FAISS_WITH_MKL} \
-DKNOWHERE_BUILD_DIR=${KNOWHERE_BUILD_DIR} \
-DUSE_JFROG_CACHE=${USE_JFROG_CACHE} \ -DUSE_JFROG_CACHE=${USE_JFROG_CACHE} \
../" ../"
echo ${CMAKE_CMD} echo ${CMAKE_CMD}
......
...@@ -31,8 +31,6 @@ cache_config: ...@@ -31,8 +31,6 @@ cache_config:
cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory cpu_cache_capacity: 16 # how many memory are used as cache, unit: GB, range: 0 ~ less than total memory
cpu_cache_free_percent: 0.85 # old data will be erased from cache when cache is full, this value specify how much memory should be kept, range: greater than zero ~ 1.0 cpu_cache_free_percent: 0.85 # old data will be erased from cache when cache is full, this value specify how much memory should be kept, range: greater than zero ~ 1.0
insert_cache_immediately: false # insert data will be load into cache immediately for hot query insert_cache_immediately: false # insert data will be load into cache immediately for hot query
gpu_cache_capacity: 5 # how many memory are used as cache in gpu, unit: GB, RANGE: 0 ~ less than total memory
gpu_cache_free_percent: 0.85 # old data will be erased from cache when cache is full, this value specify how much memory should be kept, range: greater than zero ~ 1.0
engine_config: engine_config:
use_blas_threshold: 20 use_blas_threshold: 20
......
...@@ -13,6 +13,10 @@ DIR_LCOV_OUTPUT="lcov_out" ...@@ -13,6 +13,10 @@ DIR_LCOV_OUTPUT="lcov_out"
DIR_GCNO="cmake_build" DIR_GCNO="cmake_build"
DIR_UNITTEST="milvus/unittest" DIR_UNITTEST="milvus/unittest"
# delete old code coverage info files
rm -rf lcov_out
rm FILE_INFO_BASE FILE_INFO_MILVUS FILE_INFO_OUTPUT FILE_INFO_OUTPUT_NEW
MYSQL_USER_NAME=root MYSQL_USER_NAME=root
MYSQL_PASSWORD=Fantast1c MYSQL_PASSWORD=Fantast1c
...@@ -84,7 +88,7 @@ done ...@@ -84,7 +88,7 @@ done
mysql_exc "DROP DATABASE IF EXISTS ${MYSQL_DB_NAME};" mysql_exc "DROP DATABASE IF EXISTS ${MYSQL_DB_NAME};"
# gen test converage # gen code coverage
${LCOV_CMD} -d ${DIR_GCNO} -o "${FILE_INFO_MILVUS}" -c ${LCOV_CMD} -d ${DIR_GCNO} -o "${FILE_INFO_MILVUS}" -c
# merge coverage # merge coverage
${LCOV_CMD} -a ${FILE_INFO_BASE} -a ${FILE_INFO_MILVUS} -o "${FILE_INFO_OUTPUT}" ${LCOV_CMD} -a ${FILE_INFO_BASE} -a ${FILE_INFO_MILVUS} -o "${FILE_INFO_OUTPUT}"
......
...@@ -23,7 +23,7 @@ namespace { ...@@ -23,7 +23,7 @@ namespace {
GpuCacheMgr::GpuCacheMgr() { GpuCacheMgr::GpuCacheMgr() {
server::ConfigNode& config = server::ServerConfig::GetInstance().GetConfig(server::CONFIG_CACHE); server::ConfigNode& config = server::ServerConfig::GetInstance().GetConfig(server::CONFIG_CACHE);
int64_t cap = config.GetInt64Value(server::CONFIG_GPU_CACHE_CAPACITY, 2); int64_t cap = config.GetInt64Value(server::CONFIG_GPU_CACHE_CAPACITY, 0);
cap *= G_BYTE; cap *= G_BYTE;
cache_ = std::make_shared<Cache>(cap, 1UL<<32); cache_ = std::make_shared<Cache>(cap, 1UL<<32);
......
...@@ -304,7 +304,7 @@ ServerConfig::CheckCacheConfig() { ...@@ -304,7 +304,7 @@ ServerConfig::CheckCacheConfig() {
okay = false; okay = false;
} }
std::string gpu_cache_capacity_str = cache_config.GetValue(CONFIG_GPU_CACHE_CAPACITY, "5"); std::string gpu_cache_capacity_str = cache_config.GetValue(CONFIG_GPU_CACHE_CAPACITY, "0");
if (ValidationUtil::ValidateStringIsNumber(gpu_cache_capacity_str) != SERVER_SUCCESS) { if (ValidationUtil::ValidateStringIsNumber(gpu_cache_capacity_str) != SERVER_SUCCESS) {
std::cerr << "ERROR: gpu_cache_capacity " << gpu_cache_capacity_str << " is not a number" << std::endl; std::cerr << "ERROR: gpu_cache_capacity " << gpu_cache_capacity_str << " is not a number" << std::endl;
okay = false; okay = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册