Browse Source

!23687 can not appear exception in the atexit

Merge pull request !23687 from limingqi107/bug_fix
tags/v1.5.0-rc1
i-robot Gitee 4 years ago
parent
commit
1cd9ffb5e2
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc
  2. +2
    -2
      mindspore/ccsrc/runtime/hardware/gpu/gpu_device_context.cc

+ 2
- 2
mindspore/ccsrc/runtime/device/gpu/gpu_kernel_runtime.cc View File

@@ -271,10 +271,10 @@ void GPUKernelRuntime::ReleaseDeviceRes() {
if (GpuBufferMgr::GetInstance().IsInit()) {
if (!GpuBufferMgr::GetInstance().IsClosed()) {
if (!GpuBufferMgr::GetInstance().CloseNotify()) {
MS_LOG(EXCEPTION) << "Could not close gpu data queue.";
MS_LOG(ERROR) << "Could not close gpu data queue.";
}
}
CHECK_OP_RET_WITH_EXCEPT(GpuBufferMgr::GetInstance().Destroy(), "Could not destroy gpu data queue.");
CHECK_OP_RET_WITH_ERROR(GpuBufferMgr::GetInstance().Destroy(), "Could not destroy gpu data queue.");
}

// Destroy remaining memory swap events and free host memory.


+ 2
- 2
mindspore/ccsrc/runtime/hardware/gpu/gpu_device_context.cc View File

@@ -148,9 +148,9 @@ void GPUDeviceContext::Destroy() {

if (GpuBufferMgr::GetInstance().IsInit()) {
if (!GpuBufferMgr::GetInstance().IsClosed() && !GpuBufferMgr::GetInstance().CloseNotify()) {
MS_LOG(EXCEPTION) << "Could not close gpu data queue.";
MS_LOG(ERROR) << "Could not close gpu data queue.";
}
CHECK_OP_RET_WITH_EXCEPT(GpuBufferMgr::GetInstance().Destroy(), "Could not destroy gpu data queue.");
CHECK_OP_RET_WITH_ERROR(GpuBufferMgr::GetInstance().Destroy(), "Could not destroy gpu data queue.");
}

// Release stream, cudnn and cublas handle, etc.


Loading…
Cancel
Save