remove setting omp thread num (#4244)

Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
This commit is contained in:
shengjun.li 2020-11-18 09:50:43 +08:00 committed by GitHub
parent b3b9523420
commit 62ec0a9381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,22 +66,6 @@ KnowhereResource::Initialize() {
return Status(KNOWHERE_UNEXPECTED_ERROR, "FAISS hook fail, CPU not supported!");
}
// engine config
int64_t omp_thread = config.engine.omp_thread_num();
if (omp_thread > 0) {
omp_set_num_threads(omp_thread);
LOG_SERVER_DEBUG_ << "Specify openmp thread number: " << omp_thread;
} else {
int64_t sys_thread_cnt = 8;
if (milvus::server::GetSystemAvailableThreads(sys_thread_cnt)) {
// use half of the available threads
omp_thread = (sys_thread_cnt >> 1);
omp_set_num_threads(omp_thread);
LOG_SERVER_DEBUG_ << "Set openmp thread number: " << omp_thread;
}
}
// init faiss global variable
int64_t use_blas_threshold = config.engine.use_blas_threshold();
faiss::distance_compute_blas_threshold = use_blas_threshold;