Add paddle.distributed dir and docs#2482
Merged
Conversation
…to add_distributed_dir_and_doc
TCChenlong
reviewed
Aug 31, 2020
doc/fluid/api/distributed.rst
Outdated
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| distributed/get_rank |
Collaborator
There was a problem hiding this comment.
get_rank.rst
get_world_size.rst
|
|
||
| 参数 | ||
| ::::::::: | ||
| - func (func) - 由 ``spawn`` 方法启动的进程所调用的目标函数。该目标函数需要能够被 ``pickled`` (序列化),所以目标函数必须定义为模块的一级函数,不能是内部子函数或者类方法。 |
Collaborator
There was a problem hiding this comment.
func(function)。少翻译了一句"This function should be called as..."
Contributor
Author
There was a problem hiding this comment.
done, thx, 这里应该移除英文的,英文的属于迭代过程中的旧版,已在英文PR中移除
| - func (func) - 由 ``spawn`` 方法启动的进程所调用的目标函数。该目标函数需要能够被 ``pickled`` (序列化),所以目标函数必须定义为模块的一级函数,不能是内部子函数或者类方法。 | ||
| - args (tuple, 可选) - 传入目标函数 ``func`` 的参数。 | ||
| - nprocs (int, 可选) - 启动进程的数目。默认值为-1。当 ``nproc`` 为-1时,模型执行时将会从环境变量中获取当前可用的所有设备进行使用:如果使用GPU执行任务,将会从环境变量 ``CUDA_VISIBLE_DEVICES`` 中获取当前所有可用的设备ID;如果使用CPU执行任务,将会从环境变量 ``CPU_NUM`` 中获取当前可用的CPU设备数,例如,可以通过指令 ``export CPU_NUM=4`` 配置默认可用CPU设备数,如果此环境变量没有设置,将会默认设置该环境变量的值为1。 | ||
| - join (bool, 可选) - 对所有启动的进程执行阻塞的 ``join`` ,等待进程执行结束。 |
|
|
||
| 初始化动态图模式下的并行训练环境。 | ||
|
|
||
| .. note:: |
| @@ -77,38 +100,53 @@ DataParallel | |||
|
|
|||
| .. code-block:: python | |||
|
|
|||
…lePaddle/FluidDoc into add_distributed_dir_and_doc
TCChenlong
reviewed
Aug 31, 2020
|
|
||
| get_world_size | ||
| ---------------- | ||
|
|
Collaborator
There was a problem hiding this comment.
少了函数声明:
.. py:function:: paddle.distributed. get_world_size()
|
|
||
| init_parallel_env | ||
| ----------------- | ||
|
|
|
|
||
| spawn | ||
| ----- | ||
|
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add paddle.distributed dir and docs
Related PR: PaddlePaddle/Paddle#26044, PaddlePaddle/Paddle#26773