update runtime error code definition

This commit is contained in:
yanghaoran 2020-12-04 15:46:51 +08:00
parent b5269d6bd4
commit 710bced49f
3 changed files with 4 additions and 3 deletions

@ -1 +1 @@
Subproject commit 38a40dd232346e9a47850e237259ea6f43eeb35b
Subproject commit ce23341ee2c7e48b39f227b293d1aa7f54effd34

View File

@ -30,8 +30,8 @@ void AscendMemoryManager::MallocDeviceMemory() {
auto context_mem = GetDeviceMemSizeFromContext();
device_mem_size_ = context_mem == 0 ? kAscendDeviceMemSize : context_mem;
auto ret = rtMalloc(reinterpret_cast<void **>(&device_mem_base_), device_mem_size_, RT_MEMORY_HBM);
if (ret != RT_ERROR_NONE) {
if (ret == RT_ERROR_DRV_ERR) {
if (ret != ACL_RT_SUCCESS) {
if (ret == ACL_ERROR_RT_DRV_INTERNEL_ERROR) {
auto context_ptr = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(context_ptr);
unsigned int device_id = context_ptr->get_param<uint32_t>(MS_CTX_DEVICE_ID);

View File

@ -17,6 +17,7 @@
#ifndef MINDSPORE_CCSRC_RUNTIME_DEVICE_ASCEND_ASCEND_MEMORY_MANAGER_H_
#define MINDSPORE_CCSRC_RUNTIME_DEVICE_ASCEND_ASCEND_MEMORY_MANAGER_H_
#include "runtime/device/memory_manager.h"
#include "graphengine/inc/external/runtime/rt_error_codes.h"
namespace mindspore {
namespace device {
namespace ascend {