fix bug for prelu mirror

pull/11976/head
yangzhenzhang 4 years ago
parent c2763dbb6f
commit 9e50b0be5c

@ -61,26 +61,6 @@ Status PReLUInfo::InferDevMatrixShape() {
return SUCCESS;
}
Status PReLUInfo::InferMirrorOps() {
Shape param_tensor_map = inputs_tensor_map_[1];
std::vector<Group> param_group;
if (CreateGroupByTensorMap(param_tensor_map, &param_group) != SUCCESS) {
return FAILED;
} else if (param_group.empty()) {
MS_LOG(INFO) << name_ << ": The mirror ops is empty.";
return SUCCESS;
}
OperatorVector op_for_param;
op_for_param = CreateMirrorOps(param_group[0].name(), param_group[0].GetDevNum());
// op_for_inputs is empty
OperatorVector op_for_inputs;
mirror_ops_.push_back(op_for_inputs);
mirror_ops_.push_back(op_for_param);
std::string group_name = param_group[0].name();
MS_LOG(INFO) << name_ << ": The mirror ops group is " << group_name;
return SUCCESS;
}
Status PReLUInfo::InferForwardCommunication() { return SUCCESS; }
/*

@ -45,7 +45,6 @@ class PReLUInfo : public OperatorInfo {
protected:
Status CheckStrategy(const StrategyPtr &strategy) override;
Status InferMirrorOps() override;
Status InferForwardCommunication() override;
Status InferTensorInfo() override;
Status InferDevMatrixShape() override;

Loading…
Cancel
Save