Skip to content

Conversation

@DanielSun11
Copy link
Contributor

@DanielSun11 DanielSun11 commented Jul 15, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

  • 修复了nonzero dtype和torch不对齐的问题。
  • 修复了zeropad2d的报错
  • __getitem__部分case存在问题,因为调用gather_grad中没有修全
  • __setitem__调用的kernel之前已经被修复过了。

__getitem__:
image

__setitem__:
image

nonzeros:
image

zeropad2d:
image

pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Jul 15, 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.

@DanielSun11 DanielSun11 changed the title [0-size Tensor No. 233、238、276、281 、324] Add 0-size Tensor support for zeropad2d、nonzero、__getitem__、__setitem__、trapezoid API [0-size Tensor No. 233、238、276、281 、324] Add 0-size Tensor support for zeropad2d、nonzero、__getitem__、__setitem__ API Jul 15, 2025
@DanielSun11 DanielSun11 marked this pull request as ready for review July 15, 2025 13:42
@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
paddle/phi/kernels/cpu/nonzero_kernel.cc 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #74057   +/-   ##
==========================================
  Coverage           ?    0.00%           
==========================================
  Files              ?        1           
  Lines              ?        1           
  Branches           ?        0           
==========================================
  Hits               ?        0           
  Misses             ?        1           
  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.

@DanielSun11 DanielSun11 merged commit 302bef7 into PaddlePaddle:develop Jul 18, 2025
104 of 109 checks passed
co63oc pushed a commit to co63oc/Paddle that referenced this pull request Jul 18, 2025
…r zeropad2d、nonzero、__getitem__、__setitem__ API (PaddlePaddle#74057)

* fix nonzero dtype error

* fix __geitem__ and zeropad2d

* add zeropad2d unittest
@DanielSun11 DanielSun11 deleted the fix_0size715 branch September 18, 2025 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants