Skip to content

Commit

Permalink
update, test=allcase
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxicoding committed Jul 15, 2021
1 parent 52f45b2 commit b5d5259
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions python/paddle/fluid/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4681,8 +4681,7 @@ def _check_validation(self, block):
valid_op_role_value)
if int(op_role) == int(self._op_role.Optimize):
in_optimize = True
# loss_grad op
if int(op_role) | int(self._op_role.Backward):
if int(op_role) == int(self._op_role.Backward):
in_forward = False

assert op.has_attr(self._op_device_key), (
Expand Down Expand Up @@ -4713,14 +4712,14 @@ def _check_validation(self, block):
# if stage is unordered, such as Forward(0 1 2 3 4 3 4), will report error
if in_forward:
assert interval >= 0, \
"Pipeline stage must be sequential increment in Forward, " \
"please check the stage of op={}".format(op)
"Pipeline stage must be sequential increment in Forward, prev_stage={}, " \
"please check the stage of op={}".format(pre_stage_id, op)
else:
# FIXME(wangxi): recompute failed
# FIXME(wangxi): recompute check failed
pass
#assert interval <=0, \
# "Pipeline stage must be sequential decrement in Backward, " \
# "please check the stage of op={}".format(op)
# "Pipeline stage must be sequential decrement in Backward, prev_stage={}, " \
# "please check the stage of op={}".format(pre_stage_id, op)
pre_stage_id = stage_id

return device_list
Expand Down

1 comment on commit b5d5259

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.