Skip to content

Conversation

@co63oc
Copy link
Contributor

@co63oc co63oc commented Jun 22, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

torch 返回使用1填充

import torch
out = torch.prod(torch.randn([2,0,3]))
print(out)

tensor(1.)

python/paddle/tensor/math.py 修改判断axis如果为Tensor并且shape为[0],返回x,PaddleAPITest中是循环axis计算,返回实际也是x
https://github.com/PFCCLab/PaddleAPITest/blob/8211bf81028e55b5294b44f097d0a6ea39829bee/tester/paddle_to_torch/rules.py#L4288
image
image

PaddleAPITest测试通过
image

@paddle-bot
Copy link

paddle-bot bot commented Jun 22, 2025

你的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 Jun 22, 2025
@co63oc
Copy link
Contributor Author

co63oc commented Jun 22, 2025

/re-run all-failed

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (develop@3c5a95c). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #73525   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         2           
  Lines              ?         6           
  Branches           ?         0           
===========================================
  Hits               ?         6           
  Misses             ?         0           
  Partials           ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Jun 23, 2025
Copy link
Contributor

@DanielSun11 DanielSun11 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit ec64780 into PaddlePaddle:develop Jun 24, 2025
49 of 50 checks passed
@co63oc co63oc deleted the f36 branch June 30, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants