From 9b65d4ced1ea546eb2305a47cdefb4c573185144 Mon Sep 17 00:00:00 2001 From: lilong12 Date: Fri, 7 May 2021 10:35:01 +0800 Subject: [PATCH] bug fix, test=develop (#32752) --- python/paddle/distributed/fleet/base/topology.py | 2 +- .../distributed/fleet/meta_parallel/pipeline_parallel.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/distributed/fleet/base/topology.py b/python/paddle/distributed/fleet/base/topology.py index 8f38ba447fcb3..470a4d83aac3f 100644 --- a/python/paddle/distributed/fleet/base/topology.py +++ b/python/paddle/distributed/fleet/base/topology.py @@ -147,7 +147,7 @@ def __init__(self, topology): debug_str = "HybridParallelInfo: rank_id: %d, dp_degree: %d, " \ "mp_degree: %d, pp_degree: %d" % (self.global_rank, self._dp_degree, self._mp_degree,self._pp_degree) - debug_str += "dp_group: %s, mp_group: %s, pp_group: %s, check/clip group: %s" % ( + debug_str += ", dp_group: %s, mp_group: %s, pp_group: %s, check/clip group: %s" % ( self._dp_group, self._mp_group, self._pp_group, self._check_group) logger.info(debug_str) diff --git a/python/paddle/distributed/fleet/meta_parallel/pipeline_parallel.py b/python/paddle/distributed/fleet/meta_parallel/pipeline_parallel.py index 280f1a06e1bfb..79e5bc2ffeda0 100644 --- a/python/paddle/distributed/fleet/meta_parallel/pipeline_parallel.py +++ b/python/paddle/distributed/fleet/meta_parallel/pipeline_parallel.py @@ -136,9 +136,9 @@ def _forward(self, cache_id): self._recv_activations(cache_id) if isinstance(self.caches['inputs'][cache_id], tuple): - inputs = tuple(t.clone() for t in self.caches['inputs'][cache_id]) + inputs = tuple(t for t in self.caches['inputs'][cache_id]) else: - inputs = self.caches['inputs'][cache_id].clone() + inputs = self.caches['inputs'][cache_id] self._clear_grads(inputs) outputs = self._layers.forward(inputs)