Skip to content

Commit

Permalink
fix optimizer.py (#34431)
Browse files Browse the repository at this point in the history
  • Loading branch information
sljlp committed Jul 28, 2021
1 parent 995195f commit 0fb15d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/paddle/fluid/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4637,7 +4637,7 @@ def _add_op_device_attr_for_op(self, op, idx, block):
elif self._is_weight_decay_op(op) and op.type == 'scale':
# set AdamW decay_coeff to device:all
op._set_attr(self._op_device_key, f"{self._device}:all")
elif op.type == "alloc_float_status":
elif op.type == "alloc_float_status" or op.type == "clear_float_status":
op._set_attr(self._op_device_key, f"{self._device}:all")
else:
other_known_ops = [
Expand Down

0 comments on commit 0fb15d9

Please sign in to comment.