In case of memory allocation failure, return an error status to stream

executor.
Change: 123281933
This commit is contained in:
Xiaoqiang Zheng
2016-05-25 19:27:10 -08:00
committed by TensorFlower Gardener
parent c41a19137a
commit 8452d29fa8

View File

@@ -64,8 +64,7 @@ class CudnnScratchAllocator : public perftools::gputools::ScratchAllocator {
AllocatorAttributes(), allocation_attr));
if (!allocation_status.ok()) {
return perftools::gputools::port::StatusOr<
perftools::gputools::DeviceMemory<uint8>>(
AsDeviceMemory<uint8>(nullptr, 0));
perftools::gputools::DeviceMemory<uint8>>();
}
// Hold the reference of the allocated tensors until the end of the
// allocator.