Skip to content

4th-batch-73-代码存在逻辑缺失#75790

Merged
luotao1 merged 1 commit intoPaddlePaddle:developfrom
ApricityXX:4th_batch_73
Oct 14, 2025
Merged

4th-batch-73-代码存在逻辑缺失#75790
luotao1 merged 1 commit intoPaddlePaddle:developfrom
ApricityXX:4th_batch_73

Conversation

@ApricityXX
Copy link
Copy Markdown
Contributor

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

第四批-编号73(共1个)
代码在 RunKernelFunc 函数中,遍历自定义算子的属性并根据字符串类型 attr_type_str 进行分发处理。尽管错误消息明确列出 double 是支持的类型,但在所有 else if 分支中并没有对 "double"attr_type_str == "double" 的判断逻辑,因此当属性类型为 double 时会进入 else 分支并抛出 Unimplemented 错误。
修改后增加了对 attr_type_str == "double" 的分支处理,调用 ctx.Attr<double>(attr_name) 将其添加到 kernel_ctx
'- 增加了对 std::vector<double> 的支持(可选但建议),以保持与其它浮点类型的对称性。
'- 更新错误提示信息中的类型列表,加入 std::vector<double>,避免误导用户。
'- 此修复确保了文档/错误提示中声称支持的 double 类型真正被实现。

@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Oct 12, 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 Oct 12, 2025
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@2c02b6c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
paddle/fluid/framework/custom_operator.cc 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) 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   #75790   +/-   ##
==========================================
  Coverage           ?    0.00%           
==========================================
  Files              ?        1           
  Lines              ?        4           
  Branches           ?        0           
==========================================
  Hits               ?        0           
  Misses             ?        4           
  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.

@sneaxiy
Copy link
Copy Markdown
Collaborator

sneaxiy commented Oct 14, 2025

LGTM for coverage.

@luotao1 luotao1 merged commit a17b4a3 into PaddlePaddle:develop Oct 14, 2025
104 of 109 checks passed
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.

6 participants