diff --git a/paddle/fluid/distributed/fleet_executor/dist_model.cc b/paddle/fluid/distributed/fleet_executor/dist_model.cc index 4b8483302378f8683014486445ed2132d70f82cc..452c666a1523cb81f7857684896997f1ad20d20d 100644 --- a/paddle/fluid/distributed/fleet_executor/dist_model.cc +++ b/paddle/fluid/distributed/fleet_executor/dist_model.cc @@ -487,21 +487,25 @@ bool DistModel::PrepareFeedAndFetch() { if (feeds_.size() == 0) { LOG(ERROR) << "Feed ops are needed for the first pp stage."; return false; + } + } else { + if (feeds_.size() > 0) { + LOG(WARNING) << "Feed op is found in the non-first stage of pp."; } else { - LOG(WARNING) << "No feed ops in non-first pp stage."; + LOG(INFO) << "No feed ops in non-first pp stage."; } - } else if (feeds_.size() > 0) { - LOG(WARNING) << "Feed op is found in the non-first stage of pp."; } if (IsPPLastStage(config_)) { if (fetches_.size() == 0) { - LOG(ERROR) << "Fetch op is needed for the last pp stage."; - return false; + LOG(WARNING) << "No fetch op was found in the last pp stage. Make sure " + "the result has been sent to frist pp stage."; + } + } else { + if (fetches_.size() > 0) { + LOG(WARNING) << "Fetch op is found in the non-last stage of pp."; } else { - LOG(WARNING) << "No fetch op in non-last pp stage."; + LOG(INFO) << "No fetch op in non-last pp stage."; } - } else if (fetches_.size() > 0) { - LOG(WARNING) << "Fetch op is found in the non-last stage of pp."; } } return true;