From 11d81a7d07a63e9d6cefa31662dbe49303943d5d Mon Sep 17 00:00:00 2001 From: jiweibo Date: Thu, 23 Apr 2020 08:07:37 +0000 Subject: [PATCH] test=develop --- lite/api/cxx_api_impl.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lite/api/cxx_api_impl.cc b/lite/api/cxx_api_impl.cc index 152af06355..154f5c5770 100644 --- a/lite/api/cxx_api_impl.cc +++ b/lite/api/cxx_api_impl.cc @@ -54,13 +54,14 @@ void CxxPaddleApiImpl::Init(const lite_api::CxxConfig &config) { #if (defined LITE_WITH_X86) && (defined PADDLE_WITH_MKLML) && \ !(defined LITE_ON_MODEL_OPTIMIZE_TOOL) - int num_threads = config.x86_math_library_num_threads(); - int real_num_threads = num_threads > 1 ? num_threads : 1; +// int num_threads = config.x86_math_library_num_threads(); +// int real_num_threads = num_threads > 1 ? num_threads : 1; + int real_num_threads=1; paddle::lite::x86::MKL_Set_Num_Threads(real_num_threads); omp_set_num_threads(real_num_threads); VLOG(3) << "set_x86_math_library_math_threads() is set successfully and the " "number of threads is:" - << num_threads; + << real_num_threads; #endif } -- GitLab