diff --git a/paddle/fluid/framework/details/multi_devices_graph_builder.cc b/paddle/fluid/framework/details/multi_devices_graph_builder.cc index e680655f2ab3b695da86d2b4e799a03661a25b94..8765af52b09d16ec3c6431c07047c643ee718549 100644 --- a/paddle/fluid/framework/details/multi_devices_graph_builder.cc +++ b/paddle/fluid/framework/details/multi_devices_graph_builder.cc @@ -470,7 +470,7 @@ void MultiDevSSAGraphBuilder::ConnectOp(SSAGraph *result, OpHandleBase *op, void MultiDevSSAGraphBuilder::CreateDistTrainOp(SSAGraph *result, const OpDesc &op) const { int op_dev_id = -1; - if (op.Type() == "split_byref") { + if (op.Type() == "split_byref" || op.Type() == "split_selected_rows") { op_dev_id = GetVarDeviceID(op.InputArgumentNames()[0]); if (strategy_.reduce_ == BuildStrategy::ReduceStrategy::kAllReduce) { op_dev_id = GetAppropriateDeviceID(op.InputArgumentNames());