Skip to content
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

Register custom kernel for some all_bakcend kernel #51639

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

zyfncg
Copy link
Contributor

@zyfncg zyfncg commented Mar 14, 2023

PR types

Others

PR changes

Others

Describe

Pcard-67742

PR51262的基础上,为flatten, numel, reshape, shape等设备无关kernel新增了Custom类型Kernel的注册。

@paddle-bot
Copy link

paddle-bot bot commented Mar 14, 2023

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

Copy link
Contributor

@jiahy0825 jiahy0825 left a comment

Choose a reason for hiding this comment

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

One comment


#ifdef PADDLE_WITH_CUSTOM_DEVICE
PD_REGISTER_KERNEL(shape,
Custom,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use ALL_BACKEND to register all backends directly?

Copy link
Contributor Author

@zyfncg zyfncg Mar 20, 2023

Choose a reason for hiding this comment

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

这个会在后面支持,目前会优先删除CustomDevice中的对应Kernel,看是否有机制问题暴露

Copy link
Contributor

@YuanRisheng YuanRisheng left a comment

Choose a reason for hiding this comment

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

这个是不是需要把PaddleCustomDevice里对应注册的Kernel删一下?

@zyfncg
Copy link
Contributor Author

zyfncg commented Mar 20, 2023

这个是不是需要把PaddleCustomDevice里对应注册的Kernel删一下?

是的,需要这里先注册上,PaddleCustomDevice里的kernel才能删

Copy link
Contributor

@jiahy0825 jiahy0825 left a comment

Choose a reason for hiding this comment

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

LGTM

@zyfncg zyfncg merged commit e8530a3 into PaddlePaddle:develop Mar 20, 2023
@zyfncg zyfncg deleted the reg_custom_kernel branch March 20, 2023 07:35
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.

4 participants