Skip to content

[0 SIZE] Add zero-size input validation for WarpCTC kernel#78316

Merged
DrRyanHuang merged 5 commits intoPaddlePaddle:developfrom
cattidea:zero_size/ctc_loss
Mar 23, 2026
Merged

[0 SIZE] Add zero-size input validation for WarpCTC kernel#78316
DrRyanHuang merged 5 commits intoPaddlePaddle:developfrom
cattidea:zero_size/ctc_loss

Conversation

@DrRyanHuang
Copy link
Copy Markdown
Contributor

@DrRyanHuang DrRyanHuang commented Mar 16, 2026

PR Category

Execute Infrastructure

PR Types

Improvements

Description

针对 ctc_loss 的 0 Size 问题做出如下改动:

paddle/phi/kernels/impl/warpctc_kernel_impl.h

  • 新增对 labelslogits_lengthlabels_length 三个输入的 batch_size 校验

test/legacy_test/test_warpctc_op.py

  • 新增 test_dygraph_zero_size_with_padding 单测用例

是否引起精度变化

@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Mar 16, 2026

你的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.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@f14fff2). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff             @@
##             develop    #78316   +/-   ##
===========================================
  Coverage           ?   100.00%           
===========================================
  Files              ?         1           
  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.

zrr1999
zrr1999 previously approved these changes Mar 17, 2026
@DrRyanHuang DrRyanHuang requested review from SigureMo and zrr1999 March 20, 2026 09:14
Copy link
Copy Markdown
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

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

LGTM

@DrRyanHuang DrRyanHuang merged commit fc06b80 into PaddlePaddle:develop Mar 23, 2026
120 of 130 checks passed
@DrRyanHuang DrRyanHuang deleted the zero_size/ctc_loss branch March 23, 2026 06:21
ShigureNyako pushed a commit to ShigureNyako/Paddle that referenced this pull request Mar 23, 2026
@ShigureNyako
Copy link
Copy Markdown
Contributor

✅ Cherry-pick successful! Created PR: #78435

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants