From e4f9415338d27fff9bf34424acdd8c19608be5c6 Mon Sep 17 00:00:00 2001 From: lilong12 Date: Tue, 17 Nov 2020 20:17:14 +0800 Subject: [PATCH] update doc, test=document_fix (#28498) --- python/paddle/distributed/collective.py | 6 ------ python/paddle/tensor/manipulation.py | 3 --- 2 files changed, 9 deletions(-) diff --git a/python/paddle/distributed/collective.py b/python/paddle/distributed/collective.py index b631f7bbe9d..cb3c37975dd 100644 --- a/python/paddle/distributed/collective.py +++ b/python/paddle/distributed/collective.py @@ -107,7 +107,6 @@ def broadcast(tensor, src, group=0): import paddle from paddle.distributed import init_parallel_env - paddle.disable_static() paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id) init_parallel_env() if paddle.distributed.ParallelEnv().local_rank == 0: @@ -165,7 +164,6 @@ def all_reduce(tensor, op=ReduceOp.SUM, group=0): from paddle.distributed import ReduceOp from paddle.distributed import init_parallel_env - paddle.disable_static() paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id) init_parallel_env() if paddle.distributed.ParallelEnv().local_rank == 0: @@ -240,7 +238,6 @@ def reduce(tensor, dst, op=ReduceOp.SUM, group=0): import paddle from paddle.distributed import init_parallel_env - paddle.disable_static() paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id) init_parallel_env() if paddle.distributed.ParallelEnv().local_rank == 0: @@ -323,7 +320,6 @@ def all_gather(tensor_list, tensor, group=0): import paddle from paddle.distributed import init_parallel_env - paddle.disable_static() paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id) init_parallel_env() tensor_list = [] @@ -397,7 +393,6 @@ def scatter(tensor, tensor_list=None, src=0, group=0): import paddle from paddle.distributed import init_parallel_env - paddle.disable_static() paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id) init_parallel_env() if paddle.distributed.ParallelEnv().local_rank == 0: @@ -463,7 +458,6 @@ def barrier(group=0): import paddle from paddle.distributed import init_parallel_env - paddle.disable_static() paddle.set_device('gpu:%d'%paddle.distributed.ParallelEnv().dev_id) init_parallel_env() paddle.distributed.barrier() diff --git a/python/paddle/tensor/manipulation.py b/python/paddle/tensor/manipulation.py index bdda90315ac..a0e5e681c76 100644 --- a/python/paddle/tensor/manipulation.py +++ b/python/paddle/tensor/manipulation.py @@ -1098,7 +1098,6 @@ def tile(x, repeat_times, name=None): import paddle - paddle.disable_static() data = paddle.to_tensor([1, 2, 3], dtype='int32') out = paddle.tile(data, repeat_times=[2, 1]) np_out = out.numpy() @@ -1193,8 +1192,6 @@ def expand_as(x, y, name=None): import paddle - paddle.disable_static() - data_x = paddle.to_tensor([1, 2, 3], 'int32') data_y = paddle.to_tensor([[1, 2, 3], [4, 5, 6]], 'int32') out = paddle.expand_as(data_x, data_y) -- GitLab