From f925d1dcfa417a384f5b299f25d515ca350e859a Mon Sep 17 00:00:00 2001 From: Wen Sun <35923278+HermitSun@users.noreply.github.com> Date: Wed, 21 Sep 2022 15:34:41 +0800 Subject: [PATCH] fix(distributed/communication/stream): fix cannot import in python 3.6 (#46308) --- python/paddle/distributed/communication/stream/all_reduce.py | 2 +- python/paddle/distributed/communication/stream/recv.py | 2 +- python/paddle/distributed/communication/stream/send.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle/distributed/communication/stream/all_reduce.py b/python/paddle/distributed/communication/stream/all_reduce.py index f94422f4bd0..e4cfa6d3218 100644 --- a/python/paddle/distributed/communication/stream/all_reduce.py +++ b/python/paddle/distributed/communication/stream/all_reduce.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.distributed.collective as collective import paddle.fluid.framework as framework +from paddle.distributed import collective def _all_reduce_in_dygraph(tensor, op, group, sync_op, use_calc_stream): diff --git a/python/paddle/distributed/communication/stream/recv.py b/python/paddle/distributed/communication/stream/recv.py index b225f64b8b4..8b77fa51b0d 100644 --- a/python/paddle/distributed/communication/stream/recv.py +++ b/python/paddle/distributed/communication/stream/recv.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.distributed.collective as collective import paddle.fluid.framework as framework +from paddle.distributed import collective def _recv_in_dygraph(tensor, src, group, sync_op, use_calc_stream): diff --git a/python/paddle/distributed/communication/stream/send.py b/python/paddle/distributed/communication/stream/send.py index fa052734c7e..d46f0f768cc 100644 --- a/python/paddle/distributed/communication/stream/send.py +++ b/python/paddle/distributed/communication/stream/send.py @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import paddle.distributed.collective as collective import paddle.fluid.framework as framework +from paddle.distributed import collective def _send_in_dygraph(tensor, dst, group, sync_op, use_calc_stream): -- GitLab