Skip to content

Conversation

@gouzil
Copy link
Member

@gouzil gouzil commented Mar 19, 2024

PR types

Bug fixes

PR changes

Others

Description

适配 paddle.normal API, 并打开 TestNoBackwardAPIStatic.test_normal 单测

相关链接:

@paddle-bot
Copy link

paddle-bot bot commented Mar 19, 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.

@paddle-bot paddle-bot bot added the contributor External developers label Mar 19, 2024
"If std is Tensor, it's data type only support float32, float64.",
)
if shape is not None:
check_shape(shape, 'normal')
Copy link
Member

Choose a reason for hiding this comment

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

744 行改回 if not in_dynamic_mode(): 可以么?这样 PIR 下少了很多检查,当然 Variable 相关位置需要加一下 Value

self.std, np.ndarray
):
with paddle.static.program_guard(paddle.static.Program()):
with paddle.static.program_guard(main_program):
Copy link
Member

Choose a reason for hiding this comment

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

这里为啥改成同一个 Program 了啊

Copy link
Member Author

Choose a reason for hiding this comment

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

这里只可能跑到一种

Copy link
Member

Choose a reason for hiding this comment

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

喔,不过人家原来也没错啊,为啥要改

Copy link
Member Author

@gouzil gouzil Mar 19, 2024

Choose a reason for hiding this comment

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

我记得这玩意之前有点问题来着,不会切换还是啥的

Copy link
Member

Choose a reason for hiding this comment

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



class TestNormalErrors(unittest.TestCase):
def test_errors(self):
Copy link
Member

Choose a reason for hiding this comment

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

这里现在是不能加嘛?

Copy link
Member Author

Choose a reason for hiding this comment

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

补上了

@gouzil gouzil changed the title [PIR] supper normal and fix TestNoBackwardAPIStatic.test_normal UT [PIR] support normal and fix TestNoBackwardAPIStatic.test_normal UT Mar 19, 2024
XieYunshen
XieYunshen previously approved these changes Mar 20, 2024
@SigureMo
Copy link
Member

Coverage 已过,可以 rename 回原来的名字了~

Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

LGTMeow 🐾

@SigureMo SigureMo merged commit b809787 into PaddlePaddle:develop Mar 21, 2024
@gouzil gouzil deleted the fix_test_zero_dim_6 branch April 10, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants