Browse Source

!1513 dts: fix error when execute dynamic model

From: @zhengyuanhua
Reviewed-by: @xchu42,@wqtshg
Signed-off-by: @ji_chen
tags/v1.3.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
9eb3e05f6b
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      ge/graph/manager/graph_mem_allocator.h
  2. +1
    -0
      ge/single_op/single_op_manager.cc

+ 1
- 1
ge/graph/manager/graph_mem_allocator.h View File

@@ -226,7 +226,7 @@ class MemManager {


// Usually impossible // Usually impossible
if (allocator == nullptr) { if (allocator == nullptr) {
GELOGE(ge::INTERNAL_ERROR, "Get allocator failed, memory type is %u.", memory_type);
GELOGW("Get allocator failed, memory type is %u.", memory_type);
static T default_allocator(RT_MEMORY_RESERVED); static T default_allocator(RT_MEMORY_RESERVED);
return default_allocator; return default_allocator;
} }


+ 1
- 0
ge/single_op/single_op_manager.cc View File

@@ -67,6 +67,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status SingleOpManager::Release
std::lock_guard<std::mutex> lock(mutex_); std::lock_guard<std::mutex> lock(mutex_);
auto it = stream_resources_.find(resource_id); auto it = stream_resources_.find(resource_id);
if (it == stream_resources_.end()) { if (it == stream_resources_.end()) {
MemManager::Instance().CachingInstance(RT_MEMORY_HBM).TryFreeBlocks();
return SUCCESS; return SUCCESS;
} }
delete it->second; delete it->second;


Loading…
Cancel
Save