提交 f2685bed 编写于 作者: Y Yu Yang

Clean code

上级 41ad6323
...@@ -25,12 +25,6 @@ limitations under the License. */ ...@@ -25,12 +25,6 @@ limitations under the License. */
namespace paddle { namespace paddle {
namespace framework { namespace framework {
#ifdef PADDLE_WITH_CUDA
// FIXME: CHECK the return value of x;
#define NCCL_INVOKE(x) x
#endif
struct OpHandle; struct OpHandle;
struct VarHandleBase { struct VarHandleBase {
...@@ -59,10 +53,6 @@ struct DummyVarHandle : public VarHandleBase { ...@@ -59,10 +53,6 @@ struct DummyVarHandle : public VarHandleBase {
std::string DebugString() const override { return "dummy"; } std::string DebugString() const override { return "dummy"; }
}; };
struct DependencyVarHandle : public VarHandleBase {
std::string DebugString() const override { return "Dependency Variable"; }
};
struct OpHandle { struct OpHandle {
std::vector<VarHandleBase *> inputs_; std::vector<VarHandleBase *> inputs_;
std::vector<VarHandleBase *> outputs_; std::vector<VarHandleBase *> outputs_;
...@@ -252,7 +242,7 @@ class ParallelExecutorPrivate { ...@@ -252,7 +242,7 @@ class ParallelExecutorPrivate {
devs.push_back(boost::get<platform::CUDAPlace>(p).device); devs.push_back(boost::get<platform::CUDAPlace>(p).device);
} }
NCCL_INVOKE(platform::dynload::ncclCommInitAll( PADDLE_ENFORCE(platform::dynload::ncclCommInitAll(
&comms[0], static_cast<int>(contexts.size()), &devs[0])); &comms[0], static_cast<int>(contexts.size()), &devs[0]));
int i = 0; int i = 0;
...@@ -558,7 +548,7 @@ void ParallelExecutor::PolishGraphToSupportDataHazards() const { ...@@ -558,7 +548,7 @@ void ParallelExecutor::PolishGraphToSupportDataHazards() const {
continue; continue;
} }
auto *dep_var = new DependencyVarHandle(); auto *dep_var = new DummyVarHandle();
dep_var->generated_op_ = read_op; dep_var->generated_op_ = read_op;
read_op->outputs_.emplace_back(dep_var); read_op->outputs_.emplace_back(dep_var);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册