Skip to content

Conversation

@zhengshengning
Copy link
Contributor

@zhengshengning zhengshengning commented Jul 1, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

roi_align函数输出Tensor的shape为 [box[0], input[1], pooled_height, pooled_width],其中pooled_height, pooled_width 是都要大于0,所以需要对 input和box的numel为0时进行特殊处理。

修复前,存在cuda error(9) 问题,需要进行修复。
image

修复

  1. infermeta检查未发现错误
  2. 修复前向RoiPoolKernel、修复反向RoiPoolGradKernel,修改CPU与GPU实现,其他硬件没有发现对应实现
  3. 增加单测
  4. PaddleAPITest回测
    cuda error(9) 报错修复:
    使用--paddle_only 和 --accuracy 选项时,出现numpy error错误(不做处理)
    image
    pcard-67164

@paddle-bot
Copy link

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

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2025

CLA assistant check
All committers have signed the CLA.

Comment on lines 118 to 121
int channels = x_dims[1];
int height = x_dims[2];
int width = x_dims[3];
int rois_num = boxes.dims()[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

这里不应该将int64_t改为int。因为对于大Tensor而言,任何一个维度的大小都有可能超过int的上限。

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

@DanielSun11
Copy link
Contributor

请签署下CLA

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 6b7a596 into PaddlePaddle:develop Jul 9, 2025
54 checks passed
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