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

Add custom device en docs #4706

Merged
merged 5 commits into from
May 6, 2022

Conversation

windstamp
Copy link
Contributor

Add custom device en docs

@paddle-bot-old
Copy link

Thanks for your contribution!

@windstamp windstamp force-pushed the plugin_device_en branch 2 times, most recently from efbbea5 to 3adbfd1 Compare April 29, 2022 06:09
@windstamp windstamp force-pushed the plugin_device_en branch from 34a4216 to 97686dd Compare May 5, 2022 07:57
@@ -0,0 +1,462 @@
# Example of Device Access
Copy link
Contributor

Choose a reason for hiding this comment

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

这里改成 CustomDevice Tutorial 或者是 CustomDevice Example吧,一般很少有"Device Access"这样的说法

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, thanks.

改成了 CustomDevice Example。

@@ -0,0 +1,462 @@
# Example of Device Access

This section will talk about how to implement a CustomDevice plug-in and add a new device backend for PaddlePaddle. How to compile, package, install, and use the backend will also be introduced.
Copy link
Contributor

Choose a reason for hiding this comment

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

In this section we will walk through the steps required to extend a fake hardware backend for PaddlePaddle by implementing a fake device named CustomCPU.

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, thanks.

> Note:
> - Please make sure that you have correctly installed the latest version of [Paddle develop](https://github.com/PaddlePaddle/Paddle).
> - Only `Linux` is supported
> - PaddlePaddle can have the custom kernel code and registration of open functional statements in heder files.
Copy link
Contributor

Choose a reason for hiding this comment

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

这里第三条可以中英文都去掉,这个用户自己没有办法检查,我们自己来保证WHL包的交付就行

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, thanks.

```

> Note:
> 1. When the backend is accessed through the custom runtime, the backend parameter must be the same as its name.
Copy link
Contributor

Choose a reason for hiding this comment

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

accessed 改成 registered 或者 extended

Copy link
Contributor Author

@windstamp windstamp May 5, 2022

Choose a reason for hiding this comment

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

Done, thanks.

改成了 registered。

@@ -0,0 +1,19 @@
#############################
Custom Device Access Guide
Copy link
Contributor

Choose a reason for hiding this comment

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

改成 Custom Device Support

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, thanks.

Custom Device Access Guide
#############################

The custom device access decouples the framework from the device and makes it available to extend the backend of the PaddlePaddle device via plug-ins. In this way, developers can make a plug-in for PaddlePaddle only by implementing the standard API and compiling it into a dynamic-link library, instead of by modifying the code of PaddlePaddle. Now it is easier to develop hardware backends for PaddlePaddle.
Copy link
Contributor

Choose a reason for hiding this comment

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

access -> function

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, thanks.

把第7行的也一起改了一下。


- `Custom Runtime <./custom_runtime_en.html>`_ : Introduction of custom runtime of the PaddlePaddle framework
- `Custom Kernel <./custom_kernel_en.html>`_ : Introduction of custom kernel of the PaddlePaddle framework
- `Example of Device Access <./custom_device_example_en.html>`_ : To demonstrate how to connect new custom devices to PaddlePaddle
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的title也对应改一下,To demonstrate how to connect new custom devices to PaddlePaddle 改成 The tutorial of add a new custom device to PaddlePaddle

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, thanks.


The custom device access decouples the framework from the device and makes it available to extend the backend of the PaddlePaddle device via plug-ins. In this way, developers can make a plug-in for PaddlePaddle only by implementing the standard API and compiling it into a dynamic-link library, instead of by modifying the code of PaddlePaddle. Now it is easier to develop hardware backends for PaddlePaddle.

The custom device access is composed of custom runtime and custom kernel. With the two modules, users can connect new custom devices to PaddlePaddle according to their own needs.
Copy link
Contributor

Choose a reason for hiding this comment

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

access -> function

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, thanks.

Copy link
Contributor

@qili93 qili93 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

@TCChenlong TCChenlong merged commit 6cd0893 into PaddlePaddle:develop May 6, 2022
@windstamp windstamp deleted the plugin_device_en branch May 6, 2022 06:10
TCChenlong added a commit to TCChenlong/docs that referenced this pull request May 13, 2022
* Add custom device en docs

* Update index_en.rst

* Update index_en.rst

* Fix _cn to _en, and ##### to short

* optimieze

Co-authored-by: Chen Long <1300851984@qq.com>
TCChenlong added a commit that referenced this pull request May 13, 2022
* Add custom device en docs (#4706)

* Add custom device en docs

* Update index_en.rst

* Update index_en.rst

* Fix _cn to _en, and ##### to short

* optimieze

Co-authored-by: Chen Long <1300851984@qq.com>

* Update guides index (#4747)

* Update release_note_cn.md

* Update release_note_en.md

* Update release_note_en.md

* Update release_note_cn.md

* Update release_note_cn.md

* Update release_note_en.md

* update guides index

* update guides index

* update guides index

* fix api docs bugs test=document_fix

* update release note

Co-authored-by: furnace <34057289+windstamp@users.noreply.github.com>
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