From 37f6b9ab7a24ace68167b68bfc3bce746a8abf7a Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Wed, 27 Mar 2019 12:20:38 +0800 Subject: [PATCH] fix build test=develop --- .../fluid/framework/details/multi_devices_graph_pass.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/details/multi_devices_graph_pass.h b/paddle/fluid/framework/details/multi_devices_graph_pass.h index 1d9ce17c50..21b0687f63 100644 --- a/paddle/fluid/framework/details/multi_devices_graph_pass.h +++ b/paddle/fluid/framework/details/multi_devices_graph_pass.h @@ -54,8 +54,8 @@ class MultiDevSSAGraphBuilderBase : public ir::Pass { bool UseGPU() const; - bool NeedCollectiveForGrad(const std::string &grad_name, - std::vector ops) const; + virtual bool NeedCollectiveForGrad(const std::string &grad_name, + std::vector ops) const; bool IsScaleLossOp(ir::Node *node) const; @@ -117,7 +117,10 @@ class AsyncSSAGraphBuilder : public MultiDevSSAGraphBuilderBase { void InsertCollectiveOp(ir::Graph *result, const std::string &p_name, const std::string &g_name) const override {} - bool NeedCollectiveOps() const override { return false; } + bool NeedCollectiveForGrad(const std::string &grad_name, + std::vector ops) const { + return false; + } bool DealWithSpecialOp(ir::Graph *result, ir::Node *node) const override { if (node->Op()->Type() == "recv") { -- GitLab