Browse Source

!1334 fix

From: @wangxiaotian22
Reviewed-by: @xchu42,@wqtshg
Signed-off-by: @wqtshg
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
af9f8b7781
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      ge/graph/build/memory/graph_mem_assigner.cc
  2. +2
    -2
      ge/graph/build/memory/var_mem_assign_util.cc

+ 2
- 2
ge/graph/build/memory/graph_mem_assigner.cc View File

@@ -337,7 +337,7 @@ uint32_t GetContinuousMemoryType(const OpDescPtr &op_desc) {
}

if (continuous_type != 0) {
GELOGI("[Get][MemType:Continuous]Current node %s, value is %d", op_desc->GetName().c_str(), continuous_type);
GELOGI("[Get][MemType:Continuous]Current node %s, value is %d.", op_desc->GetName().c_str(), continuous_type);
}
return continuous_type;
}
@@ -482,7 +482,7 @@ Status GraphMemoryAssigner::ReAssignContinuousMemory(bool is_loop_graph) {
"[Assign][Memory:Continuous:Input]fail for node:%s.", node->GetName().c_str())
}
for (auto pair : memory_offset_) {
GELOGD("[Reassign][Memory:Continuous]At last, memory type = %ld, mem offset = %zu.", pair.first,
GELOGD("[Reassign][Memory:Continuous]At last, memory type = %ld, mem offset = %zu", pair.first,
pair.second.mem_offset_);
}
return ge::SUCCESS;


+ 2
- 2
ge/graph/build/memory/var_mem_assign_util.cc View File

@@ -130,7 +130,7 @@ Status VarMemAssignUtil::SetOutVariableAttr(const ge::NodePtr &node, const ge::N
VarManager::Instance(session_id)->GetVarAddr(var_node->GetName(), var_tensor_desc, &dev_ptr, memory_type));

int out_list_size = static_cast<int>(output_list.size());
if (index < out_list_size) {
if (index >= out_list_size) {
REPORT_INNER_ERROR("E19999", "param index:%d >= output_list.size() %d in node %s, "
"check invalid when SetOutVariableAttr", index, out_list_size, node->GetName().c_str());
GELOGE(FAILED, "index %d >= output_list.size() %d", index, out_list_size);
@@ -177,7 +177,7 @@ Status VarMemAssignUtil::DealBroadCastNode(uint32_t graph_id, const ge::NodePtr

auto broad_cast_index = static_cast<size_t>(broad_cast_info.idx);
auto input_tensor_desc_ptr_vistor = op_desc->GetAllInputsDescPtr();
if (input_tensor_desc_ptr_vistor.size() > broad_cast_index) {
if (input_tensor_desc_ptr_vistor.size() <= broad_cast_index) {
REPORT_INNER_ERROR("E19999", "Get broadcast op %s input tensor desc size [%zu] < idx [%d]",
node->GetName().c_str(), input_tensor_desc_ptr_vistor.size(), broad_cast_info.idx);
GELOGE(FAILED, "Get broadcast op %s input tensor desc size [%zu] < idx [%d]", node->GetName().c_str(),


Loading…
Cancel
Save