Skip to content

Conversation

algorithm1832
Copy link
Contributor

PR Category

Custom Device

PR Types

Improvements

Description

  • Add box_clip_kernel.h file
  • Include the .h file in the kernel's CPU and GPU realization

另外有个小问题:
CPU实现注册的是phi::BoxClipKernel,GPU实现注册的是phi::GPUBoxClipKernel,名称不同。那么:

  • 我要写入头文件的应该是GPUBoxClipKernel对吧?
  • 那它是不是应当为仅GPU实现的Kernel,还是CPU和GPU均实现的Kernel?
  • 我是不是不需要在CPU实现中include此头文件?

@algorithm1832
Copy link
Contributor Author

Related PaddleCustomDevice PR: #2021
After this PR being merged I will mark the above PR as ready

@paddle-bot paddle-bot bot added the contributor External developers label Sep 28, 2025
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 29, 2025
Copy link
Contributor

@YqGe585 YqGe585 left a comment

Choose a reason for hiding this comment

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

Q1: 我要写入头文件的应该是GPUBoxClipKernel对吧?
A1: 是的。

Q2: 那它是不是应当为仅GPU实现的Kernel,还是CPU和GPU均实现的Kernel?
A2: 这种视为仅GPU实现,头文件可以放在gpu目录下。

Q3: 我是不是不需要在CPU实现中include此头文件?
A3: 不需要在CPU实现中include。CPU可以什么都不改。

@algorithm1832
Copy link
Contributor Author

非常感谢!已优化代码

Copy link
Contributor

@YqGe585 YqGe585 left a comment

Choose a reason for hiding this comment

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

LGTM

@algorithm1832
Copy link
Contributor Author

/re-run all-failed

@luotao1 luotao1 merged commit 74f65f4 into PaddlePaddle:develop Sep 30, 2025
72 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants