| @@ -191,7 +191,8 @@ void DynamicMemPoolBestFit::FreeTensorMem(const DeviceMemPtr device_addr) { | |||||
| MS_EXCEPTION_IF_NULL(device_addr); | MS_EXCEPTION_IF_NULL(device_addr); | ||||
| auto mem_block = FindMemBlock(device_addr); | auto mem_block = FindMemBlock(device_addr); | ||||
| if (mem_block == nullptr) { | if (mem_block == nullptr) { | ||||
| MS_LOG(WARNING) << "Can't find the mem_block of the device address[" << device_addr << "]."; | |||||
| // May be destory the memory pool first, then destory the address, so this is normal case. | |||||
| MS_LOG(DEBUG) << "Can't find the mem_block of the device address[" << device_addr << "]."; | |||||
| return; | return; | ||||
| } | } | ||||
| CombineMemBuf(mem_block, device_addr); | CombineMemBuf(mem_block, device_addr); | ||||
| @@ -262,7 +263,7 @@ void DynamicMemPoolBestFit::EraseIdleMemBuf(size_t size, const DeviceMemPtr devi | |||||
| } | } | ||||
| void DynamicMemPoolBestFit::ReleaseDeviceRes() { | void DynamicMemPoolBestFit::ReleaseDeviceRes() { | ||||
| MS_LOG(INFO) << "The dynamic memmory pool total size is " << total_mem_statistics_ << ", total used size is " | |||||
| MS_LOG(INFO) << "The dynamic memory pool total size is " << total_mem_statistics_ << ", total used size is " | |||||
| << total_used_mem_statistics_ << ", used peak size is " << used_mem_peak_statistics_ << "."; | << total_used_mem_statistics_ << ", used peak size is " << used_mem_peak_statistics_ << "."; | ||||
| for (auto iter = global_mem_block_list_.begin(); iter != global_mem_block_list_.end(); ++iter) { | for (auto iter = global_mem_block_list_.begin(); iter != global_mem_block_list_.end(); ++iter) { | ||||
| auto device_addr = (*iter)->device_addr(); | auto device_addr = (*iter)->device_addr(); | ||||