diff --git a/python/paddle/fluid/optimizer.py b/python/paddle/fluid/optimizer.py index 4fcbdee70e15f..eb2852db188c8 100755 --- a/python/paddle/fluid/optimizer.py +++ b/python/paddle/fluid/optimizer.py @@ -4897,7 +4897,7 @@ def _rename_gradient_var_name(self, block): input_names = op.input_arg_names output_names = op.output_arg_names in_out_names = input_names + output_names - if op.type == 'cast': continue + if op.type == 'cast' or op.type == "c_sync_comm_stream": continue # append "MERGED" to the names of parameter gradients, # and mofify the op_role_var attribute (by rename_arg func). for name in in_out_names: