From 5d0a1fd09d17e9f4bb62ffe38baa49592bf02d6c Mon Sep 17 00:00:00 2001 From: RichardWooSJTU <37864677+RichardWooSJTU@users.noreply.github.com> Date: Thu, 17 Aug 2023 11:58:13 +0800 Subject: [PATCH] modify interface of allreduce (#56254) --- paddle/fluid/operators/collective/c_allreduce_op.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/paddle/fluid/operators/collective/c_allreduce_op.h b/paddle/fluid/operators/collective/c_allreduce_op.h index 82cb3a3772e..466baf94a83 100644 --- a/paddle/fluid/operators/collective/c_allreduce_op.h +++ b/paddle/fluid/operators/collective/c_allreduce_op.h @@ -265,11 +265,6 @@ class CAllReduceOpCUDAKernel : public framework::OpKernel { if (map->has(rid)) { // Use ProcessGroup distributed::ProcessGroup* pg = map->get(rid); - std::vector in_tensor; - std::vector out_tensor; - in_tensor.push_back(*in); - out_tensor.push_back(*out); - distributed::AllreduceOptions opts; switch (red_type) { case kRedSum: @@ -293,7 +288,7 @@ class CAllReduceOpCUDAKernel : public framework::OpKernel { "Invalid reduce type: %d", red_type)); } - auto task = pg->AllReduce(in_tensor, out_tensor, opts); + auto task = pg->AllReduce(out, *in, opts, false, true); task->Wait(); return; } -- GitLab