Browse Source

!9753 fix 910 memory size of GetInputInfo

From: @zhoufeng54
Reviewed-by: @xu-yfei,@chujinjin
Signed-off-by: @xu-yfei,@chujinjin
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
defb644c72
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/ccsrc/cxx_api/graph/ms/ms_graph_impl.cc

+ 2
- 2
mindspore/ccsrc/cxx_api/graph/ms/ms_graph_impl.cc View File

@@ -220,7 +220,7 @@ Status MsGraphImpl::GetInputsInfo(std::vector<std::string> *names, std::vector<s
PushbackIfNotNull(names, input_names_[i]);
PushbackIfNotNull(shapes, tensor->shape());
PushbackIfNotNull(data_types, TransTypeId2InferDataType(tensor->data_type()));
PushbackIfNotNull(mem_sizes, tensor->DataSize());
PushbackIfNotNull(mem_sizes, tensor->Size());
}
return SUCCESS;
}
@@ -244,7 +244,7 @@ Status MsGraphImpl::GetOutputsInfo(std::vector<std::string> *names, std::vector<
PushbackIfNotNull(names, output_names_[i]);
PushbackIfNotNull(shapes, tensor->shape());
PushbackIfNotNull(data_types, TransTypeId2InferDataType(tensor->data_type()));
PushbackIfNotNull(mem_sizes, tensor->DataSize());
PushbackIfNotNull(mem_sizes, tensor->Size());
}

return SUCCESS;


Loading…
Cancel
Save