Skip to content

Conversation

@co63oc
Copy link
Contributor

@co63oc co63oc commented Jun 20, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

[0-size Tensor Job2 No.15] Add 0-size Tensor support for paddle.gather

修改infermeta, 符号推导中对index使用的是product,已包含维度为0的逻辑不用修改

bool GatherOpInferSymbolicShape(pir::Operation *op,

修改前向和反向,反向填充0
PaddleAPITest中Rule是paddle自定义https://github.com/PFCCLab/PaddleAPITest/blob/6576bb1a5e90a1c99322cabcf317411c518eb82e/tester/paddle_to_torch/rules.py#L2499
image

PaddleAPITest测试为numpy error, torch error
image
image

@paddle-bot
Copy link

paddle-bot bot commented Jun 20, 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 20, 2025
@co63oc co63oc changed the title CI测试不review paddle.gather [0-size Tensor Job2 No.15] Add 0-size Tensor support for paddle.gather Jun 30, 2025
@co63oc co63oc changed the title [0-size Tensor Job2 No.15] Add 0-size Tensor support for paddle.gather [0-size Tensor Job2 No.15、84] Add 0-size Tensor support for paddle.gather Jun 30, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2025

Codecov Report

Attention: Patch coverage is 38.46154% with 8 lines in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
paddle/phi/kernels/cpu/gather_grad_kernel.cc 0.00% 5 Missing ⚠️
paddle/phi/kernels/cpu/gather_kernel.cc 33.33% 2 Missing ⚠️
paddle/phi/infermeta/binary.cc 80.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (38.46%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #73483   +/-   ##
==========================================
  Coverage           ?   38.46%           
==========================================
  Files              ?        3           
  Lines              ?       13           
  Branches           ?        0           
==========================================
  Hits               ?        5           
  Misses             ?        8           
  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.

@co63oc
Copy link
Contributor Author

co63oc commented Jun 30, 2025

/re-run all-failed

@co63oc
Copy link
Contributor Author

co63oc commented Jul 2, 2025

/re-run all-failed

@co63oc co63oc changed the title [0-size Tensor Job2 No.15、84] Add 0-size Tensor support for paddle.gather [0-size Tensor Job2 No.15、84] Add 0-size Tensor support for paddle.gather [fluid_ops] Jul 2, 2025
@co63oc
Copy link
Contributor Author

co63oc commented Jul 2, 2025

/re-run all-failed

@co63oc
Copy link
Contributor Author

co63oc commented Jul 3, 2025

@DanielSun11 这个PR可以review @luotao1

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Jul 3, 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

@DanielSun11 DanielSun11 merged commit 71c518c into PaddlePaddle:develop Jul 4, 2025
53 of 54 checks passed
@co63oc co63oc deleted the f27 branch July 10, 2025 05:40
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