Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Zero-Dim] Optimize input 0D Tensor UnitCase #48007

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

zhwesky2010
Copy link
Contributor

@zhwesky2010 zhwesky2010 commented Nov 15, 2022

PR types

New features

PR changes

APIs

Describe

  1. 增加一些一元API的测试用例
  2. 完善测试公共函数,适应更多情形,方便其他人增加用例

@paddle-bot
Copy link

paddle-bot bot commented Nov 15, 2022

你的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.

@zhwesky2010 zhwesky2010 force-pushed the 0d_unary_binary branch 3 times, most recently from 1a2d7d2 to 261b7e4 Compare November 18, 2022 06:58
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] Support input 0D Tensor for some api [Zero-Dim] Add and fix input 0D Tensor TestCase for some api Nov 18, 2022
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] Add and fix input 0D Tensor TestCase for some api [Zero-Dim] Add input 0D Tensor case for some api Nov 20, 2022
@zhwesky2010 zhwesky2010 force-pushed the 0d_unary_binary branch 2 times, most recently from 9b5fb62 to a5b8cfe Compare November 21, 2022 03:08
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] Add input 0D Tensor case for some api [Zero-Dim] Optimize 0D Tensor unitcase Nov 23, 2022
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] Optimize 0D Tensor unitcase [Zero-Dim] Optimize 0D Tensor UnitCase Nov 23, 2022
@zhwesky2010 zhwesky2010 changed the title [Zero-Dim] Optimize 0D Tensor UnitCase [Zero-Dim] Optimize input 0D Tensor UnitCase Nov 23, 2022
self.assertEqual(result[0].shape, ())
self.assertEqual(result[1].shape, ())
self.assertEqual(result[3].shape, (1,))
if len(result) == 3:
self.assertEqual(result[2].shape, (1,))
Copy link
Contributor

Choose a reason for hiding this comment

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

why out_grad's shape is set to (1,) instead of ()

Copy link
Contributor Author

@zhwesky2010 zhwesky2010 Nov 23, 2022

Choose a reason for hiding this comment

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

一个已知问题。有个底层函数的问题,现在还有点单测不兼容,等输入0D完成后我会改正这个地方。

Copy link
Contributor

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

@zhwesky2010 zhwesky2010 merged commit 4f975b4 into PaddlePaddle:develop Nov 24, 2022
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.

None yet

2 participants