Skip to content

Conversation

@SigureMo
Copy link
Member

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

我们在添加反向之前的原始 program 就添加了 shadow output OP 以定位输出是哪些

在原来的逻辑中,在前反向切分时候仍然会将这些 OP 一并 clone 到新的前向 Program 中,对于这些 OP,我们没有必要重新添加 shadow output,因此在为输出添加 shadow output 时候就需要判断是否已经添加,但现在的判断逻辑是不鲁棒的,用于生成 name 的 counter 是完全对不上的

因此本 PR 在前反向切分时 clone OP 时跳过 shadow output,这样为输出创建 shadow output 时就没有必要再使用奇怪的逻辑去跳过了

PCard-66972

@paddle-bot
Copy link

paddle-bot bot commented Apr 22, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@2742195759 2742195759 left a comment

Choose a reason for hiding this comment

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

LGTM

@SigureMo SigureMo merged commit 53efde6 into PaddlePaddle:develop Apr 23, 2024
@SigureMo SigureMo deleted the dy2st/re-create-shadow-output-op-in-split-forward-backward branch April 23, 2024 02:39
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