Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【PIR】modify backward for controlflow op #59020

Merged
merged 8 commits into from
Nov 16, 2023

Conversation

xiaoguoguo626807
Copy link
Contributor

PR types

others

PR changes

others

Description

pcard-67164
修改backward部分逻辑以适配控制流反向

if op don't has grad_op, if it don't has input and it's output has more than
one output_grad, add sumop for grad aggregation.
if op don't has grad_op:
if it don't has input and it's output has more than
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if it don't has input and it's output has more than
if it doesn't has input and its output has more than

后续PR可以连带修改下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

@@ -317,7 +317,12 @@ def inverse_sort_op(ops):


def append_backward_ops(
block, effective_forward_ops, no_grad_set, backward_ops, state
fwd_block,
Copy link
Contributor

Choose a reason for hiding this comment

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

fwd_block 在函数里没有用到么?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

控制流分支会用到,现在还缺接口该分支未实现

@xiaoguoguo626807 xiaoguoguo626807 merged commit dc9e4ed into PaddlePaddle:develop Nov 16, 2023
28 checks passed
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
* add refresh stopgradint

* add refresh stopgradint

* modofy

* modify backward

* modify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants