From aef291f4d320d8f7177016d55bce0c4522e90331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=A3?= <2042519524@qq.com> Date: Mon, 8 Nov 2021 09:59:33 +0800 Subject: [PATCH] Add reference to global_gather and global_scatter operators (#36985) * add reference to global_gather and global_scatter operators --- paddle/fluid/operators/collective/global_gather_op.cu.cc | 5 +++-- paddle/fluid/operators/collective/global_scatter_op.cu.cc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/collective/global_gather_op.cu.cc b/paddle/fluid/operators/collective/global_gather_op.cu.cc index 70b5d0244d3..0207f0e1872 100644 --- a/paddle/fluid/operators/collective/global_gather_op.cu.cc +++ b/paddle/fluid/operators/collective/global_gather_op.cu.cc @@ -10,7 +10,7 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. */ +limitations under the License.*/ #include "paddle/fluid/operators/collective/global_gather_op.h" @@ -101,7 +101,8 @@ class GlobalGatherOpCUDAKernel : public framework::OpKernel { auto send_ptr = 0; auto send_buf = x->data(); auto recv_buf = out->mutable_data(out_dims, place); - + // Taken and modified for PaddlePaddle from: + // https://github.com/laekov/fastmoe for (auto i = 0; i < n_expert; ++i) { PADDLE_ENFORCE_CUDA_SUCCESS(platform::dynload::ncclGroupStart()); for (auto j = 0; j < nranks; ++j) { diff --git a/paddle/fluid/operators/collective/global_scatter_op.cu.cc b/paddle/fluid/operators/collective/global_scatter_op.cu.cc index bec984c6b57..2bd42e1dadc 100644 --- a/paddle/fluid/operators/collective/global_scatter_op.cu.cc +++ b/paddle/fluid/operators/collective/global_scatter_op.cu.cc @@ -10,7 +10,7 @@ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and -limitations under the License. */ +limitations under the License.*/ #include "paddle/fluid/operators/collective/global_scatter_op.h" @@ -100,7 +100,8 @@ class GlobalScatterOpCUDAKernel : public framework::OpKernel { auto recv_ptr = 0; auto send_buf = x->data(); auto recv_buf = out->mutable_data(out_dims, place); - + // Taken and modified for PaddlePaddle from: + // https://github.com/laekov/fastmoe for (auto i = 0; i < n_expert; ++i) { PADDLE_ENFORCE_CUDA_SUCCESS(platform::dynload::ncclGroupStart()); for (auto j = 0; j < nranks; ++j) { -- GitLab