Repository navigation
[0-size Tensor No.248] Add 0-size Tensor support for reshape - #73165
Merged
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Contributor
Author
|
/re-run all-failed |
Contributor
Author
|
/re-run all-failed |
Contributor
Author
|
@DanielSun11 CI已完成请review |
Contributor
|
x numel为0,shape numel 不为0,torch会报错。 请 @wanghuancoder 关注https://github.com/PFCCLab/PaddleAPITest/blob/480b501e1fd3c480e173284c8a94d15a5c42546e/tester/paddle_to_torch/rules.py#L4641 此处 |
shanjiang7
pushed a commit
to shanjiang7/Paddle
that referenced
this pull request
Jun 12, 2025
This was referenced Jul 4, 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
[0-size Tensor No.248] Add 0-size Tensor support for reshape
paddle/phi/kernels/reshape_grad_kernel.cc 中对所有backend注册

PaddleAPITest 测试没有cuda error, torch 和 paddle都有shape检查

如果x numel为0,shape numel不为0,torch没有错误,这是因为PaddleAPITest有修改torch规则配置,返回为全0
https://github.com/PFCCLab/PaddleAPITest/blob/480b501e1fd3c480e173284c8a94d15a5c42546e/tester/paddle_to_torch/rules.py#L4641