Skip to content

Commit 164247f

Browse files
authored
[ProcessGroup] Add docs_cn of new process group apis (#4969)
1 parent 7528b0e commit 164247f

File tree

5 files changed

+109
-0
lines changed

5 files changed

+109
-0
lines changed

docs/api/api_label

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ paddle.distributed.all_reduce .. _api_paddle_distributed_all_reduce:
4141
paddle.distributed.scatter .. _api_paddle_distributed_scatter:
4242
paddle.distributed.alltoall .. _api_paddle_distributed_alltoall:
4343
paddle.distributed.send .. _api_paddle_distributed_send:
44+
paddle.distributed.is_initialized .. _api_paddle_distributed_is_initialized:
45+
paddle.distributed.isend .. _api_paddle_distributed_isend:
46+
paddle.distributed.irecv .. _api_paddle_distributed_irecv:
47+
paddle.distributed.reduce_scatter .. _api_paddle_distributed_reduce_scatter:
4448
paddle.distributed.QueueDataset .. _api_paddle_distributed_QueueDataset:
4549
paddle.distributed.barrier .. _api_paddle_distributed_barrier:
4650
paddle.distributed.CountFilterEntry .. _api_paddle_distributed_CountFilterEntry:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. _cn_api_paddle_distributed_irecv:
2+
3+
irecv
4+
-------------------------------
5+
6+
7+
.. py:function:: paddle.distributed.irecv(tensor, src=None, group=None)
8+
异步接受发送来的tensor。
9+
10+
参数
11+
:::::::::
12+
- tensor (Tensor) - 要接受的张量。其数据类型应为 float16、float32、float64、int32 或 int64。
13+
- src (int) - 接受节点的全局rank号。
14+
- group (Group,可选) - new_group返回的Group实例,或者设置为None表示默认的全局组。默认值:None。
15+
16+
17+
返回
18+
:::::::::
19+
返回Task。
20+
21+
注意
22+
:::::::::
23+
当前只支持动态图
24+
25+
代码示例
26+
:::::::::
27+
COPY-FROM: paddle.distributed.irecv
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _cn_api_distributed_is_initialized:
2+
3+
is_initialized
4+
-------------------------------
5+
6+
7+
.. py:function:: paddle.distributed.is_initialized()
8+
9+
检查分布式环境是否已经被初始化
10+
11+
参数
12+
:::::::::
13+
14+
15+
返回
16+
:::::::::
17+
如果分布式环境初始化完成,默认通信组已完成建立,则返回True;反之则返回False。
18+
19+
代码示例
20+
:::::::::
21+
COPY-FROM: paddle.distributed.is_initialized
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. _cn_api_paddle_distributed_isend:
2+
3+
isend
4+
-------------------------------
5+
6+
7+
.. py:function:: paddle.distributed.isend(tensor, dst, group=None)
8+
异步的将 ``tensor`` 发送到指定的rank进程上。
9+
10+
参数
11+
:::::::::
12+
- tensor (Tensor) - 要发送的张量。其数据类型应为 float16、float32、float64、int32 或 int64。
13+
- dst (int) - 目标节点的全局rank号。
14+
- group (Group,可选) - new_group返回的Group实例,或者设置为None表示默认的全局组。默认值:None。
15+
16+
17+
返回
18+
:::::::::
19+
返回Task。
20+
21+
22+
注意
23+
:::::::::
24+
当前只支持动态图
25+
26+
代码示例
27+
:::::::::
28+
COPY-FROM: paddle.distributed.isend
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. _cn_api_paddle_distributed_reduce_scatter:
2+
3+
reduce_scatter
4+
-------------------------------
5+
6+
7+
.. py:function:: paddle.distributed.reduce_scatter(tensor, tensor_list, op=ReduceOp.SUM, group=None, use_calc_stream=True)
8+
规约,然后将张量列表分散到组中的所有进程上
9+
10+
参数
11+
:::::::::
12+
- tensor (Tensor) – 输出的张量。
13+
- tensor_list (list(Tensor)) – 归约和切分的张量列表。
14+
- op (ReduceOp.SUM|ReduceOp.MAX|ReduceOp.Min|ReduceOp.PROD) – 操作类型,默认ReduceOp.SUM。
15+
- group: (Group, optional) – 通信组;如果是None,则使用默认通信组。
16+
- use_calc_stream: (bool, optional) – 决定是在计算流还是通信流上做该通信操作;默认为True,表示在计算流。
17+
18+
19+
返回
20+
:::::::::
21+
返回Task。
22+
23+
注意
24+
:::::::::
25+
当前只支持动态图
26+
27+
代码示例
28+
:::::::::
29+
COPY-FROM: paddle.distributed.reduce_scatter

0 commit comments

Comments
 (0)