Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuqin1998 committed Oct 8, 2024
1 parent a2ae3a3 commit 5c6d75d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/paddle/distributed/auto_parallel/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,8 @@ def state_dict(self):

def _append_optimize_op(self, block, param_and_grad):
if (
in_dygraph_mode()
in_auto_parallel_align_mode() # In align mode, we use enable_delay_scale_loss by default
and in_dygraph_mode()
and param_and_grad[1].is_dist()
):
placements = param_and_grad[1].placements
Expand Down

0 comments on commit 5c6d75d

Please sign in to comment.