diff --git a/mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.cc b/mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.cc index a4e9462c77..58b6e4fbde 100644 --- a/mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.cc +++ b/mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.cc @@ -31,7 +31,7 @@ void AscendMemoryManager::MallocDeviceMemory() { device_mem_size_ = context_mem == 0 ? kAscendDeviceMemSize : context_mem; auto ret = rtMalloc(reinterpret_cast(&device_mem_base_), device_mem_size_, RT_MEMORY_HBM); if (ret != ACL_RT_SUCCESS) { - if (ret == ACL_ERROR_RT_DRV_INTERNAL_ERROR) { + if (ret == ACL_ERROR_RT_MEMORY_ALLOCATION) { auto context_ptr = MsContext::GetInstance(); MS_EXCEPTION_IF_NULL(context_ptr); unsigned int device_id = context_ptr->get_param(MS_CTX_DEVICE_ID);