Browse Source

update runtime error code definition

tags/v1.1.0
yanghaoran 5 years ago
parent
commit
710bced49f
3 changed files with 4 additions and 3 deletions
  1. +1
    -1
      graphengine
  2. +2
    -2
      mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.cc
  3. +1
    -0
      mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.h

+ 1
- 1
graphengine

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

+ 2
- 2
mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.cc 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);


+ 1
- 0
mindspore/ccsrc/runtime/device/ascend/ascend_memory_manager.h 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 {


Loading…
Cancel
Save