From: A. Unique TensorFlower Date: Fri, 27 Apr 2018 01:03:50 +0000 (-0700) Subject: Free scratch memory in ~BaseGPUDevice. X-Git-Tag: upstream/v1.9.0_rc1~206^2~1^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0a1d311a40009f0663aa3d904fb8574ff13fa672;p=platform%2Fupstream%2Ftensorflow.git Free scratch memory in ~BaseGPUDevice. PiperOrigin-RevId: 194483351 --- diff --git a/tensorflow/core/common_runtime/gpu/gpu_device.cc b/tensorflow/core/common_runtime/gpu/gpu_device.cc index 1fa3399..944f0c8 100644 --- a/tensorflow/core/common_runtime/gpu/gpu_device.cc +++ b/tensorflow/core/common_runtime/gpu/gpu_device.cc @@ -266,6 +266,7 @@ BaseGPUDevice::BaseGPUDevice(const SessionOptions& options, const string& name, BaseGPUDevice::~BaseGPUDevice() { delete gpu_device_info_; + for (auto sb : scratch_) gpu_allocator_->DeallocateRaw(sb); for (auto ctx : device_contexts_) ctx->Unref(); }