Skip to content

Update kernel migrate doc #5257

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

Merged
merged 5 commits into from
Sep 8, 2022

Conversation

YuanRisheng
Copy link
Contributor

更新异构设备kernel迁移文档

@paddle-bot
Copy link

paddle-bot bot commented Sep 7, 2022

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5257.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:[Beta]飞桨文档预览工具

... 其他参数省略,
DenseTensor* out) {

if (std::is_same<T, uint8_t>::value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

这里是不是直接用PD_VISIT,或者switch case好一些,万一有啥扩展,else可能就不是float了,宁愿switch case到最后default PADDLE_THROW也更安全一些

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已完善示例代码

@YuanRisheng YuanRisheng merged commit e41b6aa into PaddlePaddle:develop Sep 8, 2022
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.

2 participants