Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
12c17448
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
12c17448
编写于
9月 19, 2022
作者:
Y
Yulong Ao
提交者:
GitHub
9月 19, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Auto Parallel] Change the import way of Auto Parallel (#46115)
上级
440b96d3
变更
57
隐藏空白更改
内联
并排
Showing
57 changed file
with
65 addition
and
63 deletion
+65
-63
python/paddle/distributed/auto_parallel/engine.py
python/paddle/distributed/auto_parallel/engine.py
+6
-6
python/paddle/distributed/auto_parallel/interface.py
python/paddle/distributed/auto_parallel/interface.py
+2
-2
python/paddle/distributed/auto_parallel/planner.py
python/paddle/distributed/auto_parallel/planner.py
+1
-1
python/paddle/distributed/auto_parallel/strategy.py
python/paddle/distributed/auto_parallel/strategy.py
+1
-1
python/paddle/distributed/fleet/__init__.py
python/paddle/distributed/fleet/__init__.py
+2
-0
python/paddle/fluid/tests/unittests/auto_parallel/amp_pass_unittest.py
.../fluid/tests/unittests/auto_parallel/amp_pass_unittest.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_model.py
...s/unittests/auto_parallel/auto_parallel_relaunch_model.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py
.../auto_parallel/auto_parallel_relaunch_with_gpt_planner.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/clip_grad_by_global_norm.py
...tests/unittests/auto_parallel/clip_grad_by_global_norm.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/engine_api.py
.../paddle/fluid/tests/unittests/auto_parallel/engine_api.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/engine_api_dp.py
...ddle/fluid/tests/unittests/auto_parallel/engine_api_dp.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/get_gpt_model.py
...ddle/fluid/tests/unittests/auto_parallel/get_gpt_model.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/gradient_merge_pass_unittest.py
...s/unittests/auto_parallel/gradient_merge_pass_unittest.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/high_order_grad.py
...le/fluid/tests/unittests/auto_parallel/high_order_grad.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/iterable_dataset.py
...e/fluid/tests/unittests/auto_parallel/iterable_dataset.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/optimization_tuner_api.py
...d/tests/unittests/auto_parallel/optimization_tuner_api.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/recompute_pass_unittest.py
.../tests/unittests/auto_parallel/recompute_pass_unittest.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/sharding_pass_unittest.py
...d/tests/unittests/auto_parallel/sharding_pass_unittest.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_base_cost.py
...dle/fluid/tests/unittests/auto_parallel/test_base_cost.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_context.py
.../fluid/tests/unittests/auto_parallel/test_dist_context.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_embedding.py
...luid/tests/unittests/auto_parallel/test_dist_embedding.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_matmul.py
...e/fluid/tests/unittests/auto_parallel/test_dist_matmul.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_op_cost.py
.../fluid/tests/unittests/auto_parallel/test_dist_op_cost.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_pnorm.py
...le/fluid/tests/unittests/auto_parallel/test_dist_pnorm.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_reshape.py
.../fluid/tests/unittests/auto_parallel/test_dist_reshape.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_slice.py
...le/fluid/tests/unittests/auto_parallel/test_dist_slice.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_interface.py
...dle/fluid/tests/unittests/auto_parallel/test_interface.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_lr_grad_clip.py
.../fluid/tests/unittests/auto_parallel/test_lr_grad_clip.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_pass_quantization.py
...d/tests/unittests/auto_parallel/test_pass_quantization.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_prim_dist_op.py
.../fluid/tests/unittests/auto_parallel/test_prim_dist_op.py
+2
-2
python/paddle/fluid/tests/unittests/auto_parallel/test_process_mesh.py
.../fluid/tests/unittests/auto_parallel/test_process_mesh.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_strategy.py
...ddle/fluid/tests/unittests/auto_parallel/test_strategy.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_to_static.py
...dle/fluid/tests/unittests/auto_parallel/test_to_static.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_completion.py
...tests/unittests/auto_parallel/test_while_op_completion.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_partition.py
.../tests/unittests/auto_parallel/test_while_op_partition.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel_autoconvert.py
...paddle/fluid/tests/unittests/auto_parallel_autoconvert.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel_data_unshard.py
...addle/fluid/tests/unittests/auto_parallel_data_unshard.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py
...n/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py
+1
-1
python/paddle/fluid/tests/unittests/auto_parallel_save_load.py
...n/paddle/fluid/tests/unittests/auto_parallel_save_load.py
+1
-1
python/paddle/fluid/tests/unittests/collective/fleet/auto_parallel_parallelizer.py
.../unittests/collective/fleet/auto_parallel_parallelizer.py
+1
-1
python/paddle/fluid/tests/unittests/distributed_passes/auto_parallel_pass_test_base.py
...ttests/distributed_passes/auto_parallel_pass_test_base.py
+1
-1
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py
...ses/test_auto_parallel_data_parallel_optimization_pass.py
+1
-1
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_gradient_merge_pass.py
...tributed_passes/test_auto_parallel_gradient_merge_pass.py
+1
-1
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_recompute_pass.py
...s/distributed_passes/test_auto_parallel_recompute_pass.py
+1
-1
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_sharding_pass.py
...ts/distributed_passes/test_auto_parallel_sharding_pass.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_completion.py
...le/fluid/tests/unittests/test_auto_parallel_completion.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_completion_gpt.py
...luid/tests/unittests/test_auto_parallel_completion_gpt.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_cost_model.py
...le/fluid/tests/unittests/test_auto_parallel_cost_model.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_dist_tensor.py
...e/fluid/tests/unittests/test_auto_parallel_dist_tensor.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_mapper.py
...paddle/fluid/tests/unittests/test_auto_parallel_mapper.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_partitioner.py
...e/fluid/tests/unittests/test_auto_parallel_partitioner.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_partitioner_gpt.py
...uid/tests/unittests/test_auto_parallel_partitioner_gpt.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard.py
...addle/fluid/tests/unittests/test_auto_parallel_reshard.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard_dpmppp.py
...luid/tests/unittests/test_auto_parallel_reshard_dpmppp.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard_mppp.py
.../fluid/tests/unittests/test_auto_parallel_reshard_mppp.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard_serial.py
...luid/tests/unittests/test_auto_parallel_reshard_serial.py
+1
-1
python/paddle/fluid/tests/unittests/test_auto_parallel_searcher.py
...ddle/fluid/tests/unittests/test_auto_parallel_searcher.py
+1
-1
未找到文件。
python/paddle/distributed/auto_parallel/engine.py
浏览文件 @
12c17448
...
...
@@ -81,7 +81,7 @@ class Engine:
import paddle
import paddle.vision.transforms as T
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
from paddle.vision.datasets import MNIST
transform = T.Compose([
...
...
@@ -540,7 +540,7 @@ class Engine:
import paddle
import paddle.vision.transforms as T
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
from paddle.vision.datasets import MNIST
transform = T.Compose([
...
...
@@ -663,7 +663,7 @@ class Engine:
import paddle
import paddle.vision.transforms as T
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
from paddle.vision.datasets import MNIST
transform = T.Compose([
...
...
@@ -771,7 +771,7 @@ class Engine:
import paddle
import paddle.vision.transforms as T
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
from paddle.vision.datasets import MNIST
transform = T.Compose([
...
...
@@ -1041,7 +1041,7 @@ class Engine:
.. code-block:: python
import paddle
import paddle.vision.transforms as T
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
from paddle.vision.datasets import MNIST
transform = T.Compose([
...
...
@@ -1107,7 +1107,7 @@ class Engine:
.. code-block:: python
import paddle
import paddle.vision.transforms as T
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
from paddle.vision.datasets import MNIST
transform = T.Compose([
...
...
python/paddle/distributed/auto_parallel/interface.py
浏览文件 @
12c17448
...
...
@@ -55,7 +55,7 @@ def shard_tensor(x, process_mesh=None, shard_spec=None):
.. code-block:: python
import paddle
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
mesh = auto.ProcessMesh([[0, 1], [2, 3]], dim_names=["x", "y"])
x = paddle.ones([4, 6])
...
...
@@ -129,7 +129,7 @@ def shard_op(op, process_mesh=None, in_shard_specs=None, out_shard_specs=None):
.. code-block:: python
import paddle
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
x = paddle.ones([4, 6])
y = paddle.zeros([4, 6])
...
...
python/paddle/distributed/auto_parallel/planner.py
浏览文件 @
12c17448
...
...
@@ -22,7 +22,7 @@ from collections import OrderedDict
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
.cost_model
import
estimate_cost
from
.dist_op
import
DistributedOperator
from
.process_group
import
_g_process_group_map
...
...
python/paddle/distributed/auto_parallel/strategy.py
浏览文件 @
12c17448
...
...
@@ -130,7 +130,7 @@ class Strategy(BaseConfig):
.. code-block:: python
import paddle
import paddle.distributed.auto_parallel as
auto
from paddle.distributed.fleet import
auto
strategy = auto.Strategy()
sharding = strategy.sharding
...
...
python/paddle/distributed/fleet/__init__.py
浏览文件 @
12c17448
...
...
@@ -90,3 +90,5 @@ distributed_model = distributed_model
shrink
=
fleet
.
shrink
get_hybrid_communicate_group
=
fleet
.
get_hybrid_communicate_group
distributed_scaler
=
distributed_scaler
from
..
import
auto_parallel
as
auto
python/paddle/fluid/tests/unittests/auto_parallel/amp_pass_unittest.py
浏览文件 @
12c17448
...
...
@@ -18,7 +18,7 @@ import random
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
from
get_gpt_model
import
generate_model
,
create_data_holder
,
FakeDataset
...
...
python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_model.py
浏览文件 @
12c17448
...
...
@@ -28,7 +28,7 @@ import paddle.utils as utils
from
paddle.fluid
import
layers
from
paddle.io
import
IterableDataset
,
DataLoader
from
paddle.distributed
import
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
paddle
.
enable_static
()
_global_parallel_strategy
=
None
...
...
python/paddle/fluid/tests/unittests/auto_parallel/auto_parallel_relaunch_with_gpt_planner.py
浏览文件 @
12c17448
...
...
@@ -19,7 +19,7 @@ import sys
import
numpy
as
np
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
auto_parallel_relaunch_model
import
mlp_pretrain_forward
from
auto_parallel_relaunch_model
import
batch_generator_creator
...
...
python/paddle/fluid/tests/unittests/auto_parallel/clip_grad_by_global_norm.py
浏览文件 @
12c17448
...
...
@@ -18,7 +18,7 @@ import random
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
from
get_gpt_model
import
generate_model
,
create_data_holder
,
FakeDataset
...
...
python/paddle/fluid/tests/unittests/auto_parallel/engine_api.py
浏览文件 @
12c17448
...
...
@@ -28,7 +28,7 @@ import paddle.utils as utils
from
paddle.fluid
import
layers
from
paddle.io
import
Dataset
,
IterableDataset
,
DataLoader
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.optimizer.lr
import
CosineAnnealingDecay
from
paddle.fluid.dataloader.collate
import
default_collate_fn
...
...
python/paddle/fluid/tests/unittests/auto_parallel/engine_api_dp.py
浏览文件 @
12c17448
...
...
@@ -28,7 +28,7 @@ import paddle.utils as utils
from
paddle.fluid
import
layers
from
paddle.io
import
Dataset
,
DataLoader
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
paddle
.
enable_static
()
batch_size
=
2
...
...
python/paddle/fluid/tests/unittests/auto_parallel/get_gpt_model.py
浏览文件 @
12c17448
...
...
@@ -17,7 +17,7 @@ import numpy as np
import
random
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
sys
.
path
.
append
(
".."
)
import
auto_parallel_gpt_model
as
modeling
...
...
python/paddle/fluid/tests/unittests/auto_parallel/gradient_merge_pass_unittest.py
浏览文件 @
12c17448
...
...
@@ -18,7 +18,7 @@ import random
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
from
get_gpt_model
import
generate_model
,
create_data_holder
,
FakeDataset
...
...
python/paddle/fluid/tests/unittests/auto_parallel/high_order_grad.py
浏览文件 @
12c17448
...
...
@@ -16,7 +16,7 @@ import random
import
paddle
import
unittest
import
numpy
as
np
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.incubate.autograd
import
Hessian
np
.
random
.
seed
(
1234
)
...
...
python/paddle/fluid/tests/unittests/auto_parallel/iterable_dataset.py
浏览文件 @
12c17448
...
...
@@ -29,7 +29,7 @@ from paddle.fluid import layers
from
paddle.io
import
Dataset
,
IterableDataset
,
DataLoader
from
paddle.static
import
InputSpec
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.optimizer.lr
import
CosineAnnealingDecay
from
paddle.fluid.dataloader.collate
import
default_collate_fn
...
...
python/paddle/fluid/tests/unittests/auto_parallel/optimization_tuner_api.py
浏览文件 @
12c17448
...
...
@@ -28,7 +28,7 @@ import paddle.utils as utils
from
paddle.fluid
import
layers
from
paddle.io
import
Dataset
,
IterableDataset
,
DataLoader
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
engine_api_dp
import
MyDataset
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/auto_parallel/recompute_pass_unittest.py
浏览文件 @
12c17448
...
...
@@ -18,7 +18,7 @@ import random
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
from
get_gpt_model
import
generate_model
,
create_data_holder
,
FakeDataset
...
...
python/paddle/fluid/tests/unittests/auto_parallel/sharding_pass_unittest.py
浏览文件 @
12c17448
...
...
@@ -18,7 +18,7 @@ import random
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid.dygraph.parallel
import
ParallelEnv
from
get_gpt_model
import
generate_model
,
create_data_holder
,
FakeDataset
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_base_cost.py
浏览文件 @
12c17448
...
...
@@ -24,7 +24,7 @@ import paddle.nn as nn
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_context.py
浏览文件 @
12c17448
...
...
@@ -25,7 +25,7 @@ import paddle.static as static
import
paddle.nn.functional
as
F
from
paddle.distributed
import
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_embedding.py
浏览文件 @
12c17448
...
...
@@ -14,7 +14,7 @@
import
unittest
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid
import
program_guard
from
paddle.fluid.backward
import
append_backward
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_matmul.py
浏览文件 @
12c17448
...
...
@@ -14,7 +14,7 @@
import
unittest
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid
import
program_guard
from
paddle.fluid.backward
import
append_backward
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_op_cost.py
浏览文件 @
12c17448
...
...
@@ -16,7 +16,7 @@ import unittest
import
copy
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.cluster
import
Cluster
from
paddle.distributed.auto_parallel.operators.common
import
get_distributed_operator_impl_container
,
is_elementwise_op
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_pnorm.py
浏览文件 @
12c17448
...
...
@@ -14,7 +14,7 @@
import
unittest
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid
import
program_guard
from
paddle.fluid.backward
import
append_backward
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_reshape.py
浏览文件 @
12c17448
...
...
@@ -14,7 +14,7 @@
import
unittest
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid
import
program_guard
from
paddle.fluid.backward
import
append_backward
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_dist_slice.py
浏览文件 @
12c17448
...
...
@@ -14,7 +14,7 @@
import
unittest
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_interface.py
浏览文件 @
12c17448
...
...
@@ -21,7 +21,7 @@ import paddle.nn as nn
import
paddle.nn.functional
as
F
import
paddle.static
as
static
import
paddle.distributed
as
dist
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.dist_context
import
get_default_distributed_context
from
paddle.distributed.auto_parallel.process_mesh
import
ProcessMesh
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_lr_grad_clip.py
浏览文件 @
12c17448
...
...
@@ -20,7 +20,7 @@ import numpy as np
import
paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
import
paddle.distributed.fleet
as
fleet
from
paddle.io
import
Dataset
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_pass_quantization.py
浏览文件 @
12c17448
...
...
@@ -18,7 +18,7 @@ import random
import
numpy
as
np
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
get_gpt_model
import
generate_model
,
create_data_holder
,
FakeDataset
paddle
.
enable_static
()
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_prim_dist_op.py
浏览文件 @
12c17448
...
...
@@ -14,13 +14,13 @@
import
unittest
import
paddle
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid
import
program_guard
from
paddle.incubate.autograd
import
prim2orig
,
enable_prim
,
prim_enabled
from
paddle.fluid.layer_helper
import
LayerHelper
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.partitioner
import
Partitioner
from
paddle.distributed.auto_parallel.utils
import
set_var_dist_attr
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_process_mesh.py
浏览文件 @
12c17448
...
...
@@ -19,7 +19,7 @@ import paddle.fluid as fluid
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.static
as
static
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.process_mesh
import
ProcessMesh
from
paddle.distributed.auto_parallel.dist_context
import
get_default_distributed_context
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_strategy.py
浏览文件 @
12c17448
...
...
@@ -15,7 +15,7 @@
import
os
# import yaml
import
unittest
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
class
TestStrategy
(
unittest
.
TestCase
):
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_to_static.py
浏览文件 @
12c17448
...
...
@@ -20,7 +20,7 @@ import numpy as np
import
paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
import
paddle.distributed.fleet
as
fleet
from
paddle
import
LazyGuard
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_completion.py
浏览文件 @
12c17448
...
...
@@ -19,7 +19,7 @@ import paddle.nn as nn
import
paddle.utils
as
utils
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed
import
fleet
from
paddle.distributed.auto_parallel.completion
import
Completer
...
...
python/paddle/fluid/tests/unittests/auto_parallel/test_while_op_partition.py
浏览文件 @
12c17448
...
...
@@ -20,7 +20,7 @@ import paddle.utils as utils
import
paddle.fluid
as
fluid
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed
import
fleet
from
paddle.distributed.auto_parallel.completion
import
Completer
...
...
python/paddle/fluid/tests/unittests/auto_parallel_autoconvert.py
浏览文件 @
12c17448
...
...
@@ -25,7 +25,7 @@ import paddle.nn as nn
import
paddle.utils
as
utils
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed
import
fleet
from
paddle.fluid.initializer
import
NumpyArrayInitializer
...
...
python/paddle/fluid/tests/unittests/auto_parallel_data_unshard.py
浏览文件 @
12c17448
...
...
@@ -23,7 +23,7 @@ import random
import
paddle
import
paddle.nn
as
nn
import
paddle.fluid.core
as
core
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
import
paddle.nn.functional
as
F
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/auto_parallel_gpt_model.py
浏览文件 @
12c17448
...
...
@@ -22,7 +22,7 @@ import paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
import
paddle.tensor
as
tensor
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle
import
fluid
from
paddle.fluid
import
layers
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/auto_parallel_save_load.py
浏览文件 @
12c17448
...
...
@@ -25,7 +25,7 @@ import paddle.nn as nn
import
paddle.utils
as
utils
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed
import
fleet
from
paddle.fluid.initializer
import
NumpyArrayInitializer
...
...
python/paddle/fluid/tests/unittests/collective/fleet/auto_parallel_parallelizer.py
浏览文件 @
12c17448
...
...
@@ -23,7 +23,7 @@ import paddle.nn.functional as F
import
paddle.utils
as
utils
from
paddle.fluid
import
layers
from
paddle.distributed
import
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
import
paddle.fluid.core
as
core
...
...
python/paddle/fluid/tests/unittests/distributed_passes/auto_parallel_pass_test_base.py
浏览文件 @
12c17448
...
...
@@ -25,7 +25,7 @@ from collections import OrderedDict
from
dist_pass_test_base
import
DistPassTestBase
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
sys
.
path
.
append
(
".."
)
import
auto_parallel_gpt_model
as
modeling
...
...
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_data_parallel_optimization_pass.py
浏览文件 @
12c17448
...
...
@@ -20,7 +20,7 @@ import unittest
import
paddle
import
paddle.nn
as
nn
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.dist_context
import
get_default_distributed_context
from
paddle.distributed.passes
import
new_pass
,
PassManager
,
PassContext
from
auto_parallel_pass_test_base
import
AutoPallelPassTestBase
...
...
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_gradient_merge_pass.py
浏览文件 @
12c17448
...
...
@@ -26,7 +26,7 @@ import paddle.utils as utils
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.fluid.initializer
import
NumpyArrayInitializer
from
auto_parallel_pass_test_base
import
AutoPallelPassTestBase
...
...
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_recompute_pass.py
浏览文件 @
12c17448
...
...
@@ -20,7 +20,7 @@ import unittest
import
paddle
import
paddle.nn
as
nn
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.passes
import
new_pass
,
PassManager
from
auto_parallel_pass_test_base
import
AutoPallelPassTestBase
...
...
python/paddle/fluid/tests/unittests/distributed_passes/test_auto_parallel_sharding_pass.py
浏览文件 @
12c17448
...
...
@@ -20,7 +20,7 @@ import unittest
import
paddle
import
paddle.nn
as
nn
import
paddle.distributed.fleet
as
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.passes
import
new_pass
,
PassManager
from
auto_parallel_pass_test_base
import
AutoPallelPassTestBase
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_completion.py
浏览文件 @
12c17448
...
...
@@ -26,7 +26,7 @@ import paddle.utils as utils
import
paddle.tensor
as
tensor
from
paddle.fluid
import
layers
from
paddle.nn.layer.transformer
import
_convert_param_attr_to_list
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.utils
import
check_distributed_attr_for_program
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_completion_gpt.py
浏览文件 @
12c17448
...
...
@@ -30,7 +30,7 @@ from paddle.nn.layer.transformer import _convert_param_attr_to_list
from
paddle.fluid.initializer
import
Normal
,
Constant
,
NumpyArrayInitializer
from
paddle.distributed.fleet
import
fleet
import
paddle.static
as
static
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.utils
import
check_distributed_attr_for_program
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_cost_model.py
浏览文件 @
12c17448
...
...
@@ -22,7 +22,7 @@ import paddle.nn as nn
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_dist_tensor.py
浏览文件 @
12c17448
...
...
@@ -17,7 +17,7 @@ import unittest
import
paddle
from
paddle.fluid
import
core
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed
import
fleet
from
paddle.distributed.auto_parallel.parallelizer
import
AutoParallelizer
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_mapper.py
浏览文件 @
12c17448
...
...
@@ -36,7 +36,7 @@ from paddle.nn.layer.transformer import _convert_param_attr_to_list
from
paddle.fluid.initializer
import
Normal
,
Constant
,
NumpyArrayInitializer
from
paddle.distributed
import
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.parallelizer
import
AutoParallelizer
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_partitioner.py
浏览文件 @
12c17448
...
...
@@ -27,7 +27,7 @@ import paddle.utils as utils
import
paddle.tensor
as
tensor
from
paddle.fluid
import
layers
from
paddle.nn.layer.transformer
import
_convert_param_attr_to_list
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.utils
import
check_distributed_attr_for_program
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_partitioner_gpt.py
浏览文件 @
12c17448
...
...
@@ -30,7 +30,7 @@ from paddle.nn.layer.transformer import _convert_param_attr_to_list
from
paddle.fluid.initializer
import
Normal
,
Constant
,
NumpyArrayInitializer
from
paddle.distributed
import
fleet
import
paddle.static
as
static
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.utils
import
check_distributed_attr_for_program
from
paddle.distributed.auto_parallel.utils
import
print_program_with_dist_attr
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard.py
浏览文件 @
12c17448
...
...
@@ -21,7 +21,7 @@ import paddle.nn as nn
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard_dpmppp.py
浏览文件 @
12c17448
...
...
@@ -21,7 +21,7 @@ import paddle.nn as nn
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard_mppp.py
浏览文件 @
12c17448
...
...
@@ -21,7 +21,7 @@ import paddle.nn as nn
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.completion
import
Completer
from
paddle.distributed.auto_parallel.dist_context
import
DistributedContext
from
paddle.distributed
import
fleet
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_reshard_serial.py
浏览文件 @
12c17448
...
...
@@ -25,7 +25,7 @@ import paddle.nn as nn
import
paddle.static
as
static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.dist_context
import
get_default_distributed_context
from
paddle.distributed
import
fleet
from
paddle.distributed.auto_parallel.partitioner
import
Partitioner
...
...
python/paddle/fluid/tests/unittests/test_auto_parallel_searcher.py
浏览文件 @
12c17448
...
...
@@ -25,7 +25,7 @@ import paddle.static as static
import
paddle.nn.functional
as
F
import
paddle.utils
as
utils
from
paddle.distributed
import
fleet
import
paddle.distributed.auto_parallel
as
auto
from
paddle.distributed.fleet
import
auto
from
paddle.distributed.auto_parallel.cluster
import
Cluster
from
paddle.distributed.auto_parallel.utils
import
SerialProgramInfo
from
paddle.distributed.auto_parallel.planner
import
PlanSpace
,
PlanFilter
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录