From 1dcf2b6a1246a2dfb86f77b92ae59a53f249634d Mon Sep 17 00:00:00 2001 From: zhengyuanhua Date: Tue, 13 Apr 2021 20:08:29 +0800 Subject: [PATCH] dts: clear error when execute dynamic model --- ge/graph/manager/graph_mem_allocator.h | 2 +- ge/single_op/single_op_manager.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ge/graph/manager/graph_mem_allocator.h b/ge/graph/manager/graph_mem_allocator.h index d5e8cf8d..9f8b86b2 100644 --- a/ge/graph/manager/graph_mem_allocator.h +++ b/ge/graph/manager/graph_mem_allocator.h @@ -226,7 +226,7 @@ class MemManager { // Usually impossible 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); return default_allocator; } diff --git a/ge/single_op/single_op_manager.cc b/ge/single_op/single_op_manager.cc index 667e987b..180b50c1 100644 --- a/ge/single_op/single_op_manager.cc +++ b/ge/single_op/single_op_manager.cc @@ -67,6 +67,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status SingleOpManager::Release std::lock_guard lock(mutex_); auto it = stream_resources_.find(resource_id); if (it == stream_resources_.end()) { + MemManager::Instance().CachingInstance(RT_MEMORY_HBM).TryFreeBlocks(); return SUCCESS; } delete it->second;