From 7cebc213da00f57a3aeda2ebbefb6936e693c1db Mon Sep 17 00:00:00 2001 From: xxiu1 <1923295312@qq.com> Date: Thu, 2 Oct 2025 13:11:51 +0000 Subject: [PATCH 1/4] [Docathon][Fix Doc Format No.22] fix doc ParallelEnv_cn --- docs/api/paddle/distributed/ParallelEnv_cn.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/api/paddle/distributed/ParallelEnv_cn.rst b/docs/api/paddle/distributed/ParallelEnv_cn.rst index ef37f309a15..3d5f07dc364 100644 --- a/docs/api/paddle/distributed/ParallelEnv_cn.rst +++ b/docs/api/paddle/distributed/ParallelEnv_cn.rst @@ -6,7 +6,7 @@ ParallelEnv .. py:class:: paddle.distributed.ParallelEnv() .. note:: - 不推荐使用这个 API,如果需要获取 rank 和 world_size,建议使用 ``paddle.distributed.get_rank()`` 和 ``paddle.distributed.get_world_size()`` 。 + 不推荐使用这个 API,如果需要获取 rank 和 world_size,建议使用 ``paddle.distributed.get_rank()`` 和 ``paddle.distributed.get_world_size()`` 。 这个类用于获取动态图模型并行执行所需的环境变量值。 @@ -24,7 +24,7 @@ rank 当前训练进程的编号。 -此属性的值等于环境变量 `PADDLE_TRAINER_ID` 的值。默认值是 0。 +此属性的值等于环境变量 ``PADDLE_TRAINER_ID`` 的值。默认值是 0。 **代码示例** @@ -35,7 +35,7 @@ world_size 参与训练进程的数量,一般也是训练所使用 GPU 卡的数量。 -此属性的值等于环境变量 `PADDLE_TRAINERS_NUM` 的值。默认值为 1。 +此属性的值等于环境变量 ``PADDLE_TRAINERS_NUM`` 的值。默认值为 1。 **代码示例** @@ -46,7 +46,7 @@ device_id 当前用于并行训练的 GPU 的编号。 -此属性的值等于环境变量 `FLAGS_selected_gpus` 的值。默认值是 0。 +此属性的值等于环境变量 ``FLAGS_selected_gpus`` 的值。默认值是 0。 **代码示例** @@ -57,7 +57,7 @@ current_endpoint 当前训练进程的终端节点 IP 与相应端口,形式为(机器节点 IP:端口号)。例如:127.0.0.1:6170。 -此属性的值等于环境变量 `PADDLE_CURRENT_ENDPOINT` 的值。默认值为空字符串""。 +此属性的值等于环境变量 ``PADDLE_CURRENT_ENDPOINT`` 的值。默认值为空字符串""。 **代码示例** @@ -68,7 +68,7 @@ trainer_endpoints 当前任务所有参与训练进程的终端节点 IP 与相应端口,用于在 NCCL2 初始化的时候建立通信,广播 NCCL ID。 -此属性的值等于环境变量 `PADDLE_TRAINER_ENDPOINTS` 的值。默认值为空字符串""。 +此属性的值等于环境变量 ``PADDLE_TRAINER_ENDPOINTS`` 的值。默认值为空字符串""。 **代码示例** From 6f61cb835d818efb3751701f6a68f87dfecd6a9c Mon Sep 17 00:00:00 2001 From: xxiu1 <1923295312@qq.com> Date: Sat, 4 Oct 2025 15:12:58 +0000 Subject: [PATCH 2/4] =?UTF-8?q?[Docathon][Fix=20Doc=20Format=20No.23?= =?UTF-8?q?=E3=80=8124]=20fix=20doc=20parallelize=5Fcn.rst=E3=80=81Strateg?= =?UTF-8?q?y=5Fcn.rst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/api/paddle/distributed/Strategy_cn.rst | 26 +++++++++---------- .../api/paddle/distributed/parallelize_cn.rst | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/api/paddle/distributed/Strategy_cn.rst b/docs/api/paddle/distributed/Strategy_cn.rst index 2f4909104ba..b7f7655d43e 100644 --- a/docs/api/paddle/distributed/Strategy_cn.rst +++ b/docs/api/paddle/distributed/Strategy_cn.rst @@ -35,11 +35,11 @@ sharding 优化器分片策略,包含以下配置项: - - **``enable``** (bool) - 是否启用优化器分片策略。默认:False。 + - **enable** (bool) - 是否启用优化器分片策略。默认:False。 - - **``stage``** (int) - 可以设置为 1、2 或 3。1 表示切分优化器状态,2 代表切分优化器状态和梯度,3 表示切分优化器状态、梯度和参数。默认:1。 + - **stage** (int) - 可以设置为 1、2 或 3。1 表示切分优化器状态,2 代表切分优化器状态和梯度,3 表示切分优化器状态、梯度和参数。默认:1。 - - **``degree``** (int) - 分片的数量。默认:8。 + - **degree** (int) - 分片的数量。默认:8。 **代码示例** @@ -51,11 +51,11 @@ fused_passes 计算融合策略,包含以下配置项: - - **``enable``** (bool) - 是否启用计算融合策略。默认:False。 + - **enable** (bool) - 是否启用计算融合策略。默认:False。 - - **``gemm_epilogue``** (bool) - 是否融合 ``Linear`` 层中的 ``matmul`` 和 ``add`` 计算。默认:False。 + - **gemm_epilogue** (bool) - 是否融合 ``Linear`` 层中的 ``matmul`` 和 ``add`` 计算。默认:False。 - - **``dropout_add``** (bool) - 是否融合 ``dropout`` 和 ``add`` 计算。默认:False。 + - **dropout_add** (bool) - 是否融合 ``dropout`` 和 ``add`` 计算。默认:False。 **代码示例** @@ -67,11 +67,11 @@ gradient_merge 梯度融合策略,包含以下配置项: - - **``enable``** (bool) - 是否启用梯度融合策略。默认:False。 + - **enable** (bool) - 是否启用梯度融合策略。默认:False。 - - **``k_steps``** (int) - 梯度融合的步数。默认:1。 + - **k_steps** (int) - 梯度融合的步数。默认:1。 - - **``avg``** (bool) - 是否平均梯度。默认:True。 + - **avg** (bool) - 是否平均梯度。默认:True。 **代码示例** @@ -83,13 +83,13 @@ pipeline 流水线并行策略,包含以下配置项: - - **``enable``** (bool) - 是否启用流水线并行策略。默认:False。 + - **enable** (bool) - 是否启用流水线并行策略。默认:False。 - - **``schedule_mode``** (str) - 流水线并行的调度模式。默认:1F1B。 + - **schedule_mode** (str) - 流水线并行的调度模式。默认:1F1B。 - - **``micro_batch_size``** (int) - mini-batch 中包含的每个 micro-batch 的大小。默认:1。 + - **micro_batch_size** (int) - mini-batch 中包含的每个 micro-batch 的大小。默认:1。 - - **``accumulate_steps``** (int) - 累积步数。默认:1。 + - **accumulate_steps** (int) - 累积步数。默认:1。 **代码示例** diff --git a/docs/api/paddle/distributed/parallelize_cn.rst b/docs/api/paddle/distributed/parallelize_cn.rst index 48fcdc01c14..e6297a1d3f5 100644 --- a/docs/api/paddle/distributed/parallelize_cn.rst +++ b/docs/api/paddle/distributed/parallelize_cn.rst @@ -20,7 +20,7 @@ parallelize - **mesh** (paddle.distributed.ProcessMesh,可选) - 模型与优化器(如提供)并行所发生的进程空间。最佳用法:在调用本 API 之前,通过 调用 ``paddle.distributed.set_mesh`` 方法来配置 mesh 信息,并将本 API 的 mesh 参数设置为 None。注意,如果您通过本 API 传递 了 mesh 信息,传入的 mesh 会覆盖外部设置的 mesh。 - - **config** (dict,可选) - 用来指导并行化的配置。该配置是一个字典,键的值可以从``dp_config``,``mp_config`` 与 + - **config** (dict,可选) - 用来指导并行化的配置。该配置是一个字典,键的值可以从 ``dp_config``,``mp_config`` 与 ``pp_config`` 中进行选择,分别来指导数据并行、模型并行与流水线并行的并行化。一个合法的 config 可以是: ``{"dp_config": 请参考本文档 dp_config 部分以获取更多内容, "mp_config": 请参考本文档 mp_config 部分以获取更多内容, "pp_config": 请参考本文档 pp_config 部分以获取更多内容}``。 From b4f96b8deaeda2247476091b4f5d71d1cdbd2f07 Mon Sep 17 00:00:00 2001 From: xxiu1 <1923295312@qq.com> Date: Sat, 11 Oct 2025 01:05:56 +0000 Subject: [PATCH 3/4] Revert: restore parallelize_cn.rst to upstream/develop version --- docs/api/paddle/distributed/parallelize_cn.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/paddle/distributed/parallelize_cn.rst b/docs/api/paddle/distributed/parallelize_cn.rst index 0125fb7321a..9fe62aa1905 100644 --- a/docs/api/paddle/distributed/parallelize_cn.rst +++ b/docs/api/paddle/distributed/parallelize_cn.rst @@ -20,7 +20,7 @@ parallelize - **mesh** (paddle.distributed.ProcessMesh,可选) - 模型与优化器(如提供)并行所发生的进程空间。最佳用法:在调用本 API 之前,通过 调用 ``paddle.distributed.set_mesh`` 方法来配置 mesh 信息,并将本 API 的 mesh 参数设置为 None。注意,如果您通过本 API 传递 了 mesh 信息,传入的 mesh 会覆盖外部设置的 mesh。 - - **config** (dict,可选) - 用来指导并行化的配置。该配置是一个字典,键的值可以从 ``dp_config``,``mp_config`` 与 + - **config** (dict,可选) - 用来指导并行化的配置。该配置是一个字典,键的值可以从 ``dp_config`` , ``mp_config`` 与 ``pp_config`` 中进行选择,分别来指导数据并行、模型并行与流水线并行的并行化。一个合法的 config 可以是: ``{"dp_config": 请参考本文档 dp_config 部分以获取更多内容, "mp_config": 请参考本文档 mp_config 部分以获取更多内容, "pp_config": 请参考本文档 pp_config 部分以获取更多内容}`` 。 From 3bc75a42685af6a90340446badd590a25d505326 Mon Sep 17 00:00:00 2001 From: xxiu1 <1923295312@qq.com> Date: Mon, 27 Oct 2025 16:03:01 +0000 Subject: [PATCH 4/4] fix typos and update documentation --- _typos.toml | 6 ------ docs/design/concurrent/go_op.md | 2 +- docs/design/memory/memory_optimization.md | 2 +- docs/design/others/gan_api.md | 2 +- docs/dev_guides/git_guides/local_dev_guide_cn.md | 2 +- .../{complie_and_test_cn.md => compile_and_test_cn.md} | 0 docs/dev_guides/sugon/index_cn.rst | 4 ++-- docs/guides/advanced/layer_and_model_en.md | 2 +- 8 files changed, 7 insertions(+), 13 deletions(-) rename docs/dev_guides/sugon/{complie_and_test_cn.md => compile_and_test_cn.md} (100%) diff --git a/_typos.toml b/_typos.toml index f5146d2073a..e72230b0dda 100644 --- a/_typos.toml +++ b/_typos.toml @@ -107,13 +107,7 @@ classfication = "classfication" classfy = "classfy" cliping = "cliping" colunms = "colunms" -commmit = "commmit" -complie = "complie" -condtional = "condtional" -conjuction = "conjuction" containg = "containg" -contruct = "contruct" -contructed = "contructed" contruction = "contruction" contxt = "contxt" convertion = "convertion" diff --git a/docs/design/concurrent/go_op.md b/docs/design/concurrent/go_op.md index 286db8f86e3..1248829f560 100644 --- a/docs/design/concurrent/go_op.md +++ b/docs/design/concurrent/go_op.md @@ -3,7 +3,7 @@ ## Introduction The **go_op** allows user's of PaddlePaddle to run program blocks on a detached -thread. It works in conjuction with CSP operators (channel_send, +thread. It works in conjunction with CSP operators (channel_send, channel_receive, channel_open, channel_close, and select) to allow users to concurrently process data and communicate easily between different threads. diff --git a/docs/design/memory/memory_optimization.md b/docs/design/memory/memory_optimization.md index 7012db070dc..437b3975656 100644 --- a/docs/design/memory/memory_optimization.md +++ b/docs/design/memory/memory_optimization.md @@ -99,7 +99,7 @@ At last, we take basic strategy and liveness analysis techniques learning from c In-place is a built-in attribute of an operator. Since we treat in-place and other operators differently, we have to add an in-place attribute for every operator. -#### contruct control flow graph +#### construct control flow graph Following is the ProgramDesc protobuf of [machine translation](https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/fluid/tests/book/test_machine_translation.py) example. diff --git a/docs/design/others/gan_api.md b/docs/design/others/gan_api.md index 090bd6eaa78..b45fbeb538a 100644 --- a/docs/design/others/gan_api.md +++ b/docs/design/others/gan_api.md @@ -42,7 +42,7 @@ build the whole GAN model, define training loss for both generator and discrimat To be more detailed, we introduce our design of DCGAN as following: ### Class member Function: Initializer -- Set up hyper-parameters, including condtional dimension, noise dimension, batch size and so forth. +- Set up hyper-parameters, including conditional dimension, noise dimension, batch size and so forth. - Declare and define all the model variables. All the discriminator parameters are included in the list self.theta_D and all the generator parameters are included in the list self.theta_G. ```python class DCGAN: diff --git a/docs/dev_guides/git_guides/local_dev_guide_cn.md b/docs/dev_guides/git_guides/local_dev_guide_cn.md index 5a32cbba40a..747fb59421f 100644 --- a/docs/dev_guides/git_guides/local_dev_guide_cn.md +++ b/docs/dev_guides/git_guides/local_dev_guide_cn.md @@ -116,7 +116,7 @@ clang-format.......................................(no files to check)Skipped create mode 100644 233 ``` -可以看到,在执行`git commit`后,输出了一些额外的信息。这是使用`pre-commmit`进行代码风格检查的结果,关于代码风格检查的使用问题请参考[代码风格检查指南](./codestyle_check_guide_cn.html)。 +可以看到,在执行`git commit`后,输出了一些额外的信息。这是使用`pre-commit`进行代码风格检查的结果,关于代码风格检查的使用问题请参考[代码风格检查指南](./codestyle_check_guide_cn.html)。 ## 保持本地仓库最新 diff --git a/docs/dev_guides/sugon/complie_and_test_cn.md b/docs/dev_guides/sugon/compile_and_test_cn.md similarity index 100% rename from docs/dev_guides/sugon/complie_and_test_cn.md rename to docs/dev_guides/sugon/compile_and_test_cn.md diff --git a/docs/dev_guides/sugon/index_cn.rst b/docs/dev_guides/sugon/index_cn.rst index 84d57649217..4dc16f73b41 100644 --- a/docs/dev_guides/sugon/index_cn.rst +++ b/docs/dev_guides/sugon/index_cn.rst @@ -4,7 +4,7 @@ 以下将说明 Paddle 适配曙光相关的开发指南: -- `曙光智算平台-Paddle 源码编译和单测执行 <./complie_and_test_cn.html>`_ : 如何曙光曙光智算平台编译 Paddle 源码编译并执行单测。 +- `曙光智算平台-Paddle 源码编译和单测执行 <./compile_and_test_cn.html>`_ : 如何曙光曙光智算平台编译 Paddle 源码编译并执行单测。 - `Paddle 适配 C86 加速卡详解 <./paddle_c86_cn.html>`_ : 详解 Paddle 适配 C86 加速卡。 - `Paddle 框架下 ROCm(HIP)算子单测修复指导 <./paddle_c86_fix_guides_cn.html>`_ : 指导 Paddle 框架下 ROCm(HIP)算子单测修复。 @@ -12,6 +12,6 @@ .. toctree:: :hidden: - complie_and_test_cn.md + compile_and_test_cn.md paddle_c86_cn.md paddle_c86_fix_guides_cn.md diff --git a/docs/guides/advanced/layer_and_model_en.md b/docs/guides/advanced/layer_and_model_en.md index 7f6ad3584d3..c5c89b3d41c 100644 --- a/docs/guides/advanced/layer_and_model_en.md +++ b/docs/guides/advanced/layer_and_model_en.md @@ -27,7 +27,7 @@ class Model(paddle.nn.Layer): return y ``` -Here we contructed a ``Model`` which inherited from ``paddle.nn.Layer``. This model only holds a single layer of ``paddle.nn.Flatten``, which flattens the input variables **inputs** upon execution. +Here we constructed a ``Model`` which inherited from ``paddle.nn.Layer``. This model only holds a single layer of ``paddle.nn.Flatten``, which flattens the input variables **inputs** upon execution. ## Sublayers