Browse Source

!10041 Fix a bug for the padding of HCCL operators when there is only one input for allgather fusion

From: @alouhahahahaha
Reviewed-by: @zhoufeng54,@xu-yfei
Signed-off-by: @xu-yfei
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
9f3d8f282c
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/ccsrc/backend/kernel_compiler/hccl/hcom_util.cc

+ 2
- 1
mindspore/ccsrc/backend/kernel_compiler/hccl/hcom_util.cc View File

@@ -138,7 +138,8 @@ bool HcomUtil::GetHcomCount(const AnfNodePtr &anf_node, const vector<HcclDataTyp
} else { } else {
if (AnfAlgo::GetCNodeName(anf_node) == kAllGatherOpName) { if (AnfAlgo::GetCNodeName(anf_node) == kAllGatherOpName) {
auto cnode = anf_node->cast<CNodePtr>(); auto cnode = anf_node->cast<CNodePtr>();
if (AnfAlgo::HasNodeAttr(kAttrFusion, cnode) && AnfAlgo::GetNodeAttr<int64_t>(anf_node, kAttrFusion)) {
if (AnfAlgo::HasNodeAttr(kAttrFusion, cnode) && AnfAlgo::GetNodeAttr<int64_t>(anf_node, kAttrFusion) &&
AnfAlgo::GetInputTensorNum(anf_node) > 1) {
block_size = (input_size + align_size - 1 + filled_size) / align_size * align_size; block_size = (input_size + align_size - 1 + filled_size) / align_size * align_size;
} else { } else {
block_size = input_size; block_size = input_size;


Loading…
Cancel
Save