diff --git a/paddle/fluid/pybind/global_value_getter_setter.cc b/paddle/fluid/pybind/global_value_getter_setter.cc index 57ae90688e7689..1b4e23bdf39fe4 100644 --- a/paddle/fluid/pybind/global_value_getter_setter.cc +++ b/paddle/fluid/pybind/global_value_getter_setter.cc @@ -294,11 +294,6 @@ struct RegisterGetterSetterVisitor { }; static void RegisterGlobalVarGetterSetter() { -#ifdef PADDLE_WITH_DITRIBUTE - REGISTER_PUBLIC_GLOBAL_VAR(FLAGS_rpc_get_thread_num); - REGISTER_PUBLIC_GLOBAL_VAR(FLAGS_rpc_prefetch_thread_num); -#endif - const auto &flag_map = phi::GetExportedFlagInfoMap(); for (const auto &pair : flag_map) { const std::string &name = pair.second.name;