!11410 fix bug for scalar input of fused HCCL operators

From: @alouhahahahaha
Reviewed-by: @zhoufeng54,@xu-yfei
Signed-off-by: @xu-yfei
This commit is contained in:
mindspore-ci-bot 2021-01-19 17:35:11 +08:00 committed by Gitee
commit 7da62a588a
1 changed files with 3 additions and 1 deletions

View File

@ -204,7 +204,9 @@ AnfNodePtr CommunicationOpFusion::CreateFusedCommunicationOp(const FuncGraphPtr
auto cnode = communication_op_info.communication_op_nodes[idx];
MS_EXCEPTION_IF_NULL(cnode);
std::vector<size_t> shape = AnfAlgo::GetOutputInferShape(cnode, 0);
shape[0] /= rank_size;
if (!shape.empty()) {
shape[0] /= rank_size;
}
shapes.push_back(shape);
}
}