Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
72a2af48
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
72a2af48
编写于
7月 26, 2021
作者:
李
李季
提交者:
GitHub
7月 26, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix the docs bug in collective file. (#34374)
* fix the docs bug in collective file
上级
539d7185
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
0 deletion
+12
-0
python/paddle/distributed/collective.py
python/paddle/distributed/collective.py
+12
-0
未找到文件。
python/paddle/distributed/collective.py
浏览文件 @
72a2af48
...
...
@@ -1341,6 +1341,7 @@ def split(x,
Examples:
.. code-block:: python
# required: distributed
import paddle
import paddle.distributed.fleet as fleet
...
...
@@ -1456,6 +1457,7 @@ def split(x,
def
alltoall
(
in_tensor_list
,
out_tensor_list
,
group
=
None
,
use_calc_stream
=
True
):
"""
Scatter tensors in in_tensor_list to all participators and gather the result tensors in out_tensor_list.
Args:
in_tensor_list (list): A list of input Tensors. Every element in the list must be a Tensor whose data type
should be float16, float32, float64, int32 or int64.
...
...
@@ -1463,14 +1465,18 @@ def alltoall(in_tensor_list, out_tensor_list, group=None, use_calc_stream=True):
data type of the input Tensors.
group (Group, optional): The group instance return by new_group or None for global default group. Default: None.
use_calc_stream (bool, optional): Wether to use calculation stream (True) or communication stream. Default: True.
Returns:
None.
Examples:
.. code-block:: python
# required: distributed
import numpy as np
import paddle
from paddle.distributed import init_parallel_env
init_parallel_env()
out_tensor_list = []
if paddle.distributed.ParallelEnv().rank == 0:
...
...
@@ -1535,14 +1541,17 @@ def send(tensor, dst=0, group=None, use_calc_stream=True):
dst (int): The destination rank id.
group (Group, optional): The group instance return by new_group or None for global default group. Default: None.
use_calc_stream (bool, optional): Whether to use calculate stream or communication stream. Default: True.
Returns:
None.
Examples:
.. code-block:: python
# required: distributed
import paddle
from paddle.distributed import init_parallel_env
init_parallel_env()
if paddle.distributed.ParallelEnv().rank == 0:
data = paddle.to_tensor([7, 8, 9])
...
...
@@ -1585,14 +1594,17 @@ def recv(tensor, src=0, group=None, use_calc_stream=True):
src (int): The source rank id.
group (Group, optional): The group instance return by new_group or None for global default group. Default: None.
use_calc_stream (bool, optional): Whether to use calculate stream or communication stream. Default: True.
Returns:
None.
Examples:
.. code-block:: python
# required: distributed
import paddle
from paddle.distributed import init_parallel_env
init_parallel_env()
if paddle.distributed.ParallelEnv().rank == 0:
data = paddle.to_tensor([7, 8, 9])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录