Add ScopedAllocator and ScopedAllocatorMgr.
authorAyush Dubey <ayushd@google.com>
Wed, 14 Mar 2018 17:55:11 +0000 (10:55 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Wed, 14 Mar 2018 17:59:28 +0000 (10:59 -0700)
commit380a032e64222db73766ef18ea51130e3df4c15f
tree566945c833cfab315777a4c9c7129cfd6b587020
parent146a923409e8a30c109e7209b6a0a3a11daab6eb
Add ScopedAllocator and ScopedAllocatorMgr.

A ScopedAllocator is a new memory allocator which manages slices of a large
tensor.  ScopedAllocatorMgr manages all scoped allocators per device.  The
ScopedAllocatorMgr comprises of multiple ScopedAllocatorContainers, one per
step id.  If a step terminates abnormally, the corresponding
ScopedAllocatorContainer will clean up all allocated memory in that step.

PiperOrigin-RevId: 189051914
tensorflow/core/BUILD
tensorflow/core/common_runtime/scoped_allocator.cc [new file with mode: 0644]
tensorflow/core/common_runtime/scoped_allocator.h [new file with mode: 0644]
tensorflow/core/common_runtime/scoped_allocator_mgr.cc [new file with mode: 0644]
tensorflow/core/common_runtime/scoped_allocator_mgr.h [new file with mode: 0644]
tensorflow/core/common_runtime/scoped_allocator_mgr_test.cc [new file with mode: 0644]
tensorflow/core/framework/tensor.h