You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的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.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Execute Infrastructure
PR Types
Bug fixes
Description
修改
ShareData
为一个 inplace OP,否则 Inplace Pass 识别不到 ShareData 的写语义,导致错误地将一个 OP 转为 inplace 的,导致输入错误被更新(比如单测里的u
被错误更新了)目前 Inplace Pass 处理的是有 bug 的,进而没有正确处理上面的情况,因此修改 inplace 判断策略
对于一个待替换的 OP
b
来说(黄色a
、c
已经遍历过,绿色b
正在遍历,蓝色d
、f
待遍历),最多可能的情况如图所示,但如果 OPd
存在,那么不会在b
进行 inplace,因为不是 eager deletion op我们会在遍历时维护一个
use_count_map
和一个inplace_map
,前者用于表示各个 Value 当前的引用计数(初始是Value.use_count()
,之后会逐渐递减),只有自身 use_count 为 0 且相应的 inplace Value use_count 也为 0 的情况才能将该 OP inplacecc @HydrogenSulfate
PCard-66972