Repository navigation
【PIR API adaptor No.31】Migrate paddle.distribution.Normal into pir - #59910
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Closed
MarioLulab
reviewed
Dec 12, 2023
Collaborator
There was a problem hiding this comment.
nice work ,希望下面的 comment 能帮助你解决现在碰到的问题
- 关于 paddle.distribution.Normal 的迁移,需要同时适配 class Distribution 和 class Normal。可以参考 #59922
- test/distribution/test_distribution_normal.py 文件里
NormalTest单测及其派生单测,也可以参考 #59922 来进行适配。我的方法是新建了一个上下文管理器InitDataContextManager,可以根据当前所处模式,指定在哪个 program 里构图。在NormalTest派生类的 init_static_data 方法里调用InitDataContextManager. 这个方法仅供参考,如果大佬有更好的方法,欢迎提出~ 😄 - 关于
TestNormalSampleStaic和TestNormalRSampleStaic单测,旧 ir 和 pir 不好作统一。建议重新写一份 pir 模式下的单测
MarioLulab
reviewed
Dec 25, 2023
MarioLulab
reviewed
Dec 25, 2023
0x45f
reviewed
Dec 26, 2023
| type(arg) | ||
| ) | ||
| ) | ||
| if isinstance(arg, paddle.base.libpaddle.pir.Value): |
Collaborator
There was a problem hiding this comment.
这里为什么要对Value特殊处理呢?老静态图的Variable是怎么处理的呢?
|
|
||
| dtype = tmp.dtype | ||
| for arg in numpy_args: | ||
| if isinstance(arg, paddle.base.libpaddle.pir.Value): |
|
Sorry to inform you that ddaadc9's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
YuanRisheng
approved these changes
Jan 16, 2024
18 of 24 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 types
Others
PR changes
APIs
Description
link #58067
PIR API 推全升级
将 paddle.distribution.Normal 迁移升级至 pir,并更新单测
单测覆盖率: 13/13