From d4bf5fd24a93f513b06baa001e41d1dda6baa4fd Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Sun, 28 Aug 2022 10:04:30 +0800
Subject: [PATCH 01/11] rm unnecessary pronouns
* Update basic_usage_cn.md
---
docs/guides/jit/basic_usage_cn.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/guides/jit/basic_usage_cn.md b/docs/guides/jit/basic_usage_cn.md
index 7d0518c1a9a..6fbe692909f 100644
--- a/docs/guides/jit/basic_usage_cn.md
+++ b/docs/guides/jit/basic_usage_cn.md
@@ -430,7 +430,7 @@ paddle.jit.save(loaded_layer, "fine-tune.model/linear", input_spec=[x])
##### 3.2.2.2 使用 ``paddle.load`` 加载
-``paddle.jit.save`` 同时保存了模型和参数,如果你已有组网代码,只需要从存储结果中载入模型的参数,则可以使用 ``paddle.load`` 接口载入,返回所存储模型的 ``state_dict`` ,并使用 ``set_state_dict`` 方法将模型参数与 Layer 关联。示例如下:
+``paddle.jit.save`` 同时保存了模型和参数,如果已有组网代码,只需要从存储结果中载入模型的参数,则可以使用 ``paddle.load`` 接口载入,返回所存储模型的 ``state_dict`` ,并使用 ``set_state_dict`` 方法将模型参数与 Layer 关联。示例如下:
```python
import paddle
@@ -625,7 +625,7 @@ pred = loaded_layer(x)
return self._linear(x)
```
-4. 前文中大多都是用 ``paddle.jit.save`` 保存的 ``Layer.forward`` 类实例,保存内容包括模型结构和参数。当保存单独的一个函数时, ``paddle.jit.save`` 只会保存这个函数对应的静态图模型结构 Program ,不会保存和这个函数相关的参数。如果你必须保存参数,请使用 Layer 类封装这个函数。 示例代码如下:
+4. 前文中大多都是用 ``paddle.jit.save`` 保存的 ``Layer.forward`` 类实例,保存内容包括模型结构和参数。当保存单独的一个函数时, ``paddle.jit.save`` 只会保存这个函数对应的静态图模型结构 Program ,不会保存和这个函数相关的参数。如果必须保存参数,请使用 Layer 类封装这个函数。 示例代码如下:
```python
# 定义一个函数
From 9ee470e95237e1b16c52019cbed193474f197441 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Sun, 28 Aug 2022 10:18:49 +0800
Subject: [PATCH 02/11] rm Macos GPU docker
* Update macos-docker_en.md
* Update macos-docker.md
---
docs/install/docker/macos-docker.md | 8 --------
docs/install/docker/macos-docker_en.md | 8 --------
2 files changed, 16 deletions(-)
diff --git a/docs/install/docker/macos-docker.md b/docs/install/docker/macos-docker.md
index 66762d9e906..b967f944cac 100644
--- a/docs/install/docker/macos-docker.md
+++ b/docs/install/docker/macos-docker.md
@@ -106,14 +106,6 @@
registry.baidubce.com/paddlepaddle/paddle:2.1.0-jupyter |
安装了 2.1.0 版本 paddle 的 CPU 镜像,且镜像中预装好了 jupyter,启动 docker 即运行 jupyter 服务 |
-
- | registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda11.2-cudnn8 |
- 安装了 2.1.0 版本 paddle 的 GPU 镜像,cuda 版本为 11.2,cudnn 版本为 8.1 |
-
-
- | registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 |
- 安装了 2.1.0 版本 paddle 的 GPU 镜像,cuda 版本为 10.2,cudnn 版本为 7 |
-
diff --git a/docs/install/docker/macos-docker_en.md b/docs/install/docker/macos-docker_en.md
index 6878634e23e..fcbe3eff72d 100644
--- a/docs/install/docker/macos-docker_en.md
+++ b/docs/install/docker/macos-docker_en.md
@@ -105,14 +105,6 @@ Now you have successfully used Docker to install PaddlePaddle. For more informat
registry.baidubce.com/paddlepaddle/paddle:2.1.0-jupyter |
CPU image of paddle version 2.1.0 is installed, and jupyter is pre-installed in the image. Start the docker to run the jupyter service |
-
- | registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda11.2-cudnn8 |
- GPU image of paddle version 2.1.0 is installed, cuda version is 11.2, cudnn version is 8.1 |
-
-
- | registry.baidubce.com/paddlepaddle/paddle:2.1.0-gpu-cuda10.2-cudnn7 |
- GPU image of paddle version 2.1.0 is installed, cuda version is 10.2, cudnn version is 7 |
-
From 43fe391bfd36b8f2a1b99f2e6a312f5bafffd150 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Sun, 28 Aug 2022 11:28:42 +0800
Subject: [PATCH 03/11] rm unnecessary pronouns
* Update grammar_list_cn.md
---
docs/guides/jit/grammar_list_cn.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/guides/jit/grammar_list_cn.md b/docs/guides/jit/grammar_list_cn.md
index 6963c2d2928..707bbc90854 100644
--- a/docs/guides/jit/grammar_list_cn.md
+++ b/docs/guides/jit/grammar_list_cn.md
@@ -11,9 +11,9 @@
3. 当出现不支持的语法时,如何修改源码适配动转静语法
-若你初次接触动转静功能,或对此功能尚不熟悉,推荐阅读:[使用样例](./basic_usage_cn.html);
+若初次接触动转静功能,或对此功能尚不熟悉,推荐阅读:[使用样例](./basic_usage_cn.html);
-若你动静转换遇到了问题,或想学习调试的技巧,推荐阅读:[报错调试](./debugging_cn.html)。
+若动静转换遇到了问题,或想学习调试的技巧,推荐阅读:[报错调试](./debugging_cn.html)。
## 二、语法支持速查列表
From e47926d7c5ad810e222a7b0e5853f097ee5752ca Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Sun, 28 Aug 2022 11:47:38 +0800
Subject: [PATCH 04/11] fix format
* Update case_analysis_cn.md
---
docs/guides/jit/case_analysis_cn.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/guides/jit/case_analysis_cn.md b/docs/guides/jit/case_analysis_cn.md
index 81595f75b7b..b7690c1d5b4 100644
--- a/docs/guides/jit/case_analysis_cn.md
+++ b/docs/guides/jit/case_analysis_cn.md
@@ -215,7 +215,7 @@ class SimpleNet(object): # <---- 继承 Object
同时,所有继承 ``nn.Layer`` 的 ``sublayer`` 都建议:
-+ 重写 ``forward`` 函数,尽量避免重写 ``__call__``` 函数
++ 重写 ``forward`` 函数,尽量避免重写 ``__call__`` 函数
> ``__call__`` 函数通常会包含框架层面的一些通用的处理逻辑,比如 ``pre_hook`` 和 ``post_hook`` 。重写此函数可能会覆盖框架层面的逻辑。
+ 尽量将 ``forward`` 函数作为 sublayers 的调用入口
From 0ec8b3aefb16d3ca4807850bf17035093b8e02eb Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Mon, 29 Aug 2022 21:09:19 +0800
Subject: [PATCH 05/11] add GPU architecture comparison table link
* Update windows-pip.md
* Update windows-pip_en.md
* Update linux-pip.md
* Update linux-pip_en.md
---
docs/install/pip/linux-pip.md | 2 +-
docs/install/pip/linux-pip_en.md | 2 +-
docs/install/pip/windows-pip.md | 2 +-
docs/install/pip/windows-pip_en.md | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/install/pip/linux-pip.md b/docs/install/pip/linux-pip.md
index e692b52a0ec..956716dcb3d 100644
--- a/docs/install/pip/linux-pip.md
+++ b/docs/install/pip/linux-pip.md
@@ -171,7 +171,7 @@
注:
-* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。
+* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu)
* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为 python3 或者替换为具体的 Python 路径。
diff --git a/docs/install/pip/linux-pip_en.md b/docs/install/pip/linux-pip_en.md
index 347f052cf92..2ae0ff74a7e 100644
--- a/docs/install/pip/linux-pip_en.md
+++ b/docs/install/pip/linux-pip_en.md
@@ -182,7 +182,7 @@ You can choose the following version of PaddlePaddle to start installation:
Note:
-* If you are using ampere-based GPU, CUDA 11.2 is recommended; otherwise CUDA 10.2 is recommended for better performance.
+* If you are using ampere-based GPU, CUDA 11.2 is recommended; otherwise CUDA 10.2 is recommended for better performance. please refer to: [GPU architecture comparison table](https://www.paddlepaddle.org.cn/documentation/docs/en/install/Tables.html#nvidia-gpu)
* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with Python 3 or specific Python path.
diff --git a/docs/install/pip/windows-pip.md b/docs/install/pip/windows-pip.md
index 361ff8a0653..85e0478e4de 100644
--- a/docs/install/pip/windows-pip.md
+++ b/docs/install/pip/windows-pip.md
@@ -122,7 +122,7 @@
注:
-* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。
+* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu)
* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境,可能需要将上述命令行中所有 `python` 替换为具体的 `Python 解释器` 路径(例如 C:\Python37\python.exe)。
diff --git a/docs/install/pip/windows-pip_en.md b/docs/install/pip/windows-pip_en.md
index 7650b3512b1..3ca6cf109be 100644
--- a/docs/install/pip/windows-pip_en.md
+++ b/docs/install/pip/windows-pip_en.md
@@ -118,7 +118,7 @@ You can choose the following version of PaddlePaddle to start installation:
Note:
-* If you are using ampere-based GPU, CUDA 11.2 is recommended; otherwise CUDA 10.2 is recommended for better performance.
+* If you are using ampere-based GPU, CUDA 11.2 is recommended; otherwise CUDA 10.2 is recommended for better performance. please refer to: [GPU architecture comparison table](https://www.paddlepaddle.org.cn/documentation/docs/en/install/Tables.html#nvidia-gpu)
* Please confirm that the Python where you need to install PaddlePaddle is your expected location, because your computer may have multiple Python. Depending on the environment, you may need to replace Python in all command lines in the instructions with specific Python path.
From 6db4a91aa4f2d027a205792b46001710dbfcfdc4 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Tue, 30 Aug 2022 18:03:56 +0800
Subject: [PATCH 06/11] fix format docs
---
docs/install/pip/linux-pip.md | 2 +-
docs/install/pip/windows-pip.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/install/pip/linux-pip.md b/docs/install/pip/linux-pip.md
index 956716dcb3d..95f05b20c26 100644
--- a/docs/install/pip/linux-pip.md
+++ b/docs/install/pip/linux-pip.md
@@ -171,7 +171,7 @@
注:
-* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu)
+* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU 架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu)
* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境您可能需要将说明中所有命令行中的 python 替换为 python3 或者替换为具体的 Python 路径。
diff --git a/docs/install/pip/windows-pip.md b/docs/install/pip/windows-pip.md
index 85e0478e4de..44f7d443175 100644
--- a/docs/install/pip/windows-pip.md
+++ b/docs/install/pip/windows-pip.md
@@ -122,7 +122,7 @@
注:
-* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu)
+* 如果你使用的是安培架构的 GPU,推荐使用 CUDA11.2。如果你使用的是非安培架构的 GPU,推荐使用 CUDA10.2,性能更优。请参考: [GPU 架构对照表](https://www.paddlepaddle.org.cn/documentation/docs/zh/install/Tables.html#nvidia-gpu)
* 请确认需要安装 PaddlePaddle 的 Python 是您预期的位置,因为您计算机可能有多个 Python。根据您的环境,可能需要将上述命令行中所有 `python` 替换为具体的 `Python 解释器` 路径(例如 C:\Python37\python.exe)。
From f2d1ccdcc0fd31ca82edba930254cac1803e8adb Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Wed, 31 Aug 2022 18:27:21 +0800
Subject: [PATCH 07/11] fix url lose
---
docs/install/pip/linux-pip.md | 2 +-
docs/install/pip/linux-pip_en.md | 2 +-
docs/install/pip/macos-pip.md | 2 +-
docs/install/pip/macos-pip_en.md | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/install/pip/linux-pip.md b/docs/install/pip/linux-pip.md
index 95f05b20c26..4300319363f 100644
--- a/docs/install/pip/linux-pip.md
+++ b/docs/install/pip/linux-pip.md
@@ -62,7 +62,7 @@
* 默认提供的安装包需要计算机支持 MKL
-* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。
+* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/docs/blob/develop/docs/install/install_script.md)。
diff --git a/docs/install/pip/linux-pip_en.md b/docs/install/pip/linux-pip_en.md
index 2ae0ff74a7e..1478aeb5d0e 100644
--- a/docs/install/pip/linux-pip_en.md
+++ b/docs/install/pip/linux-pip_en.md
@@ -62,7 +62,7 @@
* The installation package provided by default requires computer support for MKL
-* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), for instructions please refer to[here](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。
+* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), for instructions please refer to[here](https://github.com/PaddlePaddle/docs/blob/develop/docs/install/install_script.md)。
diff --git a/docs/install/pip/macos-pip.md b/docs/install/pip/macos-pip.md
index 529a87d8661..849d08b03ff 100644
--- a/docs/install/pip/macos-pip.md
+++ b/docs/install/pip/macos-pip.md
@@ -62,7 +62,7 @@
* 默认提供的安装包需要计算机支持 MKL
-* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。
+* 如果您对机器环境不了解,请下载使用[快速安装脚本](https://fast-install.bj.bcebos.com/fast_install.sh),配套说明请参考[这里](https://github.com/PaddlePaddle/docs/blob/develop/docs/install/install_script.md)。
diff --git a/docs/install/pip/macos-pip_en.md b/docs/install/pip/macos-pip_en.md
index fc92c3d7fbe..29cd9e7762b 100644
--- a/docs/install/pip/macos-pip_en.md
+++ b/docs/install/pip/macos-pip_en.md
@@ -58,7 +58,7 @@
* The installation package provided by default requires computer support for MKL
-* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), for instructions please refer to[here](https://github.com/PaddlePaddle/FluidDoc/tree/develop/doc/fluid/install/install_script.md)。
+* If you do not know the machine environment, please download and use[Quick install script](https://fast-install.bj.bcebos.com/fast_install.sh), for instructions please refer to[here](https://github.com/PaddlePaddle/docs/blob/develop/docs/install/install_script.md)。
From 29954061ae54bf6a8266c5a0efa00613ad885510 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Thu, 8 Sep 2022 20:12:44 +0800
Subject: [PATCH 08/11] [docs] fix paddle.CUDAPlace Parameter error
* Update CUDAPlace_cn.rst
---
docs/api/paddle/CUDAPlace_cn.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/paddle/CUDAPlace_cn.rst b/docs/api/paddle/CUDAPlace_cn.rst
index 077a4f1a24d..d140de5e6a9 100644
--- a/docs/api/paddle/CUDAPlace_cn.rst
+++ b/docs/api/paddle/CUDAPlace_cn.rst
@@ -19,7 +19,7 @@ CUDAPlace
参数
::::::::::::
- - **id** (int,可选) - GPU 的设备 ID。如果为 ``None``,则默认会使用 id 为 0 的设备。默认值为 ``None``。
+ - **id** (int) - GPU 的设备 ID。
代码示例
::::::::::::
From 81e43369adeb9a6bb1e9400621f112e79e9d9e47 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Thu, 8 Sep 2022 22:35:08 +0800
Subject: [PATCH 09/11] [docs] fix Synchronous English documentation
* Update take_along_axis_cn.rst
---
docs/api/paddle/take_along_axis_cn.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/paddle/take_along_axis_cn.rst b/docs/api/paddle/take_along_axis_cn.rst
index 1095c3fc789..7ec44e9fcbc 100644
--- a/docs/api/paddle/take_along_axis_cn.rst
+++ b/docs/api/paddle/take_along_axis_cn.rst
@@ -16,7 +16,7 @@ take_along_axis
返回
:::::::::
-- **out** (Tensor) - 输出 Tensor,包含 indeces 矩阵选定的元素,与 ``arr`` 数据类型相同。
+输出 Tensor,包含 indeces 矩阵选定的元素,与 ``arr`` 数据类型相同。
代码示例
:::::::::
From 0fd899a1ac92eff42e09c65b5b290212298648f0 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Fri, 16 Sep 2022 00:20:41 +0800
Subject: [PATCH 10/11] [dosc] Supplementary index description:
* ipu_shard_guard_cn.rst
* set_ipu_shard_cn.rst
Modify note Format:
* mlu_places_cn.rst
---
docs/api/paddle/static/ipu_shard_guard_cn.rst | 14 +++++++-------
docs/api/paddle/static/mlu_places_cn.rst | 15 ++++++---------
docs/api/paddle/static/set_ipu_shard_cn.rst | 18 +++++++++---------
3 files changed, 22 insertions(+), 25 deletions(-)
diff --git a/docs/api/paddle/static/ipu_shard_guard_cn.rst b/docs/api/paddle/static/ipu_shard_guard_cn.rst
index 94a90546bfe..071d75d3b5d 100644
--- a/docs/api/paddle/static/ipu_shard_guard_cn.rst
+++ b/docs/api/paddle/static/ipu_shard_guard_cn.rst
@@ -8,17 +8,17 @@ ipu_shard_guard
对模型进行切分。用于指定 Op 在哪个 ipu 上进行计算以及模型被切分之后的计算顺序。
+参数
+:::::::::
+ - **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行。
+ - **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
+
.. note::
- 仅支持当 enable_manual_shard=True,index 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
- 仅支持当 enable_pipelining=True,stage 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
+ 仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
+ 仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。
-参数
-:::::::::
- - **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 没有指定 ipu。
- - **stage** (int,可选) – 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
-
返回
:::::::::
无。
diff --git a/docs/api/paddle/static/mlu_places_cn.rst b/docs/api/paddle/static/mlu_places_cn.rst
index eb7d4a4487f..ec1324d59d4 100644
--- a/docs/api/paddle/static/mlu_places_cn.rst
+++ b/docs/api/paddle/static/mlu_places_cn.rst
@@ -8,15 +8,12 @@ mlu_places
.. note::
多卡任务请先使用 FLAGS_selected_mlus 环境变量设置可见的 MLU 设备。
-
-该接口根据 ``device_ids`` 创建一个或多个 ``paddle.device.MLUPlace`` 对象,并返回所创建的对象列表。
-
-如果 ``device_ids`` 为 ``None``,则首先检查 ``FLAGS_selected_mlus`` 标志。
-例如:``FLAGS_selected_mlus=0,1,2``,则返回的列表将为 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
-如果未设置标志 ``FLAGS_selected_mlus``,则返回所有可见的 MLU places。
-
-如果 ``device_ids`` 不是 ``None``,它应该是使用的 MLU 设备 ID 的列表或元组。
-例如:``device_id=[0,1,2]``,返回的列表将是 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
+ 该接口根据 ``device_ids`` 创建一个或多个 ``paddle.device.MLUPlace`` 对象,并返回所创建的对象列表。
+ 如果 ``device_ids`` 为 ``None``,则首先检查 ``FLAGS_selected_mlus`` 环境变量。
+ 例如:``FLAGS_selected_mlus=0,1,2``,则返回的列表将为 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
+ 如果未设置环境变量 ``FLAGS_selected_mlus``,则返回所有可见的 MLU 位置。
+ 如果 ``device_ids`` 不是 ``None``,它应该是使用的 MLU 设备 ID 的列表或元组。
+ 例如:``device_id=[0,1,2]``,返回的列表将是 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
参数
:::::::::
diff --git a/docs/api/paddle/static/set_ipu_shard_cn.rst b/docs/api/paddle/static/set_ipu_shard_cn.rst
index 404a9c313a7..a49f7c27c55 100644
--- a/docs/api/paddle/static/set_ipu_shard_cn.rst
+++ b/docs/api/paddle/static/set_ipu_shard_cn.rst
@@ -8,21 +8,21 @@ set_ipu_shard
通过设置输入的函数或计算层内每个算子的流水线属性实现对模型的切分。
-.. note::
-
- 仅支持当 enable_manual_shard=True,index 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
- 仅支持当 enable_pipelining=True,stage 设置才有效。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
- 一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。
-
参数
:::::::::
- **call_func** (Layer|function) - 静态图下的函数或者计算层。
- - **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示不指定 ipu。
- - **stage** (int,可选) – 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
+ - **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行。
+ - **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
+
+.. note::
+
+ 仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
+ 仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
+ 一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。
返回
:::::::::
- 无。
+ 包装后的调用函数。
代码示例
::::::::::
From 23fba6955f14b721c875cd84767ae5e4a6332b01 Mon Sep 17 00:00:00 2001
From: gouzi <530971494@qq.com>
Date: Sun, 9 Oct 2022 00:48:35 +0800
Subject: [PATCH 11/11] =?UTF-8?q?[docs]=20fix=20note=E3=80=81returns=20for?=
=?UTF-8?q?mat?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix put_along_axis_cn.rst returns format
* fix ipu_shard_guard_cn.rst note format
* fix mlu_places_cn.rst note format
* fix set_ipu_shard_cn.rst note format
---
docs/api/paddle/put_along_axis_cn.rst | 2 +-
docs/api/paddle/static/ipu_shard_guard_cn.rst | 11 +++++------
docs/api/paddle/static/mlu_places_cn.rst | 15 +++++++++------
docs/api/paddle/static/set_ipu_shard_cn.rst | 11 +++++------
4 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/docs/api/paddle/put_along_axis_cn.rst b/docs/api/paddle/put_along_axis_cn.rst
index 3004da5beb8..d7df131c8b8 100644
--- a/docs/api/paddle/put_along_axis_cn.rst
+++ b/docs/api/paddle/put_along_axis_cn.rst
@@ -18,7 +18,7 @@ put_along_axis
返回
:::::::::
-- **out** (Tensor) - 输出 Tensor,indeces 矩阵选定的下标会被插入 value,与 ``arr`` 数据类型相同。
+输出 Tensor,indeces 矩阵选定的下标会被插入 value,与 ``arr`` 数据类型相同。
代码示例
:::::::::
diff --git a/docs/api/paddle/static/ipu_shard_guard_cn.rst b/docs/api/paddle/static/ipu_shard_guard_cn.rst
index 071d75d3b5d..0351c9f9719 100644
--- a/docs/api/paddle/static/ipu_shard_guard_cn.rst
+++ b/docs/api/paddle/static/ipu_shard_guard_cn.rst
@@ -8,17 +8,16 @@ ipu_shard_guard
对模型进行切分。用于指定 Op 在哪个 ipu 上进行计算以及模型被切分之后的计算顺序。
-参数
-:::::::::
- - **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行。
- - **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
-
.. note::
-
仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。
+参数
+:::::::::
+ - **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行。
+ - **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
+
返回
:::::::::
无。
diff --git a/docs/api/paddle/static/mlu_places_cn.rst b/docs/api/paddle/static/mlu_places_cn.rst
index ec1324d59d4..789af734130 100644
--- a/docs/api/paddle/static/mlu_places_cn.rst
+++ b/docs/api/paddle/static/mlu_places_cn.rst
@@ -5,15 +5,18 @@ mlu_places
.. py:function:: paddle.static.mlu_places(device_ids=None)
+该接口根据 ``device_ids`` 创建一个或多个 ``paddle.device.MLUPlace`` 对象,并返回所创建的对象列表。
+
+如果 ``device_ids`` 为 ``None``,则首先检查 ``FLAGS_selected_mlus`` 环境变量。
+例如:``FLAGS_selected_mlus=0,1,2``,则返回的列表将为 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
+
+如果未设置环境变量 ``FLAGS_selected_mlus``,则返回所有可见的 MLU 位置。
+
+如果 ``device_ids`` 不是 ``None``,它应该是使用的 MLU 设备 ID 的列表或元组。
+例如:``device_id=[0,1,2]``,返回的列表将是 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
.. note::
多卡任务请先使用 FLAGS_selected_mlus 环境变量设置可见的 MLU 设备。
- 该接口根据 ``device_ids`` 创建一个或多个 ``paddle.device.MLUPlace`` 对象,并返回所创建的对象列表。
- 如果 ``device_ids`` 为 ``None``,则首先检查 ``FLAGS_selected_mlus`` 环境变量。
- 例如:``FLAGS_selected_mlus=0,1,2``,则返回的列表将为 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
- 如果未设置环境变量 ``FLAGS_selected_mlus``,则返回所有可见的 MLU 位置。
- 如果 ``device_ids`` 不是 ``None``,它应该是使用的 MLU 设备 ID 的列表或元组。
- 例如:``device_id=[0,1,2]``,返回的列表将是 ``[paddle.device.MLUPlace(0), paddle.device.MLUPlace(1), paddle.device.MLUPlace(2)]``。
参数
:::::::::
diff --git a/docs/api/paddle/static/set_ipu_shard_cn.rst b/docs/api/paddle/static/set_ipu_shard_cn.rst
index a49f7c27c55..c18d5f07fde 100644
--- a/docs/api/paddle/static/set_ipu_shard_cn.rst
+++ b/docs/api/paddle/static/set_ipu_shard_cn.rst
@@ -8,18 +8,17 @@ set_ipu_shard
通过设置输入的函数或计算层内每个算子的流水线属性实现对模型的切分。
+.. note::
+ 仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
+ 仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
+ 一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。
+
参数
:::::::::
- **call_func** (Layer|function) - 静态图下的函数或者计算层。
- **index** (int,可选) - 指定 Op 在哪个 ipu 上计算,(如‘0, 1, 2, 3’),默认值-1,表示 Op 仅在 ipu 0 上运行。
- **stage** (int,可选) - 指定被切分的模型的计算顺序,(如‘0, 1, 2, 3’),按照数值大小顺序对被切分的模型进行计算,默认值-1,表示没有数据流水计算顺序并按照计算图顺序计算 Op。
-.. note::
-
- 仅支持当 enable_manual_shard=True,才能将 index 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
- 仅支持当 enable_pipelining=True,才能将 stage 设置为非-1 的值。请参阅 :ref:`cn_api_fluid_IpuStrategy` 。
- 一个 index 支持对应 None stage 或一个 stage,一个 stage 仅支持对应一个新的 index 或者一个重复的 index。
-
返回
:::::::::
包装后的调用函数。