Skip to content

Conversation

chenwhql
Copy link
Contributor

添加异构kernel迁移的英文文档

@paddle-bot
Copy link

paddle-bot bot commented Aug 18, 2022

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

The migration work is to rewrite the OpKernel implementation of the corresponding heterogeneous device or third-party library originally implemented in the `paddle/fluid/operators` directory into a functional Kernel in the form of PHI Kernel, and place it in the `paddle/phi/kernels` directory or the kernels directory of the external CustomDevice repo. Specifically, taking `log_softmax` Op as an example, for different device backends, the objects to be migrated and their placement positions are as follows:

- XPU: `paddle/fluid/operators/log_softmax_op_xpu.cc` modified and migrated to `paddle/phi/kernels/xpu/log_softmax_kernel.cc & log_softmax_grad_kernel.cc`
- MKLDNN: `paddle/fluid/operators/mkldnn/`log_softmax_mkldnn_op`.cc` modified and migrated to `paddle/phi/kernels/onednn/log_softmax_kernel.cc`
Copy link
Contributor

Choose a reason for hiding this comment

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

log_softmax_mkldnn_op.cc,是不是多加了引号

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done,thx

@chenwhql chenwhql requested a review from zyfncg August 18, 2022 08:57

Secondly, it is necessary to replace some of the types or functions that were only used in fluid in the original function implementation with the corresponding types or functions in PHI. The mapping relationship of some replacements are as follows:

| fluid 写法 | phi 写法 |
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的中文需要替换吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

必须的,done,关键!

@chenwhql chenwhql merged commit 398ea5f into PaddlePaddle:develop Aug 18, 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.

3 participants