Skip to content

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.

好的


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
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
@xiaoguoguo626807 xiaoguoguo626807 deleted the grad branch June 4, 2025 06:06
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