-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【 Paddle Tensor 规范化第二期 】解决隐式广播不能够处理0-size的问题 #70369
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
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
mark,感觉很有意思. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加一个关于0-size的广播单测,x、y的形状包含0-size、0-Dim、非0-size,长度可以在0~7,与np.broadcast_shapes的结果进行对比即可。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for BroadcastKernel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
初步看 GetBroadcastDimsArray 的修改可能会对下列算子产生影响 MatrixRank、Atan2、CompareRaw、Complex、SendUERecv、SendUV、BroadcastOp,单测CI没有报错,有可能是因为这些算子单测没有覆盖0 size的情况 |
确实是如此🤔,后续需要检查这些算子吗,还是说会放到添加单测的那个开源任务去 |
PR Category
User ExperiencePR Types
Bug fixesDescription
先前的隐式广播是不能够处理输入存在维度为0的情况:


修改后:
测试代码