Browse Source

!11447 fix a bug for scalar input of fused HCCL operators where there is an index error

From: @alouhahahahaha
Reviewed-by: @zhoufeng54,@kisnwang
Signed-off-by: @kisnwang
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
cd8737f8cc
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/ccsrc/backend/optimizer/pass/communication_op_fusion.cc

+ 3
- 1
mindspore/ccsrc/backend/optimizer/pass/communication_op_fusion.cc View File

@@ -60,7 +60,9 @@ kernel::KernelBuildInfoPtr GenerateKernelBuildInfo(const CommunicationOpInfo &co
outputs_device_format.push_back(AnfAlgo::GetOutputFormat(cnode, output_index));
outputs_device_type.push_back(AnfAlgo::GetOutputDeviceDataType(cnode, output_index));
std::vector<size_t> shape = AnfAlgo::GetOutputInferShape(cnode, output_index);
shape[0] /= rank_size;
if (!shape.empty()) {
shape[0] /= rank_size;
}
outputs_shape.push_back(AnfAlgo::GetOutputInferShape(cnode, output_index));
}
}


Loading…
Cancel
Save