From 3e8b32208d27d536d3713e6aca550a56fd9555cc Mon Sep 17 00:00:00 2001 From: ziyoujiyi <73728031+ziyoujiyi@users.noreply.github.com> Date: Tue, 20 Sep 2022 22:16:36 +0800 Subject: [PATCH] cherry-pick V2.4 (#46294) * back fl * delete ssl cert * . * make warning * . * unittest paral degree * solve unittest * heter & multi cloud commm ready * . * . * fix gloo compile warning * adapt for nn fl-ps * flps del fake-init op * add learning_rate_0 intializer op --- python/paddle/distributed/passes/ps_trainer_pass.py | 2 ++ python/paddle/distributed/ps/utils/ps_program_builder.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/distributed/passes/ps_trainer_pass.py b/python/paddle/distributed/passes/ps_trainer_pass.py index cdb377a72be..466730ae1a5 100755 --- a/python/paddle/distributed/passes/ps_trainer_pass.py +++ b/python/paddle/distributed/passes/ps_trainer_pass.py @@ -617,6 +617,8 @@ class DeleteExtraOptimizerPass(PassBase): for var in remote_optimize_vars: if var in local_optimize_vars: continue + if 'learning_rate_0' == var: + continue if var not in remote_optimize_op_role_vars: optimize_need_delete_vars.append(var) need_delete_optimize_vars = list(set(optimize_need_delete_vars)) diff --git a/python/paddle/distributed/ps/utils/ps_program_builder.py b/python/paddle/distributed/ps/utils/ps_program_builder.py index 53771b05cbf..0bd870ffee5 100755 --- a/python/paddle/distributed/ps/utils/ps_program_builder.py +++ b/python/paddle/distributed/ps/utils/ps_program_builder.py @@ -373,8 +373,8 @@ class FlPsProgramBuilder(HeterAsyncPsProgramBuilder): _main_file = ps_log_root_dir + '4_fl_worker_main_program.prototxt' #debug_program(_main_file, self.cloned_main) - fake_init_ops_pass = new_pass("fake_init_ops_pass", self.attrs) - fake_init_ops_pass.apply([None], [self.cloned_startup], self.pass_ctx) + #fake_init_ops_pass = new_pass("fake_init_ops_pass", self.attrs) + #fake_init_ops_pass.apply([None], [self.cloned_startup], self.pass_ctx) _main_file = ps_log_root_dir + '5_fl_worker_main_program.prototxt' #debug_program(_main_file, self.cloned_main) -- GitLab