diff --git a/mindspore/ccsrc/frontend/parallel/group_manager.cc b/mindspore/ccsrc/frontend/parallel/group_manager.cc index ff91b5bcd98..27830bacaeb 100644 --- a/mindspore/ccsrc/frontend/parallel/group_manager.cc +++ b/mindspore/ccsrc/frontend/parallel/group_manager.cc @@ -190,15 +190,16 @@ Status GroupManager::CreateGroup(const std::string &group_name, const std::vecto MS_EXCEPTION_IF_NULL(context_ptr); std::string device_name = context_ptr->get_param(MS_CTX_DEVICE_TARGET); uint32_t device_id = context_ptr->get_param(MS_CTX_DEVICE_ID); - bool ret = CreateGroupByExecutor(device_name, group_name, ranks, device_id); - if (!ret) { - MS_LOG(ERROR) << "Create group failed, group name is " << group_name; - return Status::FAILED; - } std::pair> group_info = std::make_pair(group_name, ranks); group_info_.push_back(group_info); + bool ret = CreateGroupByExecutor(device_name, group_name, ranks, device_id); + if (!ret) { + MS_LOG(WARNING) << "Create group failed, group name is " << group_name; + return Status::FAILED; + } + MS_LOG(INFO) << "Create group success, group name is " << group_name; return Status::SUCCESS; } diff --git a/mindspore/ccsrc/frontend/parallel/ops_info/conv2d_info.cc b/mindspore/ccsrc/frontend/parallel/ops_info/conv2d_info.cc index e1c170ea94c..257bb443a2e 100644 --- a/mindspore/ccsrc/frontend/parallel/ops_info/conv2d_info.cc +++ b/mindspore/ccsrc/frontend/parallel/ops_info/conv2d_info.cc @@ -641,7 +641,31 @@ Status Conv2DBackpropInputInfo::CheckStrategy(const StrategyPtr &strategy) { return SUCCESS; } -Status Conv2DBackpropInputInfo::CheckHWStrategy(int64_t h_strategy, int64_t w_strategy) { return SUCCESS; } +Status Conv2DBackpropInputInfo::CheckHWStrategy(int64_t h_strategy, int64_t w_strategy) { + if (pad_mode_ != 1) { // only support same mode + MS_LOG(ERROR) << name_ << ": Do not support the pad mode " << pad_mode_ << " when split H or W dimension"; + return FAILED; + } + + if (h_strategy > 1) { + if (inputs_shape_[0][2] * stride_[2] != outputs_shape_[0][2]) { + MS_LOG(ERROR) << name_ << ": Do not support split h dimension when in_shape * stride != out_shape"; + return FAILED; + } + + if (kernel_size_[0] > stride_[2]) { + MS_LOG(ERROR) << name_ << ": Do not support split h dimension when kernel size larger than stride"; + return FAILED; + } + } + + if (w_strategy > 1 && inputs_shape_[0][3] * stride_[3] != outputs_shape_[0][3]) { + MS_LOG(ERROR) << name_ << ": Do not support split w dimension when in_shape * stride != out_shape"; + return FAILED; + } + + return SUCCESS; +} Status Conv2DBackpropInputInfo::InferDevMatrixShape() { // the strategy is ((n, o, h, w), (o, i, 1, 1))