Browse Source

!9234 Fix hccl ge stub node shape and type

From: @zhoufeng54
Reviewed-by: @kisnwang,@chujinjin
Signed-off-by: @chujinjin
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
593443fbfb
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      mindspore/ccsrc/runtime/hccl_adapter/converter.cc

+ 2
- 3
mindspore/ccsrc/runtime/hccl_adapter/converter.cc View File

@@ -133,14 +133,13 @@ std::tuple<ge::NodePtr, ge::ComputeGraphPtr> GenerateStubGeNode(const AnfNodePtr
ge::OpDescPtr op_desc = std::make_shared<ge::OpDesc>(kStubDataStructureName, ge_node_name);
MS_EXCEPTION_IF_NULL(op_desc);
for (size_t i = 1; i < cnode->size(); ++i) {
auto &input = cnode->input(i);
std::vector<int64_t> ge_shape;
auto ms_shape = AnfAlgo::GetOutputInferShape(input, 0);
auto ms_shape = AnfAlgo::GetInputDeviceShape(cnode, i - 1);
std::transform(ms_shape.begin(), ms_shape.end(), std::back_inserter(ge_shape),
[](size_t in) { return static_cast<int64_t>(in); });
op_desc->AddInputDesc(
ge::GeTensorDesc(ge::GeShape(ge_shape), ge::Format::FORMAT_NCHW,
transform::TransformUtil::ConvertDataType(AnfAlgo::GetOutputInferDataType(input, 0))));
transform::TransformUtil::ConvertDataType(AnfAlgo::GetInputDeviceDataType(cnode, i - 1))));
}

// set node data type


Loading…
Cancel
Save