Repository navigation
[0-size Tensor No.112] Add 0-size Tensor support for multi_dot - #73122
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
DanielSun11
reviewed
Jun 6, 2025
| class TestMultiDotOp_ZeroSize(TestMultiDotOp): | ||
| def init_shape(self): | ||
| self.A_shape = (2, 0) | ||
| self.B_shape = (0, 4) |
Contributor
There was a problem hiding this comment.
多加几个单测,验证一下(可能需要三个及以上矩阵连乘)
- out 的numel不为0,但是某一个x的 numel为0的情况,其他x的numel不为0
- out 的numel0,但是存在x的numel不为0的情况
| for (size_t i = 0; i < n; i++) { | ||
| if (dx[i]->numel() > 0) { | ||
| phi::Full<T, Context>( | ||
| ctx, phi::IntArray(common::vectorize(dx[i]->dims())), 0, dx[i]); |
Collaborator
|
请解决下冲突 |
wanghuancoder
approved these changes
Jun 11, 2025
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 Category
Execute Infrastructure
PR Types
Improvements
Description
删除文件中重复版权
修改前向和反向
infermeta没有修改
kernel 使用impl中实现,前向和反向都在一个文件
multi_dot 修改impl中调用
PaddleAPITest 测试torch error
