Kaynağa Gözat

Add contribute docs (#2511)

* Add contribute docs

* Update docs name

* Fix deadlink

* Update docs

* Update docs

* Update docs

* Fix deadlink

* Update docs

* Update docs

* Update docs

* Update docs

* Update docs

* Update docs

* Update docs
wuzewu 1 yıl önce
ebeveyn
işleme
b8606e6ab2

+ 85 - 0
docs/other_devices_support/how_to_contribute_device.en.md

@@ -0,0 +1,85 @@
+# 1. More Device Support
+
+The prosperity of the PaddlePaddle ecosystem is inseparable from the contributions of developers and users. We warmly welcome you to provide more device compatibility for PaddleX and greatly appreciate your feedback.
+
+Currently, PaddleX supports Intel/Apple M series CPU, NVIDIA GPUs, XPU, Ascend NPU, Hygon DCU, and MLU. If the device you wish to support is not within the current scope, you can contribute by following the methods below.
+
+## 1.1 Integration Device into PaddlePaddle Backend
+
+The PaddlePaddle deep learning framework provides multiple integration solutions, including operator development and mapping, subgraph and whole graph integration, deep learning compiler backend integration, and open neural network format conversion. Device vendors can flexibly choose based on their chip architecture design and software stack maturity. For specific details, please refer to [PaddlePaddle Custom Device Integration Solutions](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/dev_guides/custom_device_docs/index_en.html).
+
+## 1.2 Support for PaddleCV devkits
+
+Since PaddleX is based on the PaddlePaddle model library, after the device completes the integration into the PaddlePaddle backend, select the corresponding devkit to submit code based on the models already supported by the device to ensure that the relevant devkits are adapted to the corresponding device. Refer to the contribution guides for each devkit:
+
+1. [PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/develop)
+
+2. [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/develop)
+
+3. [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg/tree/develop)
+
+4. [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR/tree/develop)
+
+5. [PaddleTS](https://github.com/PaddlePaddle/PaddleTS/tree/main)
+
+# 2. Updating PaddleX
+
+After completing the device integration into PaddlePaddle and the PaddleCV devkits, you need to update the device recognition-related code and documentation in PaddleX.
+
+## 2.1 Inference Support
+
+### 2.1.1 Version Support (Optional)
+
+If the relevant device has specific requirements for the PaddlePaddle version, you can make judgments based on device information and version information during initialization. The relevant code is located in the `_check_paddle_version` function in [PaddleX Initialization](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/__init__.py).
+
+### 2.1.2 Setting Environment Variables (Optional)
+
+If special environment variables need to be set when using the relevant device, you can modify the device environment setup code. The relevant code is located in the `set_env_for_device` function in [PaddleX Environment Variable Settings](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/utils/device.py).
+
+### 2.1.3 Creating a Predictor
+
+PaddleX's inference capability is provided based on the Paddle Inference Predictor. When creating a Predictor, you need to select different device based on device information and create passes. The relevant code is located in the `_create` function in [PaddleX Predictor Creation](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/inference/components/paddle_predictor/predictor.py).
+
+### 2.1.4 Updating the Device Support List
+
+When creating a Predictor, it will judge whether the device is already supported. The relevant code is located in the `SUPPORT_DEVICE` constant in [PaddleX Predictor Option](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/inference/utils/pp_option.py).
+
+### 2.1.5 Updating the Multi-Devices User Guide
+
+Please update the PaddleX multi-devices user guide and add the newly supported device information to the documentation. Both Chinese and English versions need to be updated. The Chinese version is [PaddleX多硬件使用指南](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/multi_devices_use_guide.md), and the English version is [PaddleX Multi-Devices Usage Guide](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/multi_devices_use_guide.en.md).
+
+### 2.1.6 Updating the Installation Tutorial
+
+Please provide device-related installation tutorials in both Chinese and English. The Chinese version can refer to [昇腾 NPU 飞桨安装教程](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/paddlepaddle_install_NPU.md), and the English version can refer to [Ascend NPU PaddlePaddle Installation Tutorial](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/paddlepaddle_install_NPU.en.md).
+
+### 2.1.7 Updating the Model List
+
+Please provide a list of models supported by the device in both Chinese and English. The Chinese version can refer to [PaddleX模型列表(昇腾 NPU)](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/support_list/model_list_npu.md), and the English version can refer to [PaddleX Model List (Huawei Ascend NPU)](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/support_list/model_list_npu.en.md).
+
+## 2.2 Training Support
+
+TODO
+
+# 3. Submitting a PR
+
+When you complete the device adaptation work, please submit a [Pull Request](https://github.com/PaddlePaddle/PaddleX/pulls) to PaddleX with relevant information. We will validate the model and merge the relevant code after confirmation.
+
+The relevant PR needs to provide information on reproducing model accuracy, including at least the following:
+
+* The software versions used to validate model accuracy, including but not limited to:
+
+  * Paddle version
+
+  * PaddleCustomDevice version (if any)
+
+  * The branch of PaddleX or the corresponding devkit
+
+* The machine environment used to validate model accuracy, including but not limited to:
+
+  * Chip model
+
+  * Operating system version
+
+  * Device driver version
+
+  * Operator library version, etc.

+ 85 - 0
docs/other_devices_support/how_to_contribute_device.md

@@ -0,0 +1,85 @@
+# 1. 更多硬件支持
+
+飞桨生态的繁荣离不开开发者和用户的贡献,我们非常欢迎您为 PaddleX 提供更多的硬件适配,也十分感谢您的反馈。
+
+当前支持的类型为 Intel/苹果M系列 CPU、英伟达 GPU、昆仑芯 XPU、昇腾 NPU、海光 DCU 和寒武纪MLU,如果您要支持的硬件不在已经支持的范围内,可以参考如下方式进行贡献。
+
+## 1.1 硬件接入飞桨后端
+
+飞桨深度学习框架提供了多种硬件接入的方案,包括算子开发与映射、子图与整图接入、深度学习编译器后端接入以及开源神经网络格式转化四种硬件接入方案,供硬件厂商根据自身芯片架构设计与软件栈的建设成熟度进行灵活选择,具体细节请参考[飞桨硬件接入方案](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/custom_device_docs/index_cn.html)。
+
+## 1.2 各个套件支持
+
+由于PaddleX基于飞桨模型库实现。当硬件完成飞桨后端接入后,按照硬件已经支持的模型情况,选择相应的套件去提交代码,确保相关套件适配了对应硬件,参考各套件贡献指南:
+
+1. [PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/develop)
+
+2. [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/develop)
+
+3. [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg/tree/develop)
+
+4. [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR/tree/develop)
+
+5. [PaddleTS](https://github.com/PaddlePaddle/PaddleTS/tree/main)
+
+# 2. 更新PaddleX
+
+当完成硬件接入飞桨和各个套件后,需要更新PaddleX中硬件识别相关的代码和说明文档
+
+## 2.1 推理能力支持
+
+### 2.1.1 版本支持(可忽略)
+
+如果相关硬件对于飞桨版本有特定要求,可以在初始化时根据设备信息和版本信息进行判断,相关代码位于 [PaddleX初始化](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/__init__.py)中的 `_check_paddle_version`
+
+### 2.1.2 设置环境变量(可忽略)
+
+如果相关硬件在使用时,需要设定特殊的环境变量,可以修改设备环境设置代码,相关代码位于 [PaddleX环境变量设置](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/utils/device.py)中的 `set_env_for_device`
+
+### 2.1.3 创建Predictor
+
+PaddleX的推理能力基于飞桨Paddle Inference Predictor提供,创建Predictor时需要根据设备信息选择不同的硬件并创建pass,相关代码位于[PaddleX Predictor创建](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/inference/components/paddle_predictor/predictor.py)的 `_create`
+
+### 2.1.4 更新硬件支持列表
+
+创建Predictor时会判断设备是否已支持,相关代码位于[PaddleX Predictor Option](https://github.com/PaddlePaddle/PaddleX/blob/develop/paddlex/inference/utils/pp_option.py)中的 `SUPPORT_DEVICE`
+
+### 2.1.5 更新多硬件说明指南
+
+请更新PaddleX多硬件说明指南,将新支持的硬件信息更新到文档中,需要同时更新中英文版本,中文版本 [PaddleX多硬件使用指南](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/multi_devices_use_guide.md) ,英文版本 [PaddleX Multi-Hardware Usage Guide](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/multi_devices_use_guide.en.md)
+
+### 2.1.6 更新安装教程
+
+请提供硬件相关的安装教程,需要提供中英文版本,中文版本参考 [昇腾 NPU 飞桨安装教程](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/paddlepaddle_install_NPU.md) ,英文版本参考 [Ascend NPU PaddlePaddle Installation Tutorial](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/other_devices_support/paddlepaddle_install_NPU.en.md)
+
+### 2.1.7 更新模型列表
+
+请提供硬件支持的模型列表,需要提供中英文版本,中文版本参考 [PaddleX模型列表(昇腾 NPU)](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/support_list/model_list_npu.md) ,英文版本参考 [PaddleX Model List (Huawei Ascend NPU)](https://github.com/PaddlePaddle/PaddleX/blob/develop/docs/support_list/model_list_npu.en.md)
+
+## 2.2 训练能力支持
+
+TODO
+
+# 3. 提交PR
+
+当您完成特定硬件的适配工作后,请给PaddleX提交一个 [Pull Request](https://github.com/PaddlePaddle/PaddleX/pulls) 说明相关信息,我们将会对模型进行验证,确认无问题后将合入相关代码
+
+相关PR需要提供复现模型精度的信息,至少包含以下内容:
+
+* 验证模型精度所用到的软件版本,包括但不限于:
+
+  * Paddle版本
+
+  * PaddleCustomDevice版本(如果有)
+
+  * PaddleX或者对应套件的分支
+
+* 验证模型精度所用到的机器环境,包括但不限于:
+
+  * 芯片型号
+
+  * 系统版本
+
+  * 硬件驱动版本
+
+  * 算子库版本等

+ 63 - 0
docs/other_devices_support/how_to_contribute_model.en.md

@@ -0,0 +1,63 @@
+# 1. Contributing Models
+
+The prosperity of the PaddlePaddle ecosystem is inseparable from the contributions of developers and users. We warmly welcome you to contribute more models for multi-hardware compatibility to PaddlePaddle and greatly appreciate your feedback.
+
+The current list of hardware-compatible models in PaddleX is as follows. You can check whether the relevant models have been adapted for the corresponding hardware:
+
+* [NPU Model List](../support_list/model_list_npu.en.md)
+
+* [XPU Model List](../support_list/model_list_xpu.en.md)
+
+* [DCU Model List](../support_list/model_list_dcu.en.md)
+
+* [MLU Model List](../support_list/model_list_mlu.en.md)
+
+The source code for current PaddleX-related models is placed in various kits, and some kits and models have not been integrated into PaddleX. Therefore, before adapting a model, please ensure that your model is already integrated into PaddleX. For the current list of PaddleX models, see [PaddleX Model Library](../support_list/models_list.en.md). If you have specific model requirements, please submit an [issue](https://github.com/PaddlePaddle/PaddleX/issues/new?assignees=&labels=&projects=&template=6_hardware_contribute.en.md&title=) to inform us.
+
+If the model you are adapting involves modifications to the model networking code on the relevant hardware, please submit the code to the corresponding kit first, referring to the contribution guides for each kit:
+
+1. [PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/develop)
+
+2. [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/develop)
+
+3. [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg/tree/develop)
+
+4. [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR/tree/develop)
+
+5. [PaddleTS](https://github.com/PaddlePaddle/PaddleTS/tree/main)
+
+# 2. Submitting an Issue for Explanation
+
+When you have completed the adaptation of a model on a specific hardware, please submit an [issue](https://github.com/PaddlePaddle/PaddleX/issues/new?assignees=&labels=&projects=&template=6_hardware_contribute.md&title=) to PaddleX explaining the relevant information. We will verify the model and, upon confirmation of no issues, merge the relevant code and update the model list in the documentation.
+
+The relevant issue needs to provide information to reproduce the model's accuracy, including at least the following:
+
+* The software versions used to verify the model's accuracy, including but not limited to:
+
+  * Paddle version
+
+  * PaddleCustomDevice version (if applicable)
+
+  * Branch of PaddleX or the corresponding kit
+
+* The machine environment used to verify the model's accuracy, including but not limited to:
+
+  * Chip model
+
+  * Operating system version
+
+  * Hardware driver version
+
+  * Operator library version, etc.
+
+# 3. More Documentation
+
+For more documentation related to multi-hardware compatibility and usage in PaddlePaddle, please refer to:
+
+* [PaddlePaddle User Guide](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/guides/index_en.html)
+
+* [PaddlePaddle Hardware Support](https://www.paddlepaddle.org.cn/documentation/docs/en/develop/hardware_support/index_en.html)
+
+* [PaddleX Multi-device Usage Guide](./multi_devices_use_guide.en.md)
+
+* [PaddleCustomDevice Repository](https://github.com/PaddlePaddle/PaddleCustomDevice)

+ 63 - 0
docs/other_devices_support/how_to_contribute_model.md

@@ -0,0 +1,63 @@
+# 1. 贡献模型
+
+飞桨生态的繁荣离不开开发者和用户的贡献,我们非常欢迎您为飞桨的多硬件适配贡献更多的模型,也十分感谢您的反馈。
+
+当前PaddleX中对于各硬件适配模型的列表如下,您可以确认相关模型是否已经在对应硬件中进行过适配:
+
+* [昇腾模型列表](../support_list/model_list_npu.md)
+
+* [昆仑模型列表](../support_list/model_list_xpu.md)
+
+* [海光模型列表](../support_list/model_list_dcu.md)
+
+* [寒武纪模型列表](../support_list/model_list_mlu.md)
+
+当前PaddleX相关模型的源码放置在各个套件中,部分套件和模型并未接入PaddleX中,因此对模型进行适配前,请务必保证您的模型在PaddleX中已经接入,当前PaddleX模型列表详见 [PaddleX模型库](../support_list/models_list.md )。如果您有特殊的模型需求,请提交 [issue](https://github.com/PaddlePaddle/PaddleX/issues/new?assignees=&labels=&projects=&template=6_hardware_contribute.md&title=) 告知我们。
+
+如果您适配的模型在相关硬件上涉及到模型组网代码的修改,请先提交代码到对应的套件中,参考各套件贡献指南:
+
+1. [PaddleClas](https://github.com/PaddlePaddle/PaddleClas/tree/develop)
+
+2. [PaddleDetection](https://github.com/PaddlePaddle/PaddleDetection/tree/develop)
+
+3. [PaddleSeg](https://github.com/PaddlePaddle/PaddleSeg/tree/develop)
+
+4. [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR/tree/develop)
+
+5. [PaddleTS](https://github.com/PaddlePaddle/PaddleTS/tree/main)
+
+# 2. 提交说明issue
+
+当您完成特定硬件上某款模型的适配工作后,请给PaddleX提交一个 [issue](https://github.com/PaddlePaddle/PaddleX/issues/new?assignees=&labels=&projects=&template=6_hardware_contribute.md&title=) 说明相关信息,我们将会对模型进行验证,确认无问题后将合入相关代码并在文档中对模型列表进行更新
+
+相关issue需要提供复现模型精度的信息,至少包含以下内容:
+
+* 验证模型精度所用到的软件版本,包括但不限于:
+
+  * Paddle版本
+
+  * PaddleCustomDevice版本(如果有)
+
+  * PaddleX或者对应套件的分支
+
+* 验证模型精度所用到的机器环境,包括但不限于:
+
+  * 芯片型号
+
+  * 系统版本
+
+  * 硬件驱动版本
+
+  * 算子库版本等
+
+# 3. 更多文档
+
+更多关于飞桨多硬件适配和使用的相关文档,可以参考
+
+* [飞桨使用指南](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/index_cn.html)
+
+* [飞桨硬件支持](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/hardware_support/index_cn.html)
+
+* [PaddleX多硬件使用指南](./multi_devices_use_guide.md)
+
+* [PaddleCustomDevice仓库](https://github.com/PaddlePaddle/PaddleCustomDevice)

+ 1 - 1
docs/other_devices_support/multi_devices_use_guide.en.md

@@ -2,7 +2,7 @@
 comments: true
 ---
 
-# PaddleX Multi-Hardware Usage Guide
+# PaddleX Multi-Devices Usage Guide
 
 This document focuses on the usage guide of PaddleX for Huawei Ascend NPU, Cambricon MLU, Kunlun XPU, and Hygon DCU hardware platforms.