diff --git a/lite/api/paddle_api.h b/lite/api/paddle_api.h index 339117cd503247a91694d1a9ca63b930af5658de..a014719c5783bcec3988bba65c53cc8cf52f0b4c 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 4d0aefbc06a9d0678d8b401629b7cc4355967f6c..cb9360b16daec86a3746343df6b8bd8edf6dce7c 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)}});