From f2685bed81d492e13e471b16fefd31ce834962e9 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Wed, 21 Mar 2018 12:38:42 +0800 Subject: [PATCH] Clean code --- paddle/fluid/framework/parallel_executor.cc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/paddle/fluid/framework/parallel_executor.cc b/paddle/fluid/framework/parallel_executor.cc index 1823cefe42a..d06613b573b 100644 --- a/paddle/fluid/framework/parallel_executor.cc +++ b/paddle/fluid/framework/parallel_executor.cc @@ -25,12 +25,6 @@ limitations under the License. */ namespace paddle { namespace framework { -#ifdef PADDLE_WITH_CUDA - -// FIXME: CHECK the return value of x; -#define NCCL_INVOKE(x) x -#endif - struct OpHandle; struct VarHandleBase { @@ -59,10 +53,6 @@ struct DummyVarHandle : public VarHandleBase { std::string DebugString() const override { return "dummy"; } }; -struct DependencyVarHandle : public VarHandleBase { - std::string DebugString() const override { return "Dependency Variable"; } -}; - struct OpHandle { std::vector inputs_; std::vector outputs_; @@ -252,7 +242,7 @@ class ParallelExecutorPrivate { devs.push_back(boost::get(p).device); } - NCCL_INVOKE(platform::dynload::ncclCommInitAll( + PADDLE_ENFORCE(platform::dynload::ncclCommInitAll( &comms[0], static_cast(contexts.size()), &devs[0])); int i = 0; @@ -558,7 +548,7 @@ void ParallelExecutor::PolishGraphToSupportDataHazards() const { continue; } - auto *dep_var = new DependencyVarHandle(); + auto *dep_var = new DummyVarHandle(); dep_var->generated_op_ = read_op; read_op->outputs_.emplace_back(dep_var); -- GitLab