diff --git a/doc/fluid/api/distributed.rst b/doc/fluid/api/distributed.rst index 3f63edea89447ba4dd046eb9582a6a85ce86800e..c42ebc12b360ec4c472a2efd5f45db7520b003b1 100644 --- a/doc/fluid/api/distributed.rst +++ b/doc/fluid/api/distributed.rst @@ -11,9 +11,9 @@ paddle.distributed distributed/ParallelEnv.rst distributed/prepare_context.rst distributed/spawn.rst - distributed/fleet/DistributedStrategy.rst - distributed/fleet/PaddleCloudRoleMaker.rst - distributed/fleet/DatasetFactory.rst - distributed/fleet/UserDefinedRoleMaker.rst - distributed/fleet/UtilBase.rst - + distributed/all_gather.rst + distributed/all_reduce.rst + distributed/barrier.rst + distributed/broadcast.rst + distributed/reduce.rst + distributed/scatter.rst diff --git a/doc/fluid/api/distributed/ParallelEnv.rst b/doc/fluid/api/distributed/ParallelEnv.rst index 46b07c64f0358c4bf322e1325e2c6cb31fd2ea33..0023cc6a3cd3fdd9f3dcd9497007959e3c8db5f8 100644 --- a/doc/fluid/api/distributed/ParallelEnv.rst +++ b/doc/fluid/api/distributed/ParallelEnv.rst @@ -1,5 +1,13 @@ -.. _api_distributed_ParallelEnv: +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_ParallelEnv: ParallelEnv -------------------------------- -:doc_source: paddle.fluid.dygraph.parallel.ParallelEnv \ No newline at end of file +----------- + +.. autoclass:: paddle.distributed.paddle.ParallelEnv + :members: + :inherited-members: + :noindex: + diff --git a/doc/fluid/api/distributed/all_gather.rst b/doc/fluid/api/distributed/all_gather.rst new file mode 100644 index 0000000000000000000000000000000000000000..5b27f6656cac40eef8ef8327a5b8090a5bfa61ce --- /dev/null +++ b/doc/fluid/api/distributed/all_gather.rst @@ -0,0 +1,11 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_all_gather: + +all_gather +---------- + +.. autofunction:: paddle.distributed.paddle.all_gather + :noindex: + diff --git a/doc/fluid/api/distributed/all_reduce.rst b/doc/fluid/api/distributed/all_reduce.rst new file mode 100644 index 0000000000000000000000000000000000000000..b57eda06771458bdc96c1e07cdd38f0da577a011 --- /dev/null +++ b/doc/fluid/api/distributed/all_reduce.rst @@ -0,0 +1,11 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_all_reduce: + +all_reduce +---------- + +.. autofunction:: paddle.distributed.paddle.all_reduce + :noindex: + diff --git a/doc/fluid/api/distributed/barrier.rst b/doc/fluid/api/distributed/barrier.rst new file mode 100644 index 0000000000000000000000000000000000000000..f8c4a9a31b2c0fe77f17b9fae106f8f0657cdbc1 --- /dev/null +++ b/doc/fluid/api/distributed/barrier.rst @@ -0,0 +1,11 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_barrier: + +barrier +------- + +.. autofunction:: paddle.distributed.paddle.barrier + :noindex: + diff --git a/doc/fluid/api/distributed/broadcast.rst b/doc/fluid/api/distributed/broadcast.rst new file mode 100644 index 0000000000000000000000000000000000000000..2708dd524aae555828f02c15700e41a169491949 --- /dev/null +++ b/doc/fluid/api/distributed/broadcast.rst @@ -0,0 +1,11 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_broadcast: + +broadcast +--------- + +.. autofunction:: paddle.distributed.paddle.broadcast + :noindex: + diff --git a/doc/fluid/api/distributed/get_rank.rst b/doc/fluid/api/distributed/get_rank.rst index 98a64831423e486877b47db8cbda7a54d1849f20..276a901ba95df5f3f0a8288dee8460e27a796ad1 100644 --- a/doc/fluid/api/distributed/get_rank.rst +++ b/doc/fluid/api/distributed/get_rank.rst @@ -1,10 +1,11 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_distributed_get_rank: +.. _api_distributed_paddle_get_rank: get_rank -------- -.. autofunction:: paddle.distributed.get_rank - :noindex: \ No newline at end of file +.. autofunction:: paddle.distributed.paddle.get_rank + :noindex: + diff --git a/doc/fluid/api/distributed/get_world_size.rst b/doc/fluid/api/distributed/get_world_size.rst index 2de447e1bc276586e2220b043e9fffe48d21f6db..184227a7f69a1221ebdb36f8c6de91236545c00d 100644 --- a/doc/fluid/api/distributed/get_world_size.rst +++ b/doc/fluid/api/distributed/get_world_size.rst @@ -1,10 +1,11 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_distributed_get_world_size: +.. _api_distributed_paddle_get_world_size: get_world_size -------------- -.. autofunction:: paddle.distributed.get_world_size - :noindex: \ No newline at end of file +.. autofunction:: paddle.distributed.paddle.get_world_size + :noindex: + diff --git a/doc/fluid/api/distributed/init_parallel_env.rst b/doc/fluid/api/distributed/init_parallel_env.rst index 99473dd347676e0f88cce8454ccccf60c5e1da17..f72f11b85ee0c8287bb6cecdd1d3dc18b3986d7d 100644 --- a/doc/fluid/api/distributed/init_parallel_env.rst +++ b/doc/fluid/api/distributed/init_parallel_env.rst @@ -1,10 +1,11 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_distributed_init_parallel_env: +.. _api_distributed_paddle_init_parallel_env: init_parallel_env ----------------- -.. autofunction:: paddle.distributed.init_parallel_env - :noindex: \ No newline at end of file +.. autofunction:: paddle.distributed.paddle.init_parallel_env + :noindex: + diff --git a/doc/fluid/api/distributed/prepare_context.rst b/doc/fluid/api/distributed/prepare_context.rst index abe6865f52ff82032a7e9873f492e5b531407ebf..e9eee3d2762b9c9c98f1dc5b4cfd3185dd467385 100644 --- a/doc/fluid/api/distributed/prepare_context.rst +++ b/doc/fluid/api/distributed/prepare_context.rst @@ -1,5 +1,11 @@ -.. _api_distributed_prepare_context: +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_prepare_context: prepare_context -------------------------------- -:doc_source: paddle.fluid.dygraph.parallel.prepare_context +--------------- + +.. autofunction:: paddle.distributed.paddle.prepare_context + :noindex: + diff --git a/doc/fluid/api/distributed/reduce.rst b/doc/fluid/api/distributed/reduce.rst new file mode 100644 index 0000000000000000000000000000000000000000..b7bcaf925dbe46f447758acd96cf0f47a13c49ae --- /dev/null +++ b/doc/fluid/api/distributed/reduce.rst @@ -0,0 +1,11 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_reduce: + +reduce +------ + +.. autofunction:: paddle.distributed.paddle.reduce + :noindex: + diff --git a/doc/fluid/api/distributed/scatter.rst b/doc/fluid/api/distributed/scatter.rst new file mode 100644 index 0000000000000000000000000000000000000000..a61f52f8c0add8819cdf073cd03930ea4edae6bc --- /dev/null +++ b/doc/fluid/api/distributed/scatter.rst @@ -0,0 +1,11 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_distributed_paddle_scatter: + +scatter +------- + +.. autofunction:: paddle.distributed.paddle.scatter + :noindex: + diff --git a/doc/fluid/api/distributed/spawn.rst b/doc/fluid/api/distributed/spawn.rst index 9c7895932fce5a5c7e55850eb37caabe680ef724..34f5376d9a283fba31360e556b160387a849e0eb 100644 --- a/doc/fluid/api/distributed/spawn.rst +++ b/doc/fluid/api/distributed/spawn.rst @@ -1,10 +1,11 @@ .. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` !DO NOT EDIT THIS FILE MANUALLY! -.. _api_distributed_spawn: +.. _api_distributed_paddle_spawn: spawn ----- -.. autofunction:: paddle.distributed.spawn - :noindex: \ No newline at end of file +.. autofunction:: paddle.distributed.paddle.spawn + :noindex: + diff --git a/doc/fluid/api/fleet.rst b/doc/fluid/api/fleet.rst new file mode 100644 index 0000000000000000000000000000000000000000..eb8e46f226c258b81e95ba790b2c9527ac84c22a --- /dev/null +++ b/doc/fluid/api/fleet.rst @@ -0,0 +1,13 @@ +================== +paddle.distributed.fleet +================== + +.. toctree:: + :maxdepth: 1 + + fleet/Fleet.rst + fleet/DistributedStrategy.rst + fleet/PaddleCloudRoleMaker.rst + fleet/DatasetFactory.rst + fleet/UserDefinedRoleMaker.rst + fleet/UtilBase.rst diff --git a/doc/fluid/api/fleet/Fleet.rst b/doc/fluid/api/fleet/Fleet.rst new file mode 100644 index 0000000000000000000000000000000000000000..eed7bb0caa338f3bf1d8286017da7b12356277d9 --- /dev/null +++ b/doc/fluid/api/fleet/Fleet.rst @@ -0,0 +1,13 @@ +.. THIS FILE IS GENERATED BY `gen_doc.{py|sh}` + !DO NOT EDIT THIS FILE MANUALLY! + +.. _api_fleet_paddle_distributed_Fleet: + +Fleet +----- + +.. autoclass:: paddle.fleet.paddle.distributed.Fleet + :members: + :inherited-members: + :noindex: + diff --git a/doc/fluid/api/gen_doc.py b/doc/fluid/api/gen_doc.py index 1f4f3ad49332e585cc99c23228928dd59138b50a..37732d8f7abfa898aa556d3bfc029aff25597f9c 100644 --- a/doc/fluid/api/gen_doc.py +++ b/doc/fluid/api/gen_doc.py @@ -18,11 +18,14 @@ import sys import types import os import contextlib +import paddle as paddle import paddle.fluid as fluid import paddle.tensor as tensor import paddle.nn as nn import paddle.optimizer as optimizer +import paddle.distributed.fleet as fleet +import paddle.distributed as distributed #import paddle.complex as complex #import paddle.framework as framework @@ -174,16 +177,25 @@ def generate_doc(module_name, module_prefix, output, output_name, if module_prefix == "": module_prefix = None + print("module_name: {}".format(module_name)) + print("module_prefix: {}".format(module_prefix)) + print("output: {}".format(output)) + print("output_name: {}".format(output_name)) + print("output_dir: {}".format(output_dir)) gen = DocGenerator() if module_name is None: gen.module = eval(output_name) gen.module_name = str(output_name) else: + print("output name: {}".format(output_name)) gen.module = eval(output_name) for each_module_name in module_name.split('.'): + print("forloop module name: {}".format(each_module_name)) + print("module") + print(gen.module) if not hasattr(gen.module, each_module_name): - raise ValueError("Cannot find fluid.{0}".format(module_name)) + raise ValueError("Cannot find paddle.{0}".format(module_name)) else: gen.module = getattr(gen.module, each_module_name)