Skip to content

[Accuracy diff No.42、118] Fix accuracy diff for paddle.nn.functional.embedding API #73445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Jun 18, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

Pytorch 中 padding_idx 并不会导致前向输出为 0,会保持为原来的 weight,只是反向不会贡献对应 weight 的梯度,所以前向 kernel 不需要考虑 padding_idx 的值
https://docs.pytorch.org/docs/stable/generated/torch.nn.functional.embedding.html
https://github.com/pytorch/pytorch/blob/6959b5febe090375e261e678902681533d2e2528/aten/src/ATen/native/Embedding.cpp#L37-L55

PaddleAPITest 测试通过
图片

TODO

Copy link

paddle-bot bot commented Jun 18, 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 18, 2025
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Jun 19, 2025
@ooooo-create
Copy link
Contributor Author

/re-run all-failed

@ooooo-create ooooo-create changed the title [Accuracy diff No.118] Fix accuracy diff for paddle.nn.functional.embedding API [Accuracy diff No.42、118] Fix accuracy diff for paddle.nn.functional.embedding API Jun 19, 2025
@ooooo-create ooooo-create force-pushed the accuracy_embedding branch 3 times, most recently from c49ca5f to 91df9aa Compare June 21, 2025 13:11
@ooooo-create
Copy link
Contributor Author

/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@0c29fe4). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #73445   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  Lines              ?         5           
  Branches           ?         0           
===========================================
  Hits               ?         5           
  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.

@ooooo-create
Copy link
Contributor Author

/re-run all-failed

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