From eec4fa9099932d740a1828992688ff6b14f36c49 Mon Sep 17 00:00:00 2001 From: WangXi Date: Fri, 1 Nov 2019 18:14:06 +0800 Subject: [PATCH] And Enforce to fuse pass for DGC doesn't support fuse for now, test=develop (#20935) --- .../ir/multi_devices_graph_pass/fuse_all_reduce_op_pass.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/paddle/fluid/framework/ir/multi_devices_graph_pass/fuse_all_reduce_op_pass.cc b/paddle/fluid/framework/ir/multi_devices_graph_pass/fuse_all_reduce_op_pass.cc index 73d7bf6dba0..3f7ceb57958 100644 --- a/paddle/fluid/framework/ir/multi_devices_graph_pass/fuse_all_reduce_op_pass.cc +++ b/paddle/fluid/framework/ir/multi_devices_graph_pass/fuse_all_reduce_op_pass.cc @@ -105,6 +105,12 @@ class FuseAllReduceOpPass : public ir::Pass { auto *all_reduce_op_handle = dynamic_cast( &node->Wrapper()); if (all_reduce_op_handle) { +#if defined(PADDLE_WITH_DGC) + PADDLE_ENFORCE_NE( + all_reduce_op_handle->Name(), "sparse_all_reduce", + "DGC doesn't support fuse for now, if you want to use DGC " + "you need set strategy.fuse_all_reduce_ops = False."); +#endif auto inputs = details::DynamicCast( all_reduce_op_handle->Inputs()); PADDLE_ENFORCE_EQ(inputs.size(), num_place); -- GitLab