From eb72b6f4943f90216c9f3d8a8b7e1d7942211ce2 Mon Sep 17 00:00:00 2001 From: liu zhengxi <380185688@qq.com> Date: Mon, 23 Dec 2019 10:15:45 +0800 Subject: [PATCH] fix_typo in set_cpu_math_library_num_threads, test=develop (#2642) --- lite/api/paddle_api.h | 2 +- lite/api/test_step_rnn_lite_x86.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lite/api/paddle_api.h b/lite/api/paddle_api.h index 339117cd50..a014719c57 100644 --- a/lite/api/paddle_api.h +++ b/lite/api/paddle_api.h @@ -153,7 +153,7 @@ class LITE_API CxxConfig : public ConfigBase { std::string param_file() const { return param_file_; } bool model_from_memory() const { return model_from_memory_; } - void set_cpu_math_library_math_threads(int threads) { + void set_cpu_math_library_num_threads(int threads) { cpu_math_library_math_threads_ = threads; } int cpu_math_library_num_threads() const { diff --git a/lite/api/test_step_rnn_lite_x86.cc b/lite/api/test_step_rnn_lite_x86.cc index 4d0aefbc06..cb9360b16d 100644 --- a/lite/api/test_step_rnn_lite_x86.cc +++ b/lite/api/test_step_rnn_lite_x86.cc @@ -30,7 +30,7 @@ TEST(Step_rnn, test_step_rnn_lite_x86) { std::string model_dir = FLAGS_model_dir; lite_api::CxxConfig config; config.set_model_dir(model_dir); - config.set_cpu_math_library_math_threads(10); + config.set_cpu_math_library_num_threads(1); config.set_valid_places({lite_api::Place{TARGET(kX86), PRECISION(kInt64)}, lite_api::Place{TARGET(kX86), PRECISION(kFloat)}, lite_api::Place{TARGET(kHost), PRECISION(kFloat)}}); -- GitLab