Browse Source

remove useless code

tags/v0.6.0-beta
lizhenyu 5 years ago
parent
commit
a3e8c7438f
1 changed files with 0 additions and 3 deletions
  1. +0
    -3
      mindspore/ccsrc/device/gpu/gpu_device_address.cc

+ 0
- 3
mindspore/ccsrc/device/gpu/gpu_device_address.cc View File

@@ -18,7 +18,6 @@
#include <vector> #include <vector>
#include "device/gpu/gpu_device_manager.h" #include "device/gpu/gpu_device_manager.h"
#include "utils/log_adapter.h" #include "utils/log_adapter.h"
#include "utils/context/ms_context.h"
#include "device/gpu/gpu_memory_allocator.h" #include "device/gpu/gpu_memory_allocator.h"


namespace mindspore { namespace mindspore {
@@ -55,8 +54,6 @@ GPUDeviceAddress::~GPUDeviceAddress() {
if (ptr_ == nullptr) { if (ptr_ == nullptr) {
return; return;
} }
auto ms_context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(ms_context);
if (from_mem_pool_) { if (from_mem_pool_) {
GPUMemoryAllocator::GetInstance().FreeTensorMem(ptr_); GPUMemoryAllocator::GetInstance().FreeTensorMem(ptr_);
ptr_ = nullptr; ptr_ = nullptr;


Loading…
Cancel
Save