diff --git a/lite/api/cxx_api_impl.cc b/lite/api/cxx_api_impl.cc index 152af063551a83d4e75bd9af8093b480da3c7d0c..154f5c57702e91cc4144e70d99f340ffabfb7ed5 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 }