From e8a7e5d1e6e854ab542644f1df7ae90c8565cc5b Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 16 Mar 2018 16:35:56 +0800 Subject: [PATCH] Update --- paddle/fluid/framework/parallel_executor.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index ec5eb579105..5870eac8115 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -250,6 +250,8 @@ struct NCCLAllReduceOpHandle : public OpHandle { int dtype = -1; size_t numel = 0; + platform::dynload::ncclGroupStart(); + for (auto &p : member_->places_) { int dev_id = boost::get(p).device; @@ -266,11 +268,12 @@ struct NCCLAllReduceOpHandle : public OpHandle { auto &nccl_ctx = member_->communication_streams_.at(dev_id); - ncclAllReduce(buffer, buffer, numel, static_cast(dtype), - ncclSum, nccl_ctx.comm, nccl_ctx.stream()); + platform::dynload::ncclAllReduce( + buffer, buffer, numel, static_cast(dtype), ncclSum, + nccl_ctx.comm, nccl_ctx.stream()); } - ncclGroupEnd(); + platform::dynload::ncclGroupEnd(); } } }; -- GitLab