-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add cn docs for all_gather_object, modified docs for all_gather, split #5087
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.. _cn_api_distributed_all_gather_object: | ||
|
||
all_gather_object | ||
------------------------------- | ||
|
||
|
||
.. py:function:: paddle.distributed.all_gather_object(object_list, object, group=0) | ||
|
||
进程组内所有进程指定的picklable对象进行聚合操作,并返回给所有进程聚合的结果。和all_gather类似,但可以传入自定义的python对象。 | ||
|
||
.. warning:: | ||
该API只支持动态图模式。 | ||
|
||
参数 | ||
::::::::: | ||
- object_list (list) - 操作的输出Object列表。 | ||
- object (Any) - 操作的输入Object,需要保证输入自定义的Object是picklable的。 | ||
- group (int,可选) - 工作的进程组编号,默认为0。 | ||
|
||
返回 | ||
::::::::: | ||
无 | ||
|
||
代码示例 | ||
::::::::: | ||
COPY-FROM: paddle.distributed.all_gather_object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ split | |
|
||
参数 | ||
::::::::: | ||
- **x** (Tensor) - 输入变量,数据类型为bool、float16、float32、float64、int32、int64的多维Tensor。 | ||
- **x** (Tensor) - 输入变量,数据类型为bool、float16、float32、float64、uint8、int8、int32、int64的多维Tensor。 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 是英文注释写错了,已在代码里修改 |
||
- **num_or_sections** (int|list|tuple) - 如果 ``num_or_sections`` 是一个整数,则表示 Tensor 平均划分为相同大小子 Tensor 的数量。如果 ``num_or_sections`` 是一个 list 或 tuple,那么它的长度代表子 Tensor 的数量,它的元素可以是整数或者形状为[1]的 Tensor,依次代表子 Tensor 需要分割成的维度的大小。list 或 tuple 的长度不能超过输入 Tensor 待分割的维度的大小。在 list 或 tuple 中,至多有一个元素值为-1,表示该值是由 ``x`` 的维度和其他 ``num_or_sections`` 中元素推断出来的。例如对一个维度为[4, 6, 6] Tensor 的第三维进行分割时,指定 ``num_or_sections=[2,-1,1]``,输出的三个 Tensor 维度分别为:[4, 6, 2],[4, 6, 3],[4, 6, 1]。 | ||
- **axis** (int|Tensor,可选) - 整数或者形状为[1]的 Tensor,数据类型为 int32 或 int64。表示需要分割的维度。如果 ``axis < 0``,则划分的维度为 ``rank(x) + axis``。默认值为0。 | ||
- **name** (str,可选) - 具体用法请参见 :ref:`api_guide_Name`,一般无需设置,默认值为 None。 | ||
|
@@ -24,4 +24,4 @@ split | |
代码示例 | ||
::::::::: | ||
|
||
COPY-FROM: paddle.split | ||
COPY-FROM: paddle.split |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么英文里有个warning,中文没有呀?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加